Commit a6ab7c72 by linboxuan

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

parents 1237f4ca bbfd3a2e
...@@ -5,6 +5,7 @@ class QcAPI extends APIBase { ...@@ -5,6 +5,7 @@ class QcAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.qcCenterOrderSve = system.getObject("service.common.qcCenterOrderSve"); this.qcCenterOrderSve = system.getObject("service.common.qcCenterOrderSve");
this.baseOrderSve = system.getObject("service.common.baseCenterOrderSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
...@@ -26,7 +27,7 @@ class QcAPI extends APIBase { ...@@ -26,7 +27,7 @@ class QcAPI extends APIBase {
opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj, "action/qcapi/springBoard"); opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
break; break;
case "submitIcpProgramme"://icp方案提交 case "submitIcpProgramme"://icp方案提交
opResult = await this.qcCenterOrderSve.submitIcpProgramme(pobj); opResult = await this.baseOrderSve.submitIcpProgramme(pobj);
break; break;
case "receiveProgrammeNo"://接收渠道方案号(测试) case "receiveProgrammeNo"://接收渠道方案号(测试)
opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj); opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj);
...@@ -44,10 +45,10 @@ class QcAPI extends APIBase { ...@@ -44,10 +45,10 @@ class QcAPI extends APIBase {
opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj, "action/qcapi/springBoard"); opResult = await this.qcCenterOrderSve.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
break; break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息 case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.qcCenterOrderSve.serviceProviderSubmitMaterial(pobj); opResult = await this.baseOrderSve.serviceProviderSubmitMaterial(pobj);
break; break;
case "serviceProviderNotification"://交付商通知状态变更 case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.qcCenterOrderSve.serviceProviderNotification(pobj); opResult = await this.baseOrderSve.serviceProviderNotification(pobj);
break; break;
case "closeOrderDelivery"://交付商关闭交付单 case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.qcCenterOrderSve.closeOrderDelivery(pobj); opResult = await this.qcCenterOrderSve.closeOrderDelivery(pobj);
......
...@@ -25,13 +25,13 @@ class QcAPI2 extends APIBase { ...@@ -25,13 +25,13 @@ class QcAPI2 extends APIBase {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "getNeedSolutionDetailByUser"://获取方案详情 case "getNeedSolutionDetailByUser"://获取方案详情
opResult = await this.baseOrderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); opResult = await this.centerorderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
break; break;
case "submitIcpProgramme"://icp方案提交 case "submitIcpProgramme"://icp方案提交
opResult = await this.baseOrderSve.submitIcpProgramme(pobj); opResult = await this.baseOrderSve.submitIcpProgramme(pobj);
break; break;
case "receiveProgrammeNo"://接收渠道方案号(测试) case "receiveProgrammeNo"://接收渠道方案号(测试)
opResult = await this.baseOrderSve.reqCenterOrderApi(pobj); opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
break; break;
// case "submitIcpMaterial"://icp材料提交 // case "submitIcpMaterial"://icp材料提交
// opResult = await this.baseOrderSve.submitIcpMaterial(pobj); // opResult = await this.baseOrderSve.submitIcpMaterial(pobj);
...@@ -40,10 +40,10 @@ class QcAPI2 extends APIBase { ...@@ -40,10 +40,10 @@ class QcAPI2 extends APIBase {
// opResult = await this.baseOrderSve.acceptIcpPartnerNotification(pobj); // opResult = await this.baseOrderSve.acceptIcpPartnerNotification(pobj);
// break; // break;
case "abolishIcpProgramme"://服务商icp方案关闭 case "abolishIcpProgramme"://服务商icp方案关闭
opResult = await this.baseOrderSve.abolishIcpProgramme(pobj); opResult = await this.centerorderSve.abolishIcpProgramme(pobj);
break; break;
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表 case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.baseOrderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); opResult = await this.centerorderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
break; break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息 case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.baseOrderSve.serviceProviderSubmitMaterial(pobj); opResult = await this.baseOrderSve.serviceProviderSubmitMaterial(pobj);
...@@ -52,7 +52,7 @@ class QcAPI2 extends APIBase { ...@@ -52,7 +52,7 @@ class QcAPI2 extends APIBase {
opResult = await this.baseOrderSve.serviceProviderNotification(pobj); opResult = await this.baseOrderSve.serviceProviderNotification(pobj);
break; break;
case "closeOrderDelivery"://交付商关闭交付单 case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.baseOrderSve.closeOrderDelivery(pobj); opResult = await this.centerorderSve.closeOrderDelivery(pobj);
break; break;
// --------- 文网文 --------- // --------- 文网文 ---------
......
...@@ -6,6 +6,8 @@ class Need extends APIBase { ...@@ -6,6 +6,8 @@ class Need extends APIBase {
super(); super();
this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve"); this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
this.centerorderSve = system.getObject("service.common.centerorderSve"); this.centerorderSve = system.getObject("service.common.centerorderSve");
this.utilsNeedSve2 = system.getObject("service.utilsSve.utilsNeedSve2");
} }
/** /**
...@@ -40,7 +42,7 @@ class Need extends APIBase { ...@@ -40,7 +42,7 @@ class Need extends APIBase {
opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody); opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody);
break; break;
case "needCloseIcp"://关闭需求 case "needCloseIcp"://关闭需求
opResult = await this.utilsNeedSve.needCloseIcp(pobj, pobj.actionBody); opResult = await this.utilsNeedSve2.needCloseIcp(pobj, pobj.actionBody);
break; break;
case "needDetailByChannelNo": case "needDetailByChannelNo":
opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody); opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody);
...@@ -68,10 +70,10 @@ class Need extends APIBase { ...@@ -68,10 +70,10 @@ class Need extends APIBase {
} }
break; break;
case "writeCommunicationLog"://icp接收方案反馈信息 case "writeCommunicationLog"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.writeCommunicationLog(pobj); opResult = await this.utilsNeedSve2.writeCommunicationLog(pobj);
break; break;
case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息 case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.queryExpertApplyCommunicationLogs(pobj); opResult = await this.utilsNeedSve2.queryExpertApplyCommunicationLogs(pobj);
break; break;
case "getaliicpProduce"://方案询价 case "getaliicpProduce"://方案询价
opResult = await this.centerorderSve.getaliicpProduce(pobj); opResult = await this.centerorderSve.getaliicpProduce(pobj);
......
...@@ -41,7 +41,7 @@ class Need2 extends APIBase { ...@@ -41,7 +41,7 @@ class Need2 extends APIBase {
opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody); opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody);
break; break;
case "needCloseIcp"://关闭需求 case "needCloseIcp"://关闭需求
opResult = await this.utilsNeedSve.needCloseIcp(pobj, pobj.actionBody); opResult = await this.utilsNeedSve2.needCloseIcp(pobj, pobj.actionBody);
break; break;
case "needDetailByChannelNo": case "needDetailByChannelNo":
opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody); opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody);
......
...@@ -80,7 +80,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -80,7 +80,7 @@ class BaseCenterOrderService extends AppServiceBase {
}; };
//调用center-order //调用center-order
async reqCenterOrderApi(pobj, reqUrl) { async reqCenterOrderApi(pobj, reqUrl) {
var url = this.centerOrderUrl + "action/baseapi/springBoard"; var url = this.centerOrderUrl + "action/qcapi/springBoard";
if (reqUrl) { if (reqUrl) {
var url = this.centerOrderUrl + reqUrl; var url = this.centerOrderUrl + reqUrl;
} }
...@@ -230,24 +230,37 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -230,24 +230,37 @@ class BaseCenterOrderService extends AppServiceBase {
console.log("pushRes++++",pushRes) console.log("pushRes++++",pushRes)
if (pushRes && pushRes.status == 0 && pushRes.data) { if (pushRes && pushRes.status == 0 && pushRes.data) {
var resData = pushRes.data; var resData = pushRes.data;
if (resData.result) { if (resData.planId) {
var reqObj2 = { var reqObj2 = {
actionType: "receiveProgrammeNo", actionType: "receiveProgrammeNo",
appInfo: appInfo, appInfo: appInfo,
actionBody: { actionBody: {
solutionNo: solutionNo, solutionNo: solutionNo,
solutionBizId: resData.result solutionBizId: resData.planId
} }
}; };
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id
console.log("保存渠道方案id aaaa++ ",a)
if (a && a.status == 0 && resData.path) {
var reqObj3 = {
actionType: "receiveIcpConfirmUrl",
appInfo: appInfo,
actionBody: {
solutionNo: solutionNo,
confirmUrl: resData.path
}
};
var url = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
console.log('save confirmUrl ++ ',url)
return pushRes; return pushRes;
} }
} }
} }
}
//服务商icp方案关闭 2020-10-26 laolan //服务商icp方案关闭 2020-10-26 laolan
async abolishIcpProgramme(pobj) { async abolishIcpProgramme(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息 var needsolution = res.data;//方案信息
var ab = pobj.actionBody; var ab = pobj.actionBody;
...@@ -305,15 +318,15 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -305,15 +318,15 @@ class BaseCenterOrderService extends AppServiceBase {
console.log('BizId++',BizId) console.log('BizId++',BizId)
var pushObj = { var pushObj = {
"businessLicense" : { "businessLicense" : {
"createdAt" : material.BusinessLicense.CreatedAt, "createdAt" : material.BusinessLicense.CreatedAt || "",
"enterpriseCode" :material.BusinessLicense.EnterpriseCode, "enterpriseCode" :material.BusinessLicense.EnterpriseCode || "",
"legalRepresentative" :material.BusinessLicense.LegalRepresentative, "legalRepresentative" :material.BusinessLicense.LegalRepresentative || "",
"address" :material.BusinessLicense.Address, "address" :material.BusinessLicense.Address || "",
"registeredCapital" : material.BusinessLicense.RegisteredCapital, "registeredCapital" : material.BusinessLicense.RegisteredCapital || "",
"name" :material.BusinessLicense.Name, "name" :material.BusinessLicense.Name || "",
"businessTerm" :material.BusinessLicense.BusinessTerm, "businessTerm" :material.BusinessLicense.BusinessTerm || "",
"type" : material.BusinessLicense.Type, "type" : material.BusinessLicense.Type || "",
"scopeBusiness" :material.BusinessLicense.ScopeBusiness "scopeBusiness" :material.BusinessLicense.ScopeBusiness || ""
}, },
"partnerForeignInvestment": material.PartnerForeignInvestment || "", "partnerForeignInvestment": material.PartnerForeignInvestment || "",
"orderNo": BizId, "orderNo": BizId,
...@@ -371,7 +384,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -371,7 +384,7 @@ class BaseCenterOrderService extends AppServiceBase {
} }
//交付单关闭 //交付单关闭
async closeOrderDelivery(pobj) { async closeOrderDelivery(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息 var needsolution = res.data;//方案信息
var ab = pobj.actionBody; var ab = pobj.actionBody;
...@@ -390,7 +403,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -390,7 +403,7 @@ class BaseCenterOrderService extends AppServiceBase {
//服务商提交服务操作(文网文)2020-9-26 //服务商提交服务操作(文网文)2020-9-26
async serviceSubmitOption(pobj) { async serviceSubmitOption(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
//推送数据至阿里 //推送数据至阿里
var resStatus = res.data.ApplicationStatus; var resStatus = res.data.ApplicationStatus;
...@@ -412,7 +425,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -412,7 +425,7 @@ class BaseCenterOrderService extends AppServiceBase {
//提交方案(文网文)2020-9-27 //提交方案(文网文)2020-9-27
async submitWangwenSolution(pobj) { async submitWangwenSolution(pobj) {
console.log('文网文提交方案',pobj) console.log('文网文提交方案',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
console.log('www',res.data.needsolution.solutionContent); console.log('www',res.data.needsolution.solutionContent);
var solution = res.data.needsolution.solutionContent; var solution = res.data.needsolution.solutionContent;
...@@ -490,7 +503,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -490,7 +503,7 @@ class BaseCenterOrderService extends AppServiceBase {
var self = this; var self = this;
pobj.actionBody.intentionBizId = pobj.actionBody.needNo; pobj.actionBody.intentionBizId = pobj.actionBody.needNo;
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('www+++result',result) console.log('www+++result',result)
if (result.status == 0) { if (result.status == 0) {
...@@ -545,7 +558,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -545,7 +558,7 @@ class BaseCenterOrderService extends AppServiceBase {
//提交沟通记录 //提交沟通记录
async recordLog(pobj) { async recordLog(pobj) {
console.log('提交沟通记录pobj',pobj) console.log('提交沟通记录pobj',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (!pobj.actionBody.needNo) { if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100491"); return system.getResult(null, "actionBody.needNo can not be empty,100491");
} }
...@@ -553,7 +566,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -553,7 +566,7 @@ class BaseCenterOrderService extends AppServiceBase {
return system.getResult(null, "actionBody.note can not be empty,100492"); return system.getResult(null, "actionBody.note can not be empty,100492");
} }
var self = this; var self = this;
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('www+提交沟通记录result',result) console.log('www+提交沟通记录result',result)
//推送交付系统 //推送交付系统
...@@ -607,7 +620,7 @@ class BaseCenterOrderService extends AppServiceBase { ...@@ -607,7 +620,7 @@ class BaseCenterOrderService extends AppServiceBase {
//服务商提交服务操作 //服务商提交服务操作
async foodServiceSubmitOption(pobj) { async foodServiceSubmitOption(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
//推送数据至阿里 //推送数据至阿里
var resStatus = res.data.ApplicationStatus; var resStatus = res.data.ApplicationStatus;
...@@ -628,7 +641,7 @@ async foodServiceSubmitOption(pobj) { ...@@ -628,7 +641,7 @@ async foodServiceSubmitOption(pobj) {
//提交方案 //提交方案
async submitFoodSolution(pobj) { async submitFoodSolution(pobj) {
console.log('food+++pobj',pobj) console.log('food+++pobj',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
console.log('food+++res',res) console.log('food+++res',res)
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
console.log('food',res.data.needsolution.solutionContent); console.log('food',res.data.needsolution.solutionContent);
...@@ -686,7 +699,7 @@ async foodCloseNeed(pobj) { ...@@ -686,7 +699,7 @@ async foodCloseNeed(pobj) {
var self = this; var self = this;
pobj.actionBody.intentionBizId = pobj.actionBody.needNo; pobj.actionBody.intentionBizId = pobj.actionBody.needNo;
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('food+++result',result) console.log('food+++result',result)
if (result.status == 0) { if (result.status == 0) {
...@@ -731,7 +744,7 @@ async foodCloseNeed(pobj) { ...@@ -731,7 +744,7 @@ async foodCloseNeed(pobj) {
//提交沟通记录 //提交沟通记录
async foodRecordLog(pobj) { async foodRecordLog(pobj) {
console.log('提交沟通记录pobj',pobj) console.log('提交沟通记录pobj',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (!pobj.actionBody.needNo) { if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100491"); return system.getResult(null, "actionBody.needNo can not be empty,100491");
} }
...@@ -739,7 +752,7 @@ async foodRecordLog(pobj) { ...@@ -739,7 +752,7 @@ async foodRecordLog(pobj) {
return system.getResult(null, "actionBody.note can not be empty,100492"); return system.getResult(null, "actionBody.note can not be empty,100492");
} }
var self = this; var self = this;
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('提交沟通记录result',result) console.log('提交沟通记录result',result)
//推送交付系统 //推送交付系统
......
...@@ -106,6 +106,10 @@ class UtilsNeedService extends AppServiceBase { ...@@ -106,6 +106,10 @@ class UtilsNeedService extends AppServiceBase {
} }
var self = this; var self = this;
pobj.actionType = "receiveIcpFeedback"; pobj.actionType = "receiveIcpFeedback";
if(pobj.actionBody && pobj.actionBody.intentionStatus){
pobj.intentionStatus = pobj.actionBody.intentionStatus;
}
var rtn = await this.execClient.execPost(pobj, url);
// 2020 0803 lin 修改; // 2020 0803 lin 修改;
if (pobj.intentionStatus) { if (pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq // 如果需求当前字段为5(已关闭)则通知fq
...@@ -113,7 +117,6 @@ class UtilsNeedService extends AppServiceBase { ...@@ -113,7 +117,6 @@ class UtilsNeedService extends AppServiceBase {
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed"); self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
} }
} }
var rtn = await this.execClient.execPost(pobj, url);
var data = JSON.parse(rtn.stdout); var data = JSON.parse(rtn.stdout);
return data; return data;
} }
......
...@@ -222,7 +222,7 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -222,7 +222,7 @@ class UtilsNeedService2 extends AppServiceBase {
// 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求 // 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求
var self = this; var self = this;
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
// 2020 1015 lin 新增 这里为什么只推送蜂擎 没有推送交付? // 2020 1015 lin 新增 这里为什么只推送蜂擎 没有推送交付?
// 明天找栋源确认 如果需要增加 在这个文件搜索updateChanceStatus // 明天找栋源确认 如果需要增加 在这个文件搜索updateChanceStatus
...@@ -259,12 +259,15 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -259,12 +259,15 @@ class UtilsNeedService2 extends AppServiceBase {
* @param {*} actionBody * @param {*} actionBody
*/ */
async needCloseIcp(pobj, actionBody) { async needCloseIcp(pobj, actionBody) {
console.log('guanbi icp xuqiu pobj+++',pobj)
if(actionBody.uapp_id == uappId.ali){
if (!actionBody.channelNeedNo) { if (!actionBody.channelNeedNo) {
return system.getResult(null, "actionBody.channelNeedNo can not be empty,100395"); return system.getResult(null, "actionBody.channelNeedNo can not be empty,100395");
} }
if (!actionBody.note) { if (!actionBody.note) {
return system.getResult(null, "actionBody.note can not be empty,100395"); return system.getResult(null, "actionBody.note can not be empty,100395");
} }
}
var self = this; var self = this;
pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo; pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo;
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
...@@ -279,9 +282,10 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -279,9 +282,10 @@ class UtilsNeedService2 extends AppServiceBase {
resultInfo: JSON.stringify(result), resultInfo: JSON.stringify(result),
optitle: "abolishIcpProgrammeByNeed推送蜂擎获取的接口信息->aliBusiness2Delivery", optitle: "abolishIcpProgrammeByNeed推送蜂擎获取的接口信息->aliBusiness2Delivery",
}); });
console.log('result close',result)
if (result.status == 0) { if (result.status == 0) {
if (result.data) { if (result.data && result.data.orderNo ) {
pobj.actionBody.orderNo = result.data; pobj.actionBody.orderNo = result.data.orderNo;
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody); var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
if (orderrtn.status < 0) { if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败"); return system.getResultFail(-5022, "订单关闭失败");
...@@ -309,8 +313,14 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -309,8 +313,14 @@ class UtilsNeedService2 extends AppServiceBase {
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery", optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
}); });
// 推送ali // 推送ali
if(result.data.uapp_id == uappId.ali){
var a = await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo, Note: actionBody.note }, apiVersion: "2019-05-08" }); var a = await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo, Note: actionBody.note }, apiVersion: "2019-05-08" });
console.log(a); }
// 推送baidu
if(result.data.uapp_id == uappId.baidu){
var a = await self.baiduclient.baiduReqbyget({ path : "/api/bla/provider/requirement/update", reqbody : { requirementId : actionBody.channelNeedNo, status: "CLOSED" ,note: actionBody.note }});
}
console.log("closed need a+++",a);
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed"); self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess(); return system.getResultSuccess();
} else { } else {
...@@ -496,7 +506,7 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -496,7 +506,7 @@ class UtilsNeedService2 extends AppServiceBase {
return system.getResult(null, "actionBody.note can not be empty,100492"); return system.getResult(null, "actionBody.note can not be empty,100492");
} }
var self = this; var self = this;
var reqUrl = this.centerOrderUrl + "action/need2/springBoard"; var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
//2020-10-28 laolan start //2020-10-28 laolan start
if(result && result.status == 0 && result.data){ if(result && result.status == 0 && result.data){
...@@ -541,7 +551,7 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -541,7 +551,7 @@ class UtilsNeedService2 extends AppServiceBase {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494"); // return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// } // }
//2020-10-28 laolan start //2020-10-28 laolan start
var reqUrl = this.centerOrderUrl + "action/need2/springBoard"; var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('jilu+++result++++',result) console.log('jilu+++result++++',result)
if(result && result.status == 0 && result.data && result.data.uapp_id){ if(result && result.status == 0 && result.data && result.data.uapp_id){
...@@ -662,7 +672,7 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -662,7 +672,7 @@ class UtilsNeedService2 extends AppServiceBase {
pobj.actionBody.data = []; pobj.actionBody.data = [];
await this.queryByAli(pobj, 1); await this.queryByAli(pobj, 1);
pobj.actionType = "getUnCreated"; pobj.actionType = "getUnCreated";
let reqUrl = this.centerOrderUrl + "action/need2/springBoard"; let reqUrl = this.centerOrderUrl + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl); let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
pobj.actionBody = { pobj.actionBody = {
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
"sha256": "^0.2.0", "sha256": "^0.2.0",
"socket.io": "^2.1.1", "socket.io": "^2.1.1",
"tenpay": "^2.1.18", "tenpay": "^2.1.18",
"urlencode": "^1.1.0",
"uuid": "^3.2.1", "uuid": "^3.2.1",
"wx-pay": "^1.0.2", "wx-pay": "^1.0.2",
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
......
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