Commit 6aadfce9 by linboxuan

Merge branch 'center-channel' of http://gitlab.gongsibao.com/jiangyong/zhichan into center-channel

parents 14715ebc 97494aaf
...@@ -36,6 +36,9 @@ class IcbcToolsAPI extends WEBBase { ...@@ -36,6 +36,9 @@ class IcbcToolsAPI extends WEBBase {
case "getCompanyIcpByName"://工商icp证照查询 case "getCompanyIcpByName"://工商icp证照查询
opResult = await this.icbcSve.getCompanyIcpByName(action_body, req); opResult = await this.icbcSve.getCompanyIcpByName(action_body, req);
break; break;
case "searchCertification"://企业证书查询
opResult = await this.icbcSve.searchCertification(action_body,req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -6,6 +6,7 @@ class IcbcService extends AppServiceBase { ...@@ -6,6 +6,7 @@ class IcbcService extends AppServiceBase {
constructor() { constructor() {
super(); super();
this.zcApiUrl = settings.reqZcApi(); this.zcApiUrl = settings.reqZcApi();
this.certificationUrl = settings.certificationUrl();
} }
//企业模糊查询 //企业模糊查询
async getCompanyListByVague(obj, req) { async getCompanyListByVague(obj, req) {
...@@ -28,6 +29,26 @@ class IcbcService extends AppServiceBase { ...@@ -28,6 +29,26 @@ class IcbcService extends AppServiceBase {
return await this.opReqResult(url, queryobj, req); 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"
}
let result = await this.opReqResult(url, data, req);
if(result.Status != 200){
return system.getResultFail(-1,'查询失败');
}
return system.getResult(result.Result);
}
async opReqResult(reqUrl, queryobj, req) { async opReqResult(reqUrl, queryobj, req) {
var rtn = await this.execClient.execPushDataPost(queryobj, reqUrl, req.headers["token"], req.headers["request-id"]); var rtn = await this.execClient.execPushDataPost(queryobj, reqUrl, req.headers["token"], req.headers["request-id"]);
var data = JSON.parse(rtn.stdout); var data = JSON.parse(rtn.stdout);
......
...@@ -176,6 +176,13 @@ var settings = { ...@@ -176,6 +176,13 @@ var settings = {
return "http://43.247.184.94:7200/"; 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 () { reqZcApi: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://zcapi.apps.com:4002/";//localsettings.reqEsDevUrl; return "http://zcapi.apps.com:4002/";//localsettings.reqEsDevUrl;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
1. [企业详情](#getDetailByCompanyName) 1. [企业详情](#getDetailByCompanyName)
1. [企业变更记录查询](#getCompanyChangeByName) 1. [企业变更记录查询](#getCompanyChangeByName)
1. [工商icp证照查询](#getCompanyIcpByName) 1. [工商icp证照查询](#getCompanyIcpByName)
1. [企业资质证书查询](#searchCertification)
## **<a name="getCompanyListByVague"> 企业模糊查询</a>** ## **<a name="getCompanyListByVague"> 企业模糊查询</a>**
[返回到目录](#menu) [返回到目录](#menu)
...@@ -304,4 +305,57 @@ ...@@ -304,4 +305,57 @@
"requestId": "e4e69fac26b74fb7958c0a71fc30d21d" "requestId": "e4e69fac26b74fb7958c0a71fc30d21d"
} }
```
## **<a name="searchCertification"> 企业资质证书查询</a>**
[返回到目录](#menu)
##### URL
[/action/icbcTools/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:searchCertification
``` javascript
{
"companyName":"海南椰利园食品有限公司"
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": [
{
"EndDate": "2020-11-12 00:00:00",
"Id": "69466fbd54a6942f7644d9a8079cad91_6",
"Name": "食品生产许可证",
"No": "SC10646010800036",
"StartDate": "2015-11-13 00:00:00",
"Type": "C_997_91"
},
{
"EndDate": "2014-11-28 00:00:00",
"Id": "e8ee5244-4ffa-4289-ad27-204be9b5ee6d",
"Name": "其他食品(椰纤果)",
"No": "QS460028010044",
"StartDate": "2011-11-22 00:00:00",
"Type": "C_997_95"
},
{
"EndDate": "2014-12-22 00:00:00",
"Id": "a94341c7-5569-4dfd-9ee9-b988e957a5b5",
"Name": "罐头食品(果蔬罐头)",
"No": "QS460009013129",
"StartDate": "2011-11-22 00:00:00",
"Type": "C_997_95"
}
],
"requestId": "e4e69fac26b74fb7958c0a71fc30d21d"
}
``` ```
\ No newline at end of file
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