Commit a4eb726c by linboxuan

submitIcpIntention,queryIntentionList,confirmIcpIntention add

parents 9ada1384 53f2c7c0
var WEBBase = require("../../web.base");
var system = require("../../../system");
class IcbcToolsAPI extends WEBBase {
constructor() {
super();
this.icbcSve = system.getObject("service.trademark.icbcSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, pobj.actionBody, req);
return result;
}
async opActionProcess(pobj, action_type, action_body, req) {
var opResult = null;
switch (action_type) {
case "getCompanyListByVague"://企业模糊查询
opResult = await this.icbcSve.getCompanyListByVague(action_body, req);
break;
case "getDetailByCompanyName"://企业详情
opResult = await this.icbcSve.getDetailByCompanyName(action_body, req);
break;
case "getCompanyChangeByName"://企业变更记录查询
opResult = await this.icbcSve.getCompanyChangeByName(action_body, req);
break;
case "getCompanyIcpByName"://工商icp证照查询
opResult = await this.icbcSve.getCompanyIcpByName(action_body, req);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = IcbcToolsAPI;
\ No newline at end of file
const system = require("../../../system");
var settings = require("../../../../config/settings");
const AppServiceBase = require("../../app.base");
class IcbcService extends AppServiceBase {
constructor() {
super();
this.zcApiUrl = settings.reqZcApi();
}
//企业模糊查询
async getCompanyListByVague(obj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getCompanyListByVague";
return await this.opReqResult(url, obj, req);
}
//企业详情
async getDetailByCompanyName(queryobj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getDetailByCompanyName";
return await this.opReqResult(url, queryobj, req);
}
//企业变更记录查询
async getCompanyChangeByName(queryobj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getCompanyChangeByName";
return await this.opReqResult(url, queryobj, req);
}
//工商icp证照查询
async getCompanyIcpByName(queryobj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getCompanyIcpByName";
return await this.opReqResult(url, queryobj, 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);
return data;
}
}
module.exports = IcbcService;
...@@ -16,7 +16,7 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -16,7 +16,7 @@ class utilsDeliverSve extends AppServiceBase{
*/ */
async pushTmReDeliver(pobj){ async pushTmReDeliver(pobj){
try{ try{
var verifyResult = await this.verifyParam(pobj); var verifyResult = await this.verifyParam(pobj.actionBody);
if(verifyResult.status !=0){ if(verifyResult.status !=0){
return system.getResultFail(); return system.getResultFail();
} }
...@@ -35,14 +35,13 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -35,14 +35,13 @@ class utilsDeliverSve extends AppServiceBase{
* @returns {Promise<{msg: *, data, status: number}>} * @returns {Promise<{msg: *, data, status: number}>}
*/ */
async verifyParam(actionBody) { async verifyParam(actionBody) {
let verify = system.getResultSuccess();
let deliveryData =""; let deliveryData ="";
let orderNo = ""; let orderNo = "";
let tradeStatus = ''; let tradeStatus = '';
let applicant ={}; let applicant ={};
if(actionBody.delivery_content){ if(actionBody.delivery_content){
deliveryData = actionBody.delivery_content[0].deliveryContent; deliveryData = actionBody.delivery_content;
orderNo = actionBody.delivery_content[0].sourceOrderNo; orderNo = actionBody.order_info.orderNo;
} }
if(actionBody.deliveryData){ if(actionBody.deliveryData){
deliveryData = actionBody.deliveryData; deliveryData = actionBody.deliveryData;
...@@ -89,8 +88,8 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -89,8 +88,8 @@ class utilsDeliverSve extends AppServiceBase{
askForData:deliveryData.askForData, askForData:deliveryData.askForData,
supData:deliveryData.supData supData:deliveryData.supData
} }
verify.data = postData;
return verify; return system.getResultSuccess(postData);
} }
/** /**
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
## 1. 工商检索相关接口 ## 1. 工商检索相关接口
  1 [工商检索中心](doc/api/opTrademark/icbcSearch.md)   1 [工商检索中心](doc/api/opTrademark/icbcSearch.md)
  2 [数据中心工商接口](doc/api/opTrademark/newicbcSearch.md)
## 2. 商标检索相关接口 ## 2. 商标检索相关接口
  1 [商标检索中心](doc/api/opTrademark/tmSearch.md)   1 [商标检索中心](doc/api/opTrademark/tmSearch.md)
......
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