Commit a2bacff2 by 任晓松

update

parent c3caf3a4
......@@ -36,6 +36,9 @@ class IcbcToolsAPI extends WEBBase {
case "getCompanyIcpByName"://工商icp证照查询
opResult = await this.icbcSve.getCompanyIcpByName(action_body, req);
break;
case "searchCertification"://企业证书查询
opResult = await this.icbcSve.searchCertification(action_body,req);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -6,6 +6,7 @@ class IcbcService extends AppServiceBase {
constructor() {
super();
this.zcApiUrl = settings.reqZcApi();
this.certificationUrl = settings.certificationUrl();
}
//企业模糊查询
async getCompanyListByVague(obj, req) {
......@@ -28,6 +29,22 @@ class IcbcService extends AppServiceBase {
return await this.opReqResult(url, queryobj, req);
}
//企业证书查询
async searchCertification(queryobj, req) {
if(!queryobj.companyName){
return system.getResultFail(-1,'companyName can not be empty');
}
let url = this.certificationUrl + "gsb/SearchCertification";
let data = {
"company_name":queryobj.companyName,
"pageSize":20,
"pageIndex":1,
"isExactlySame":"True"
}
return await this.opReqResult(url, data, req);
}
async opReqResult(reqUrl, queryobj, req) {
var rtn = await this.execClient.execPushDataPost(queryobj, reqUrl, req.headers["token"], req.headers["request-id"]);
var data = JSON.parse(rtn.stdout);
......
......@@ -176,6 +176,13 @@ var settings = {
return "http://43.247.184.94:7200/";
}
},
certificationUrl:function () {
if (this.env == "dev") {
return "http://43.247.184.92:15506/";//
} else {
return "http://43.247.184.92:15506/";
}
},
reqZcApi: function () {
if (this.env == "dev") {
return "http://zcapi.apps.com:4002/";//localsettings.reqEsDevUrl;
......
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