Commit f2b8cab2 by 王栋源

wdy

parent 594e2a18
...@@ -251,12 +251,9 @@ class CenterorderService extends AppServiceBase { ...@@ -251,12 +251,9 @@ class CenterorderService extends AppServiceBase {
if (orderrtn.status != 0 && orderrtn.status != -1) { if (orderrtn.status != 0 && orderrtn.status != -1) {
return system.getResultFail(-5012, "订单创建失败"); return system.getResultFail(-5012, "订单创建失败");
} }
console.log(orderrtn.data);
if (orderrtn.data) { if (orderrtn.data) {
console.log("-----------------------------------------------------------");
pobj.actionBody.orderNo = orderrtn.data.orderNo; pobj.actionBody.orderNo = orderrtn.data.orderNo;
} }
console.log(pobj.actionBody);
pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId; pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId;
pobj.actionType = "receiveSolutionPayInfo"; pobj.actionType = "receiveSolutionPayInfo";
......
...@@ -11,6 +11,7 @@ class UtilsNeedService extends AppServiceBase { ...@@ -11,6 +11,7 @@ class UtilsNeedService extends AppServiceBase {
this.aliclient = system.getObject("util.aliyunClient"); this.aliclient = system.getObject("util.aliyunClient");
this.ossClient = system.getObject("util.ossClient"); this.ossClient = system.getObject("util.ossClient");
this.restClient = system.getObject("util.restClient"); this.restClient = system.getObject("util.restClient");
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
} }
/** /**
...@@ -188,14 +189,24 @@ class UtilsNeedService extends AppServiceBase { ...@@ -188,14 +189,24 @@ class UtilsNeedService extends AppServiceBase {
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) {
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 = "needClose" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/need/springBoard"; var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
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, "订单关闭失败");
}
}
// 推送ali // 推送ali
await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo }, apiVersion: "2019-05-08" }); await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo, Note: actionBody.note }, apiVersion: "2019-05-08" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed"); self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess(); return system.getResultSuccess();
} else { } else {
...@@ -267,8 +278,13 @@ class UtilsNeedService extends AppServiceBase { ...@@ -267,8 +278,13 @@ class UtilsNeedService extends AppServiceBase {
appInfo: pobj.appInfo appInfo: pobj.appInfo
} }
this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify"); this.utilsPushSve.aliBusiness2Delivery(tmpObj, "pushDeliveryStatusNotify");
tmpObj.actionBody.orderNo=rtn.data.channelSolutionNo; tmpObj.actionBody.orderNo = rtn.data.channelSolutionNo;
pobj.actionBody.orderNo = rtn.data.orderNo;
if (actionBody.status == 11) { if (actionBody.status == 11) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose"); self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
} }
}//通知更新状态 }//通知更新状态
......
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