Commit 3e28f572 by 任晓松

数据中心工商接口

parent b44426b6
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(req.app, action_body.opStr);
break;
case "getDetailByCompanyName"://企业详情
opResult = await this.icbcSve.getDetailByCompanyName(req.app, action_body.opStr);
break;
case "getCompanyChangeByName"://企业变更记录查询
opResult = await this.icbcSve.getCompanyChangeByName(req.app, action_body.opStr);
break;
case "getCompanyIcpByName"://工商icp证照查询
opResult = await this.icbcSve.getCompanyIcpByName(req.app, action_body.opStr);
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(obj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getDetailByCompanyName";
return await this.opReqResult(url, queryobj, req);
}
//企业详情
async getNclByLikeNameAndNcl(queryobj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getNclByLikeNameAndNcl";
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);
}
}
module.exports = IcbcService;
......@@ -7,6 +7,8 @@
## 1. 工商检索相关接口
  1 [工商检索中心](doc/api/opTrademark/icbcSearch.md)
  2 [数据中心工商接口](doc/api/opTrademark/newicbcSearch.md)
## 2. 商标检索相关接口
  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