Commit 5a0aa6f5 by linboxuan

update needClose

parent 54178302
......@@ -26,7 +26,7 @@ class UtilsNeedService extends AppServiceBase {
* @param {*} actionBody
*/
async submitNeed(pobj, actionBody) {
if(actionBody.type == "esp.wangwen") {
if(actionBody.type == "esp.wangwen" || actionBody.type == "esp.food") {
actionBody.area = this.wangwenAreaChange(actionBody.area)
}
if (!actionBody.intentionBizId) {
......@@ -207,13 +207,41 @@ class UtilsNeedService extends AppServiceBase {
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100395");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
if (!actionBody.note) {
return system.getResult(null, "actionBody.note can not be empty,100395");
}
pobj.actionBody.channelNeedNo = pobj.actionBody.intentionBizId;
// 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求
var self = this;
pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
// 2020 1015 lin 新增 这里为什么只推送蜂擎 没有推送交付?
// 明天找栋源确认 如果需要增加 在这个文件搜索updateChanceStatus
// 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求
if (result.status == 0) {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseNeed");
if (result.data) {
pobj.actionBody.orderNo = result.data;
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
}
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.channelNeedNo,
status: "closeNeed"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "推送失敗 100388");
return system.getResult(null, "close fail 100389 ");
}
}
......@@ -1036,9 +1064,11 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.needId = solutiondata.data.channelNeedNo;
}
// 具体询价操作
pobj.actionBody.city = needInfoResult.data.city
pobj.actionBody.channelItemCode = needInfoResult.data.channelTypeCode
pobj.actionBody.pathCode = "/zzfw/wangwen/"// 写死 needInfo不支持
// 城市 明天需要国旗存一下 这里也要询价
pobj.actionBody.city = solutiondata.data.solutionContent.solution.solutionCity;
// pobj.actionBody.city = needInfoResult.data.city
pobj.actionBody.channelItemCode = needInfoResult.data.channelTypeCode;
pobj.actionBody.pathCode = "/zzfw/wangwen/";// 写死 needInfo不支持
pobj.actionType = "getProductPrice";
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var productPriceResult = await this.restPostUrl(pobj, url);
......
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