Commit f2feaefc by 王勇飞

gyq

parent b7351251
var System=require("../../system"); var System = require("../../system");
var settings=require("../../../config/settings"); var settings = require("../../../config/settings");
const querystring = require('querystring'); const querystring = require('querystring');
const ApiBase =require("../api.base"); const ApiBase = require("../api.base");
class ChinaPatentSearchApi extends ApiBase{ class ChinaPatentSearchApi extends ApiBase {
constructor(){ constructor() {
super(); super();
this.patentUrl = settings.reqEsAddrIc()+"bigdata_patent_op/_search"; this.patentUrl = settings.reqEsAddrIc() + "bigdata_patent_op/_search";
}; };
buildDate(date){ buildDate(date) {
var date = new Date(date); var date = new Date(date);
var time = Date.parse(date); var time = Date.parse(date);
time=time / 1000; time = time / 1000;
return time; return time;
}; };
async ObtainChinaPatentInfo(obj){ async ObtainChinaPatentInfo(obj) {
console.log("----------------api-ObtainChinaPatentInfo----------------"); console.log("----------------api-ObtainChinaPatentInfo----------------");
console.log(obj); console.log(obj);
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
} }
}, },
}; };
var applynum=obj.applynum==null?"":obj.applynum;//专利申请号 var applynum = obj.applynum == null ? "" : obj.applynum;//专利申请号
if (applynum != null && applynum != ""){ if (applynum != null && applynum != "") {
var param = { var param = {
"term": { "term": {
"filing_no": applynum "filing_no": applynum
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var publishnum=obj.publishnum==null?"":obj.publishnum;//专利公开号 var publishnum = obj.publishnum == null ? "" : obj.publishnum;//专利公开号
if (publishnum != null && publishnum != ""){ if (publishnum != null && publishnum != "") {
var arr= publishnum.split(""); var arr = publishnum.split("");
if(arr[arr.length-1]=="A"){ if (arr[arr.length - 1] == "A") {
var param = { var param = {
"term": { "term": {
"pub_no": publishnum "pub_no": publishnum
} }
}; };
}else{ } else {
var param = { var param = {
"term": { "term": {
"gr_no": publishnum "gr_no": publishnum
} }
}; };
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits.hits data: j.hits.hits
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null data: null
}; };
} }
}; };
async CommomSearchbyTitle(obj){//根据标题查询聚合 async CommomSearchbyTitle(obj) {//根据标题查询聚合
console.log("--------CommomSearchbyTitle----------"); console.log("--------CommomSearchbyTitle----------");
console.log(obj); console.log(obj);
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var title = obj.title==null?"":obj.title; var title = obj.title == null ? "" : obj.title;
if(title==""){ if (title == "") {
return {status:-1,msg:"传入标题信息为空",data:null,buckets:null}; return { status: -1, msg: "传入标题信息为空", data: null, buckets: null };
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
...@@ -119,30 +119,30 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -119,30 +119,30 @@ class ChinaPatentSearchApi extends ApiBase{
], ],
"aggregations": { "aggregations": {
"group_by_pub_type": { "group_by_pub_type": {
"terms": { "terms": {
"field": "pub_type", "field": "pub_type",
"size": 1000 "size": 1000
} }
}, },
"group_by_pub_status": { "group_by_pub_status": {
"terms": { "terms": {
"field": "pub_status", "field": "pub_status",
"size": 1000 "size": 1000
} }
}, },
"group_by_filing_year": { "group_by_filing_year": {
"terms": { "terms": {
"field": "filing_year", "field": "filing_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
}, },
"group_by_pub_year": { "group_by_pub_year": {
"terms": { "terms": {
"field": "pub_year", "field": "pub_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
} }
} }
}; };
...@@ -154,96 +154,96 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -154,96 +154,96 @@ class ChinaPatentSearchApi extends ApiBase{
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
var pubtype=obj.pubtype==null?"":obj.pubtype;//专利类型 var pubtype = obj.pubtype == null ? "" : obj.pubtype;//专利类型
if (pubtype != null && pubtype != ""){ if (pubtype != null && pubtype != "") {
param = { param = {
"term": { "term": {
"pub_type": pubtype "pub_type": pubtype
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubstatus = obj.pubstatus==null?"":obj.pubstatus;//法律状态 var pubstatus = obj.pubstatus == null ? "" : obj.pubstatus;//法律状态
if (pubstatus != null && pubstatus != ""){ if (pubstatus != null && pubstatus != "") {
param = { param = {
"term": { "term": {
"pub_status": pubstatus "pub_status": pubstatus
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingyear = obj.filingyear==null?"":obj.filingyear;//申请年份 var filingyear = obj.filingyear == null ? "" : obj.filingyear;//申请年份
if (filingyear != null && filingyear !=""){ if (filingyear != null && filingyear != "") {
param = { param = {
"term": { "term": {
"filing_year": filingyear "filing_year": filingyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubyear = obj.pubyear==null?"":obj.pubyear;//公开年份 var pubyear = obj.pubyear == null ? "" : obj.pubyear;//公开年份
if (pubyear != null && pubyear != ""){ if (pubyear != null && pubyear != "") {
param = { param = {
"term": { "term": {
"pub_year": pubyear "pub_year": pubyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits, data: j.hits,
buckets:j.aggregations buckets: j.aggregations
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null, data: null,
buckets:null buckets: null
}; };
} }
}; };
async CommomSearchbyFilingno(obj){//根据申请号查询聚合 async CommomSearchbyFilingno(obj) {//根据申请号查询聚合
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var filingno = obj.filingno==null?"":obj.filingno; var filingno = obj.filingno == null ? "" : obj.filingno;
if(filingno==""){ if (filingno == "") {
return {status:-1,msg:"传入的申请号信息为空",data:null,buckets:null}; return { status: -1, msg: "传入的申请号信息为空", data: null, buckets: null };
} }
else{ else {
filingno = filingno.replace("CN","").replace("cn","").replace(".",""); filingno = filingno.replace("CN", "").replace("cn", "").replace(".", "");
if (filingno.length == 13){ if (filingno.length == 13) {
filingno = filingno.substr(0,12); filingno = filingno.substr(0, 12);
} }
else if (filingno.length == 9){ else if (filingno.length == 9) {
filingno = filingno.substr(0,8); filingno = filingno.substr(0, 8);
} }
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
...@@ -266,123 +266,123 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -266,123 +266,123 @@ class ChinaPatentSearchApi extends ApiBase{
], ],
"aggregations": { "aggregations": {
"group_by_pub_type": { "group_by_pub_type": {
"terms": { "terms": {
"field": "pub_type", "field": "pub_type",
"size": 1000 "size": 1000
} }
}, },
"group_by_pub_status": { "group_by_pub_status": {
"terms": { "terms": {
"field": "pub_status", "field": "pub_status",
"size": 1000 "size": 1000
} }
}, },
"group_by_filing_year": { "group_by_filing_year": {
"terms": { "terms": {
"field": "filing_year", "field": "filing_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
}, },
"group_by_pub_year": { "group_by_pub_year": {
"terms": { "terms": {
"field": "pub_year", "field": "pub_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
} }
} }
}; };
var param = { var param = {
"wildcard": { "wildcard": {
"filing_no": "*"+filingno+"*" "filing_no": "*" + filingno + "*"
} }
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
var pubtype=obj.pubtype==null?"":obj.pubtype;//专利类型 var pubtype = obj.pubtype == null ? "" : obj.pubtype;//专利类型
if (pubtype != null && pubtype != ""){ if (pubtype != null && pubtype != "") {
param = { param = {
"term": { "term": {
"pub_type": pubtype "pub_type": pubtype
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubstatus = obj.pubstatus==null?"":obj.pubstatus;//法律状态 var pubstatus = obj.pubstatus == null ? "" : obj.pubstatus;//法律状态
if (pubstatus != null && pubstatus != ""){ if (pubstatus != null && pubstatus != "") {
param = { param = {
"term": { "term": {
"pub_status": pubstatus "pub_status": pubstatus
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingyear = obj.filingyear==null?"":obj.filingyear;//申请年份 var filingyear = obj.filingyear == null ? "" : obj.filingyear;//申请年份
if (filingyear != null && filingyear !=""){ if (filingyear != null && filingyear != "") {
param = { param = {
"term": { "term": {
"filing_year": filingyear "filing_year": filingyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubyear = obj.pubyear==null?"":obj.pubyear;//公开年份 var pubyear = obj.pubyear == null ? "" : obj.pubyear;//公开年份
if (pubyear != null && pubyear != ""){ if (pubyear != null && pubyear != "") {
param = { param = {
"term": { "term": {
"pub_year": pubyear "pub_year": pubyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits, data: j.hits,
buckets:j.aggregations buckets: j.aggregations
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null, data: null,
buckets:null buckets: null
}; };
} }
}; };
async CommomSearchbyPubno(obj){//根据公开号查询聚合 async CommomSearchbyPubno(obj) {//根据公开号查询聚合
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var pubno = obj.pubno==null?"":obj.pubno; var pubno = obj.pubno == null ? "" : obj.pubno;
if(pubno==""){ if (pubno == "") {
return {status:-1,msg:"传入的公开号信息为空",data:null,buckets:null}; return { status: -1, msg: "传入的公开号信息为空", data: null, buckets: null };
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
...@@ -405,138 +405,138 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -405,138 +405,138 @@ class ChinaPatentSearchApi extends ApiBase{
], ],
"aggregations": { "aggregations": {
"group_by_pub_type": { "group_by_pub_type": {
"terms": { "terms": {
"field": "pub_type", "field": "pub_type",
"size": 1000 "size": 1000
} }
}, },
"group_by_pub_status": { "group_by_pub_status": {
"terms": { "terms": {
"field": "pub_status", "field": "pub_status",
"size": 1000 "size": 1000
} }
}, },
"group_by_filing_year": { "group_by_filing_year": {
"terms": { "terms": {
"field": "filing_year", "field": "filing_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
}, },
"group_by_pub_year": { "group_by_pub_year": {
"terms": { "terms": {
"field": "pub_year", "field": "pub_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
} }
} }
}; };
var param = { var param = {
"bool": { "bool": {
"should": [ "should": [
] ]
} }
} }
var parr = { var parr = {
"wildcard": { "wildcard": {
"pub_no": "*"+pubno+"*" "pub_no": "*" + pubno + "*"
} }
} }
param.bool.should.push(parr) param.bool.should.push(parr)
parr = { parr = {
"wildcard": { "wildcard": {
"gr_no": "*"+pubno+"*" "gr_no": "*" + pubno + "*"
} }
} }
param.bool.should.push(parr) param.bool.should.push(parr)
params.query.bool.must.push(param); params.query.bool.must.push(param);
var pubtype=obj.pubtype==null?"":obj.pubtype;//专利类型 var pubtype = obj.pubtype == null ? "" : obj.pubtype;//专利类型
if (pubtype != null && pubtype != ""){ if (pubtype != null && pubtype != "") {
param = { param = {
"term": { "term": {
"pub_type": pubtype "pub_type": pubtype
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubstatus = obj.pubstatus==null?"":obj.pubstatus;//法律状态 var pubstatus = obj.pubstatus == null ? "" : obj.pubstatus;//法律状态
if (pubstatus != null && pubstatus != ""){ if (pubstatus != null && pubstatus != "") {
param = { param = {
"term": { "term": {
"pub_status": pubstatus "pub_status": pubstatus
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingyear = obj.filingyear==null?"":obj.filingyear;//申请年份 var filingyear = obj.filingyear == null ? "" : obj.filingyear;//申请年份
if (filingyear != null && filingyear !=""){ if (filingyear != null && filingyear != "") {
param = { param = {
"term": { "term": {
"filing_year": filingyear "filing_year": filingyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubyear = obj.pubyear==null?"":obj.pubyear;//公开年份 var pubyear = obj.pubyear == null ? "" : obj.pubyear;//公开年份
if (pubyear != null && pubyear != ""){ if (pubyear != null && pubyear != "") {
param = { param = {
"term": { "term": {
"pub_year": pubyear "pub_year": pubyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits, data: j.hits,
buckets:j.aggregations buckets: j.aggregations
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null, data: null,
buckets:null buckets: null
}; };
} }
}; };
async CommomSearchbyApplicant(obj){//根据申请人查询聚合 async CommomSearchbyApplicant(obj) {//根据申请人查询聚合
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var applicant = obj.applicant==null?"":obj.applicant; var applicant = obj.applicant == null ? "" : obj.applicant;
if(applicant==""){ if (applicant == "") {
return {status:-1,msg:"传入的申请人信息为空",data:null,buckets:null}; return { status: -1, msg: "传入的申请人信息为空", data: null, buckets: null };
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
...@@ -559,30 +559,30 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -559,30 +559,30 @@ class ChinaPatentSearchApi extends ApiBase{
], ],
"aggregations": { "aggregations": {
"group_by_pub_type": { "group_by_pub_type": {
"terms": { "terms": {
"field": "pub_type", "field": "pub_type",
"size": 1000 "size": 1000
} }
}, },
"group_by_pub_status": { "group_by_pub_status": {
"terms": { "terms": {
"field": "pub_status", "field": "pub_status",
"size": 1000 "size": 1000
} }
}, },
"group_by_filing_year": { "group_by_filing_year": {
"terms": { "terms": {
"field": "filing_year", "field": "filing_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
}, },
"group_by_pub_year": { "group_by_pub_year": {
"terms": { "terms": {
"field": "pub_year", "field": "pub_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
} }
} }
}; };
...@@ -590,92 +590,92 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -590,92 +590,92 @@ class ChinaPatentSearchApi extends ApiBase{
var param = { var param = {
"query_string": { "query_string": {
"default_field": "applicant_name", "default_field": "applicant_name",
"query": "\""+ applicant +"\"" "query": "\"" + applicant + "\""
} }
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
var pubtype=obj.pubtype==null?"":obj.pubtype;//专利类型 var pubtype = obj.pubtype == null ? "" : obj.pubtype;//专利类型
if (pubtype != null && pubtype != ""){ if (pubtype != null && pubtype != "") {
param = { param = {
"term": { "term": {
"pub_type": pubtype "pub_type": pubtype
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubstatus = obj.pubstatus==null?"":obj.pubstatus;//法律状态 var pubstatus = obj.pubstatus == null ? "" : obj.pubstatus;//法律状态
if (pubstatus != null && pubstatus != ""){ if (pubstatus != null && pubstatus != "") {
param = { param = {
"term": { "term": {
"pub_status": pubstatus "pub_status": pubstatus
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingyear = obj.filingyear==null?"":obj.filingyear;//申请年份 var filingyear = obj.filingyear == null ? "" : obj.filingyear;//申请年份
if (filingyear != null && filingyear !=""){ if (filingyear != null && filingyear != "") {
param = { param = {
"term": { "term": {
"filing_year": filingyear "filing_year": filingyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubyear = obj.pubyear==null?"":obj.pubyear;//公开年份 var pubyear = obj.pubyear == null ? "" : obj.pubyear;//公开年份
if (pubyear != null && pubyear != ""){ if (pubyear != null && pubyear != "") {
param = { param = {
"term": { "term": {
"pub_year": pubyear "pub_year": pubyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits, data: j.hits,
buckets:j.aggregations buckets: j.aggregations
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null, data: null,
buckets:null buckets: null
}; };
} }
}; };
async CommomSearchbyInventor(obj){//根据发明人查询聚合 async CommomSearchbyInventor(obj) {//根据发明人查询聚合
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var inventor = obj.inventor==null?"":obj.inventor; var inventor = obj.inventor == null ? "" : obj.inventor;
if(inventor==""){ if (inventor == "") {
return {status:-1,msg:"传入的发明人信息为空",data:null,buckets:null}; return { status: -1, msg: "传入的发明人信息为空", data: null, buckets: null };
} }
var params= { var params = {
"query": { "query": {
"bool": { "bool": {
"must": [] "must": []
...@@ -698,30 +698,30 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -698,30 +698,30 @@ class ChinaPatentSearchApi extends ApiBase{
], ],
"aggregations": { "aggregations": {
"group_by_pub_type": { "group_by_pub_type": {
"terms": { "terms": {
"field": "pub_type", "field": "pub_type",
"size": 1000 "size": 1000
} }
}, },
"group_by_pub_status": { "group_by_pub_status": {
"terms": { "terms": {
"field": "pub_status", "field": "pub_status",
"size": 1000 "size": 1000
} }
}, },
"group_by_filing_year": { "group_by_filing_year": {
"terms": { "terms": {
"field": "filing_year", "field": "filing_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
}, },
"group_by_pub_year": { "group_by_pub_year": {
"terms": { "terms": {
"field": "pub_year", "field": "pub_year",
"size": 1000, "size": 1000,
"order":{"_term":"desc"} "order": { "_term": "desc" }
} }
} }
} }
}; };
...@@ -729,85 +729,85 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -729,85 +729,85 @@ class ChinaPatentSearchApi extends ApiBase{
var param = { var param = {
"query_string": { "query_string": {
"default_field": "inventor_name", "default_field": "inventor_name",
"query": "\""+ inventor +"\"" "query": "\"" + inventor + "\""
} }
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
var pubtype=obj.pubtype==null?"":obj.pubtype;//专利类型 var pubtype = obj.pubtype == null ? "" : obj.pubtype;//专利类型
if (pubtype != null && pubtype != ""){ if (pubtype != null && pubtype != "") {
param = { param = {
"term": { "term": {
"pub_type": pubtype "pub_type": pubtype
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubstatus = obj.pubstatus==null?"":obj.pubstatus;//法律状态 var pubstatus = obj.pubstatus == null ? "" : obj.pubstatus;//法律状态
if (pubstatus != null && pubstatus != ""){ if (pubstatus != null && pubstatus != "") {
param = { param = {
"term": { "term": {
"pub_status": pubstatus "pub_status": pubstatus
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingyear = obj.filingyear==null?"":obj.filingyear;//申请年份 var filingyear = obj.filingyear == null ? "" : obj.filingyear;//申请年份
if (filingyear != null && filingyear !=""){ if (filingyear != null && filingyear != "") {
param = { param = {
"term": { "term": {
"filing_year": filingyear "filing_year": filingyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubyear = obj.pubyear==null?"":obj.pubyear;//公开年份 var pubyear = obj.pubyear == null ? "" : obj.pubyear;//公开年份
if (pubyear != null && pubyear != ""){ if (pubyear != null && pubyear != "") {
param = { param = {
"term": { "term": {
"pub_year": pubyear "pub_year": pubyear
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return rtn = { return rtn = {
status:0, status: 0,
msg:"操作成功", msg: "操作成功",
data:j.hits, data: j.hits,
buckets:j.aggregations buckets: j.aggregations
}; };
}catch(e){ } catch (e) {
return rtn={ return rtn = {
status:-1, status: -1,
msg:"操作失败", msg: "操作失败",
data:null, data: null,
buckets:null buckets: null
}; };
} }
}; };
async seniorSearch(obj){//高级检索,根据用户输入的不同多条件进行检索 async seniorSearch(obj) {//高级检索,根据用户输入的不同多条件进行检索
var data=await this.checkKey(obj.appKey); var data = await this.checkKey(obj.appKey);
if(data && data.status && data.status==-1){ if (data && data.status && data.status == -1) {
return data; return data;
} }
var pagesize = obj.pagesize==null?10:obj.pagesize; var pagesize = obj.pagesize == null ? 10 : obj.pagesize;
if(obj.page==null){ if (obj.page == null) {
var from = 0; var from = 0;
}else{ } else {
var from = Number((obj.page-1)*obj.pagesize); var from = Number((obj.page - 1) * obj.pagesize);
} }
var params = { var params = {
...@@ -835,37 +835,37 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -835,37 +835,37 @@ class ChinaPatentSearchApi extends ApiBase{
var param = null; var param = null;
//对关键词 //对关键词
var title=obj.title==null?"":obj.title; var title = obj.title == null ? "" : obj.title;
if (title != null && title != ""){ if (title != null && title != "") {
param ={ param = {
"match": { "match": {
"filing_name": title "filing_name": title
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var abstr = obj.abstr==null?"":obj.abstr; var abstr = obj.abstr == null ? "" : obj.abstr;
if (abstr != null && abstr != ""){ if (abstr != null && abstr != "") {
param ={ param = {
"match": { "match": {
"abstr_text": abstr "abstr_text": abstr
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var filingno=obj.filingno==null?"":obj.filingno; var filingno = obj.filingno == null ? "" : obj.filingno;
if(filingno!=null && filingno!=""){ if (filingno != null && filingno != "") {
filingno = filingno.replace("CN","").replace("cn","").replace(".",""); filingno = filingno.replace("CN", "").replace("cn", "").replace(".", "");
if (filingno.length == 13){ if (filingno.length == 13) {
filingno = filingno.substr(0,12); filingno = filingno.substr(0, 12);
} }
else if (filingno.length == 9){ else if (filingno.length == 9) {
filingno = filingno.substr(0,8); filingno = filingno.substr(0, 8);
} }
param= { param = {
"term": { "term": {
"filing_no": filingno "filing_no": filingno
} }
...@@ -873,12 +873,12 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -873,12 +873,12 @@ class ChinaPatentSearchApi extends ApiBase{
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var pubno=obj.pubno==null?"":obj.pubno; var pubno = obj.pubno == null ? "" : obj.pubno;
if (pubno!=null && pubno!=""){ if (pubno != null && pubno != "") {
param = { param = {
"bool": { "bool": {
"should": [ "should": [
] ]
} }
} }
...@@ -898,15 +898,15 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -898,15 +898,15 @@ class ChinaPatentSearchApi extends ApiBase{
params.query.bool.must.push(param); params.query.bool.must.push(param);
} }
var priorno=obj.priorno==null?"":obj.priorno; var priorno = obj.priorno == null ? "" : obj.priorno;
if (priorno != null && priorno != ""){ if (priorno != null && priorno != "") {
param= { param = {
"nested": { "nested": {
"path": "prior_info", "path": "prior_info",
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{ "term": { "prior_info.pri_no": priorno}} { "term": { "prior_info.pri_no": priorno } }
] ]
} }
} }
...@@ -915,27 +915,27 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -915,27 +915,27 @@ class ChinaPatentSearchApi extends ApiBase{
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var appl=obj.applname==null?"":obj.applname; var appl = obj.applname == null ? "" : obj.applname;
if (appl!=null && appl!=""){ if (appl != null && appl != "") {
param= { param = {
"term": { "term": {
"applicant_name.raw": appl "applicant_name.raw": appl
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var inv=obj.invname==null?"":obj.invname; var inv = obj.invname == null ? "" : obj.invname;
if (inv!=null && inv!=""){ if (inv != null && inv != "") {
param= { param = {
"term": { "term": {
"inventor_name.raw": inv "inventor_name.raw": inv
} }
} }
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
var ipc=obj.ipcno==null?"":obj.ipcno; var ipc = obj.ipcno == null ? "" : obj.ipcno;
if (ipc!=null && ipc!=""){ if (ipc != null && ipc != "") {
var param= { var param = {
"term": { "term": {
"other_ipc": ipc "other_ipc": ipc
} }
...@@ -943,102 +943,150 @@ class ChinaPatentSearchApi extends ApiBase{ ...@@ -943,102 +943,150 @@ class ChinaPatentSearchApi extends ApiBase{
params.query.bool.must.push(param) params.query.bool.must.push(param)
} }
if(obj.filingdate1!=null && obj.filingdate1!=""){ if (obj.filingdate1 != null && obj.filingdate1 != "") {
var filingdate1=obj.filingdate1; var filingdate1 = obj.filingdate1;
} }
else { else {
var filingdate1 =""; var filingdate1 = "";
} }
if(obj.filingdate2!=null && obj.filingdate2!=""){ if (obj.filingdate2 != null && obj.filingdate2 != "") {
var filingdate2=obj.filingdate2; var filingdate2 = obj.filingdate2;
} }
else { else {
var filingdate2 = ""; var filingdate2 = "";
} }
if (filingdate1!="" || filingdate2!=""){ if (filingdate1 != "" || filingdate2 != "") {
param={ param = {
"range": { "range": {
"filing_time": { "filing_time": {
} }
} }
}; };
if (filingdate1!=""){ if (filingdate1 != "") {
param.range.filing_time["gte"]=filingdate1; param.range.filing_time["gte"] = filingdate1;
} }
if (filingdate2!=""){ if (filingdate2 != "") {
param.range.filing_time["lte"]=filingdate2; param.range.filing_time["lte"] = filingdate2;
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
} }
if(obj.pubdate1!=null && obj.pubdate1!=""){ if (obj.pubdate1 != null && obj.pubdate1 != "") {
var pubdate1=obj.pubdate1; var pubdate1 = obj.pubdate1;
} }
else { else {
var pubdate1 =""; var pubdate1 = "";
} }
if(obj.pubdate2!=null && obj.pubdate2!=""){ if (obj.pubdate2 != null && obj.pubdate2 != "") {
var pubdate2=obj.pubdate2; var pubdate2 = obj.pubdate2;
} }
else { else {
var pubdate2 = ""; var pubdate2 = "";
} }
if (pubdate1!="" || pubdate2!=""){ if (pubdate1 != "" || pubdate2 != "") {
param={ param = {
"range": { "range": {
"pub_time": { "pub_time": {
} }
} }
}; };
if (pubdate1!=""){ if (pubdate1 != "") {
param.range.pub_time["gte"]=pubdate1; param.range.pub_time["gte"] = pubdate1;
} }
if (pubdate2!=""){ if (pubdate2 != "") {
param.range.pub_time["lte"]=pubdate2; param.range.pub_time["lte"] = pubdate2;
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
} }
if(obj.grdate1!=null && obj.grdate1!=""){ if (obj.grdate1 != null && obj.grdate1 != "") {
var grdate1=obj.grdate1; var grdate1 = obj.grdate1;
} }
else { else {
var grdate1 =""; var grdate1 = "";
} }
if(obj.grdate2!=null && obj.grdate2!=""){ if (obj.grdate2 != null && obj.grdate2 != "") {
var grdate2=obj.grdate2; var grdate2 = obj.grdate2;
} }
else { else {
var grdate2 = ""; var grdate2 = "";
} }
if (grdate1!="" || grdate2!=""){ if (grdate1 != "" || grdate2 != "") {
param={ param = {
"range": { "range": {
"gr_time": { "gr_time": {
} }
} }
}; };
if (grdate1!=""){ if (grdate1 != "") {
param.range.gr_time["gte"]=grdate1; param.range.gr_time["gte"] = grdate1;
} }
if (grdate2!=""){ if (grdate2 != "") {
param.range.gr_time["lte"]=grdate2; param.range.gr_time["lte"] = grdate2;
} }
params.query.bool.must.push(param); params.query.bool.must.push(param);
} }
var rc=System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn=null; var rtn = null;
var requrl = this.patentUrl; var requrl = this.patentUrl;
try{ try {
rtn=await rc.execPost(params,requrl); rtn = await rc.execPost(params, requrl);
var j=JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
return System.getResult2(j.hits,null); return System.getResult2(j.hits, null);
}catch(e){ } catch (e) {
return rtn=System.getResult2(null,null); return rtn = System.getResult2(null, null);
} }
}; };
async patentSearch(obj) {//根据条件检索
var params = {
"query": {
"bool": {
"must": []
}
},
"from": 0,
"size": 200
};
for (var x in obj) {
params.query.bool.must.push(obj[x]);
};
var rc = System.getObject("util.execClient");
var rtn = null;
var requrl = this.patentUrl;
try {
rtn = await rc.execPost(params, requrl);
// console.log("jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj" + rtn.stdout);
var j = JSON.parse(rtn.stdout);
if (j.hits.hits.length > 0){
return rtn = {
status: 0,
msg: "操作成功",
data: j.hits.hits
};
}
else{
return rtn = {
status: -1,
msg: "检索结果为空",
data: null
};
}
} catch (e) {
return rtn = {
status: -1,
msg: "操作失败",
data: null
};
}
};
} }
module.exports = ChinaPatentSearchApi; module.exports = ChinaPatentSearchApi;
...@@ -14,8 +14,79 @@ class PatentycCtl extends CtlBase { ...@@ -14,8 +14,79 @@ class PatentycCtl extends CtlBase {
async patentrank(pobj,obj,req){ async patentrank(pobj,obj,req){
var result = await this.service.patentrank(obj); var result = await this.service.patentrank(obj);
return System.getResult2(result,null); return System.getResult2(result,null);
} }
//对比分析
async webInsight(pobj,obj,req){
if (obj.type && obj.type != 'undefined'){
var result = await this.service.webInsight(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
else{
return System.getErrResult2("参数type不能为空");
}
}
//智能组合分析-上传数据
async ezReportUploadData(pobj,obj,req){
try{
var result = await this.service.ezReportUploadData(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
//智能组合分析-判断报告是否生成,用于轮询
async ReadyReport(pobj,obj,req){
if (obj.uid && obj.uid != 'undefined'){
try{
var result = await this.service.ReadyReport(obj);
return System.getResult2(result);
}
catch(error){
return System.getErrResult2(error);
}
}
else{
return System.getErrResult2("参数uid不能为空");
}
}
//智能组合分析-获取报告
async ezGetReport(pobj,obj,req){
if (obj.uid && obj.uid != 'undefined' && obj.type && obj.type != 'undefined'){
try{
var result = await this.service.ezGetReport(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
else{
return System.getErrResult2("参数type和uid不能为空");
}
}
//专利价值评价报告 //专利价值评价报告
async obtainreport(pobj,obj,req){ async obtainreport(pobj,obj,req){
var result = await this.service.obtainreport(obj); var result = await this.service.obtainreport(obj);
......
const System = require("../../system"); const System = require("../../system");
const ServiceBase = require("../sve.base"); const ServiceBase = require("../sve.base");
const querystring = require('querystring'); const querystring = require('querystring');
const UUID = require('uuid');
const soap = require('soap');
class PatentycService extends ServiceBase { class PatentycService extends ServiceBase {
constructor() { constructor() {
super(ServiceBase.getDaoName(PatentycService)); super(ServiceBase.getDaoName(PatentycService));
...@@ -8276,6 +8278,266 @@ class PatentycService extends ServiceBase { ...@@ -8276,6 +8278,266 @@ class PatentycService extends ServiceBase {
}; };
async webInsight(obj){//对比分析
if (obj.type == "同族对比"){
return "http://118.24.142.85:81/WebInsight/HTreeTwo.aspx?method=同族对比";
}
else if (obj.type == "引文对比"){
return "http://118.24.142.85:81/WebInsight/HTreeTwo.aspx?method=引文对比";
}
else if (obj.type == "权利要求对比"){
return "http://118.24.142.85:81/WebInsight/HTreeTwo.aspx?method=权利要求对比";
}
else{
return null;
}
}
async ezReportUploadData(obj){//智能组合分析-上传数据
//var rearray = await this.prasecondition(obj, "");
//var capilist = rearray[0];
var capilist = [{"term":{"province_name":"北京市"}}];
if (capilist.length > 0) {
var tms = await this.GsbByChinaPatentSearchApi.patentSearch(capilist);//获取查询结果
// console.log("-----------------------------------------" + JSON.stringify(tms));
if (tms.status == 0) {
//zuochuli
var noteStr = "";
tms.data.forEach(element => {
// console.log("-----------------------------------------" + JSON.stringify(element));
noteStr = noteStr + "%N " + element._source.filing_no + "\r\n";//申请号
noteStr = noteStr + "%0 Patent\r\n";
noteStr = noteStr + "%T " + element._source.filing_name + "\r\n";//标题
//发明人
var invStr = "";
for (var i =0; i < element._source.inventor_name.length; i++){
if (i ==0){
invStr = element._source.inventor_name[i];
}
else{
invStr = invStr + ";" + element._source.inventor_name[i];
}
}
if (invStr){
noteStr = noteStr + "%A " + invStr + "\r\n";
}
else{
noteStr = noteStr + "%A \r\n";
}
//申请人
var applStr = "";
for (var i =0; i < element._source.applicant_name.length; i++){
if (i ==0){
applStr = element._source.applicant_name[i];
}
else{
applStr = applStr + ";" + element._source.applicant_name[i];
}
}
if (applStr){
noteStr = noteStr + "%+ " + applStr + "\r\n";
}
else{
noteStr = noteStr + "%+ \r\n";
}
//省份
if (element._source.province_name && element._source.province_name != 'undefined'){
noteStr = noteStr + "%P " + element._source.province_name + "\r\n";
}
else{
noteStr = noteStr + "%P \r\n";
}
//国别
if (element._source.country_code && element._source.country_code != 'undefined'){
var code = element._source.country_code;
if (Number(code) >=0 && Number(code) <= 99){
code = "CN";
}
noteStr = noteStr + "%P " + code + "\r\n";
}
else{
noteStr = noteStr + "%P \r\n";
}
noteStr = noteStr + "%J CN\r\n";//专利受理国家
//keyword
if (element._source.key_word){
var keyword = "";
for (var i =0; i < element._source.key_word.length; i++){
if (i ==0){
keyword = element._source.key_word[i];
}
else{
keyword = keyword + ";" + element._source.key_word[i];
}
}
if (keyword){
noteStr = noteStr + "%K " + keyword + "\r\n";
}
else{
noteStr = noteStr + "%K \r\n";
}
}
noteStr = noteStr + "%F \r\n";
noteStr = noteStr + "%X \r\n";
noteStr = noteStr + "%D " + element._source.filing_time + "\r\n";
noteStr = noteStr + "%O \r\n";
noteStr = noteStr + "%V \r\n";
//ipc
if (element._source.other_ipc){
var ipc = "";
for (var i =0; i < element._source.other_ipc.length; i++){
if (i ==0){
ipc = element._source.other_ipc[i];
}
else{
ipc = ipc + ";" + element._source.other_ipc[i];
}
}
if (ipc){
noteStr = noteStr + "C1 " + ipc + "\r\n";
}
else{
noteStr = noteStr + "C1 \r\n";
}
}
noteStr = noteStr + "C2 \r\n";
noteStr = noteStr + "C3 " + element._source.pub_type + "\r\n";
if (element._source.pub_status_now){
noteStr = noteStr + "C4 " + element._source.pub_status_now + "\r\n";
}
else{
noteStr = noteStr + "C4 \r\n";
}
noteStr = noteStr + "%R \r\n";
noteStr = noteStr + "\r\n";
});
//调服务
var bytes = [];
var buff = Buffer.from(noteStr,"utf8");
for(var i= 0; i< buff.length; i++){
var byteint = buff[i];
bytes.push(byteint);
}
var strToBase64 = Buffer.from(noteStr).toString('base64');
//console.log("Base64-----------------------------------------" + strToBase64);
var uid = UUID.v1();
// console.log("uid-----------------------------------------" + uid);
var url = 'http://118.24.142.85:81/ezReportApi.asmx?wsdl';
var args = {
data:strToBase64,
guid:uid,
product:"pmx",
ext:".txt",
language:"CN",
segment:";",
encode:"UTF8",
techfield:"",
searchcondition:"",
filter:"pmx-patent",
temple:"pmx-patent.temple",
useremail:""
//"product":
};
// var options = {
// // "ignoredNamespaces": {
// // "namespaces": [],
// // "override": true
// // }
// "forceSoap12Headers": true
// };
// var wsdlOptions = {
// "overrdeRootElement": {
// "namespace": "xmlns:tns",
// "xmlnsAttributes": [{
// "name": "xmlns:ns",
// "value": "http://www.yourCompany.com"
// }]
// }
// };
soap.createClient(url, function(err, client) {
client.UploadData(args, function(err, result) {
if (err) {
console.log("err----------" + err);
return {};
}else {
console.log("result-------------" + JSON.stringify(result));
return {
"result":result,
"uid":uid
}
}
});
});
}
else{
return {};
}
}
else{
return {};
}
};
async ReadyReport(obj){//判断报告是否生成,用于轮询
var url = 'http://118.24.142.85:81/ezReportApi.asmx?wsdl';
var args = {
guid:obj.uid
};
soap.createClient(url, function(err, client) {
client.ReadyReport(args, function(err, result) {
if (err) {
console.log("err----------" + err);
return {};
}else {
console.log("result-------------" + JSON.stringify(result));
return {
"result":result,
"uid":obj.uid
}
}
});
});
};
async ezGetReport(obj){//获取报告
var url = ""
var args = {
guid:obj.uid
};
if (obj.type == "word"){
url = 'http://118.24.142.85:81/ezGet.aspx';
}
else if (obj.type == "excel"){
url = 'http://118.24.142.85:81/ezGet.aspx';
args.type=xlsx;
}
else if (obj.type == "html"){
url = 'http://118.24.142.85:81/ezReportPicture.aspx';
}
if (url){
var rc = System.getObject("util.execClient");
var rtn = await rc.execPost(args, url);
var j = JSON.parse(rtn.stdout);
return j;
}
else{
return null;
}
}
async aliTrendGr(obj){//区域专利监控首页 - 趋势详情-授权 async aliTrendGr(obj){//区域专利监控首页 - 趋势详情-授权
var year=obj.year==null?"":obj.year; var year=obj.year==null?"":obj.year;
var type = obj.type==null?"":obj.type; var type = obj.type==null?"":obj.type;
...@@ -9133,7 +9395,7 @@ class PatentycService extends ServiceBase { ...@@ -9133,7 +9395,7 @@ class PatentycService extends ServiceBase {
} }
module.exports = PatentycService; module.exports = PatentycService;
var task = new PatentycService(); var task = new PatentycService();
var obj={type:"4",areaname:"海淀区"}; var obj={"uid":"5c85c50a-c57c-401c-b534-2a78facd0d0d"};
task.aliplace(obj).then(d=>{ task.ezReportUploadData(obj).then(d=>{
console.log(d); console.log(d);
}) })
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
"gulp-tap": "^1.0.1", "gulp-tap": "^1.0.1",
"imagemin-pngquant": "^7.0.0", "imagemin-pngquant": "^7.0.0",
"merge-stream": "^2.0.0", "merge-stream": "^2.0.0",
"minimist": "^1.2.0" "minimist": "^1.2.0",
"soap": "^0.31.0"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment