Commit 21b28bcf by 王栋源

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

parents f17c9d59 80e8813e
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class OpNeed extends APIBase {
constructor() {
super();
this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
this.centerorderSve = system.getObject("service.common.centerorderSve");
}
/**
* 接口跳转-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.actionProcess, pobj.actionType, pobj.actionBody, req);
return result;
}
async opActionProcess(pobj, action_process, action_type, action_body, req) {
pobj.requestId = req.requestId;
var self = this;
var opResult = null;
switch (action_type) {
case "submitNeed"://提交需求
opResult = await this.utilsNeedSve.submitNeed(pobj, pobj.actionBody);
break;
// case "submitNeed"://需求列表
// opResult = await this.utilsNeedSve.submitNeed(pobj, pobj.actionBody);
// break;
case "needClose"://关闭需求
opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody);
break;
case "needDetailByChannelNo"://需求详情--包含方案
opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody);
break;
// case "getItemByChannelNeedNo"://方案反馈
// opResult = await this.utilsNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
// break;
// case "receiveFeedback"://关闭方案
// opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
// break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = OpNeed;
\ No newline at end of file
......@@ -29,12 +29,13 @@ class Need extends APIBase {
var self = this;
var opResult = null;
switch (action_type) {
case "submitNeedH5"://提交需求----del
opResult = await this.utilsNeedSve.submitNeedH5(pobj, pobj.actionBody);
break;
//--------------------------------------跟ali合作---------------------------
case "submitNeed"://提交需求
opResult = await this.utilsNeedSve.submitNeed(pobj, pobj.actionBody);
break;
case "submitNeedH5"://提交需求
opResult = await this.utilsNeedSve.submitNeedH5(pobj, pobj.actionBody);
break;
case "needClose"://关闭需求
opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody);
break;
......
......@@ -3,7 +3,7 @@ var settings = require("../../../../config/settings");
const AppServiceBase = require("../../app.base");
const fs = require("fs");
const { json } = require("sequelize");
//需求操作类
//需求操作类----ali对接的需求
class UtilsNeedService extends AppServiceBase {
constructor() {
super();
......@@ -52,21 +52,6 @@ class UtilsNeedService extends AppServiceBase {
} else {
pobj.actionBody.type = "ali.edi";
}
// // 2020 0806 lin 新增推送
// var reqParams = {
// actionType: "produceData",// Y 功能名称
// actionBody: {
// pushUrl: interface_params_info.pushUrl,// Y 推送地址
// actionType: "addChance",// Y 推送地址接收时的功能名称
// notifyUrl: "",// N 推送成功后通知的Url
// identifyCode: "ali.vat",// Y 操作的业务标识
// messageBody: pobj.actionBody, // Y 推送的业务消息,必须有一项对象属性值
// headData: ""//N 请求头信息,Json格式,如:{token:"XXXXXXX"}
// },
// requestId: pobj.requestId || "" // N 请求id
// }
// this.opQueuePushClientPost(pobj, this.opPushQueueUrl, reqParams);
var reqParams = {
actionBody: pobj.actionBody,
appInfo: pobj.appInfo
......@@ -102,7 +87,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 提交需求
* 提交需求-----del
* @param {*} pobj
* @param {*} actionBody
*/
......@@ -112,11 +97,11 @@ class UtilsNeedService extends AppServiceBase {
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var rtn = await this.execClient.execPost(sobj, url);
if (!rtn || !rtn.stdout) {
return system.getResultFail(-5015, "需求型查询失败");
return system.getResultFail(-5015, "需求型查询失败");
}
var data = JSON.parse(rtn.stdout);
if (data.status != 0) {
return system.getResultFail(-5015, "需求型查询失败");
return system.getResultFail(-5015, "需求型查询失败");
}
pobj.actionBody.type_code = data.data.type_code;
pobj.actionBody.type_name = data.data.type_name;
......@@ -141,18 +126,6 @@ class UtilsNeedService extends AppServiceBase {
return result;
}
// //调用center-order icp需求反馈
// async reqCenterOrderApi(pobj, reqUrl) {
// var url = this.centerOrderUrl + "action/icpapi/springBoard";
// if (reqUrl) {
// var url = this.centerOrderUrl + reqUrl;
// }
// pobj.actionType = "receiveIcpFeedback";
// var rtn = await this.execClient.execPost(pobj, url);
// var data = JSON.parse(rtn.stdout);
// return data;
// }
/**
* 获取需求详情
* @param {*} pobj
......
......@@ -77,26 +77,50 @@
"status": 0,
"msg": "success",
"data": {
"companyProvince": "北京",
"city": "朝阳区",
"name": "北京创知厚德科技有限公司",
"legalRepresentative": "王静波",
"registrID": "110105021672563",
"companyOrgType": "有限责任公司(法人独资)",
"businessAddress": "北京市朝阳区建国路15号院甲1号北岸1292三间房创意生活园区8号楼2层363",
"foundedTime": "2016-7-20",
"businessTerm": "2016-7-20至2036-7-19",
"scope": "技术开发、技术咨询、技术服务;商标代理;版权贸易;经济贸易咨询;企业策划;设计、制作、代理、发布广告;市场调查;企业管理咨询;组织文化艺术交流活动(不含演出);承办展览展示活动;影视策划;翻译服务;酒店管理;销售文具用品、体育用品、机械设备、五金交电(不从事实体店铺经营)、电子产品、通讯设备、计算机、软件及辅助设备;工程和技术研究;计算机系统服务;基础软件服务;应用软件服务(不含医用软件);软件开发;出租办公用房;机动车公共停车场服务;会议服务;房地产信息咨询;房地产开发;物业管理。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)",
"registerOffice": "北京市工商行政管理局朝阳分局",
"dateIssue": "2020-3-27",
"managementState": "存续",
"registeredCapital": "100.000万人民币",
"foundedTime": "",
"creditCode": "91110105MA00723E4F",
"registrID": "110105021672563",
"organizationCode": "MA00723E4",
"creditCode": "91110105MA00723E4F",
"companyCate1": "科学研究和技术服务业",
"companyCate2": "科技推广和应用服务业",
"companyCate3": "技术推广服务",
"companyType": "0",
"registerOffice": "北京市工商行政管理局朝阳分局",
"businessAddress": "北京市朝阳区创远路36号院10号楼1层102",
"scope": "技术开发、技术咨询、技术服务;商标代理;版权贸易;经济贸易咨询;企业策划;设计、制作、代理、发布广告;市场调查;企业管理咨询;组织文化艺术交流活动(不含演出);承办展览展示活动;影视策划;翻译服务;酒店管理;销售文具用品、体育用品、机械设备、五金交电(不从事实体店铺经营)、电子产品、通讯设备、计算机、软件及辅助设备;工程和技术研究;计算机系统服务;基础软件服务;应用软件服务(不含医用软件);软件开发;出租办公用房;机动车公共停车场服务;会议服务;房地产信息咨询;房地产开发;物业管理。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)",
"dateIssue": "2018-3-9",
"companyProvince": "北京",
"companyOrgType": "有限责任公司",
"businessTerm": "2016-7-20至2036-7-19",
"requestId": "a4e2b6fdd079427a9291f491058987e3"
"requestId": "9cdb71c4327d44bbb13e6f4e955c5caa"
},
"requestId": "a66073a67d454559a10f2961c83ace37"
"requestId": "89ca862c97204518843d3a03380d9227"
}
参数说明:
companyProvince   :省份
city   :市或区
name   :公司名称
legalRepresentative   :法人
registrID   :工商注册号
companyOrgType   :公司类型
businessAddress   :注册地址
foundedTime   :成立时间
businessTerm  :营业期限_开始 至 营业期限_结束
scope   :经营范围
registerOffice   :登记机关
dateIssue   :核准时间
managementState   :经营状态
registeredCapital :注册资本/注册资本_单位
organizationCode :组织机构代码
creditCode :统一社会信用代码
companyCate1 :行业大类一类
companyCate2 :行业大类二类
companyCate3 :行业大类三类
```
......
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