Commit 4baf6cc0 by linboxuan

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

parents d5130cd0 6b09828f
......@@ -251,12 +251,9 @@ class CenterorderService extends AppServiceBase {
if (orderrtn.status != 0 && orderrtn.status != -1) {
return system.getResultFail(-5012, "订单创建失败");
}
console.log(orderrtn.data);
if (orderrtn.data) {
console.log("-----------------------------------------------------------");
pobj.actionBody.orderNo = orderrtn.data.orderNo;
}
console.log(pobj.actionBody);
pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId;
pobj.actionType = "receiveSolutionPayInfo";
......
......@@ -48,12 +48,12 @@ class QcCenterOrderService extends AppServiceBase {
CompanyName: solution.CompanyName, IcpType: solution.IcpType, CompanyAddress: solution.CompanyAddress,
Area: solution.Area, Note: solution.Note
};
if(needsolution.channelSolutionNo){
if (needsolution.channelSolutionNo) {
pushObj["BizId"] = needsolution.channelSolutionNo;
}
var self = this;
//推送方案
this.pushIcpSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
await this.pushIcpSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self);
return system.getResultSuccess();
}
return res;
......@@ -76,7 +76,21 @@ class QcCenterOrderService extends AppServiceBase {
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id
if (a && a.status == 0) {
//推送方案确认信息
await self.aliclient.reqbyget({action:"ConfirmIntention",reqbody:{BizId:pushObj.IntentionBizId},apiVersion:"2019-05-08"});
var confirmRes = await self.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
var confirmResData = confirmRes.data;
if (confirmResData.confirmUrl) {
var reqObj3 = {
actionType: "receiveIcpConfirmUrl",
appInfo: appInfo,
actionBody: {
solutionNo: solutionNo,
confirmUrl: confirmResData.confirmUrl
}
};
var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
}
}
}
}
}
......@@ -96,7 +110,7 @@ class QcCenterOrderService extends AppServiceBase {
BizId: ab.BizId, Note: ab.Note
};
//关闭方案
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"});
this.aliclient.reqbyget({ action: "CloseIcpProduce", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess();
}
return res;
......@@ -132,7 +146,7 @@ class QcCenterOrderService extends AppServiceBase {
};
var self = this;
//推送方案材料
self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj,apiVersion:"2019-05-08"});
self.aliclient.reqbyget({ action: "SavePartnerSubmitMaterial", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess();
}
return res;
......@@ -143,12 +157,12 @@ class QcCenterOrderService extends AppServiceBase {
if (res && res.status == 0 && res.data) {
//推送数据至阿里
var pushObj = {
BizId:res.data.BizId,
OfficialFileURL:res.data.OfficialFileURL,
ApplicationStatus:res.data.ApplicationStatus
BizId: res.data.BizId,
OfficialFileURL: res.data.OfficialFileURL,
ApplicationStatus: res.data.ApplicationStatus
};
//推送状态变更
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"});
this.aliclient.reqbyget({ action: "AcceptPartnerNotification", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess();
}
return res;
......@@ -164,7 +178,7 @@ class QcCenterOrderService extends AppServiceBase {
BizId: needsolution.channelSolutionNo, Note: ab.note
};
//关闭方案
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"});
this.aliclient.reqbyget({ action: "CloseIcpProduce", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess();
}
return res;
......
......@@ -12,6 +12,7 @@ class UtilsNeedService extends AppServiceBase {
this.aliclient = system.getObject("util.aliyunClient");
this.ossClient = system.getObject("util.ossClient");
this.restClient = system.getObject("util.restClient");
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
}
/**
......@@ -64,8 +65,9 @@ class UtilsNeedService extends AppServiceBase {
if (reqUrl) {
var url = this.centerOrderUrl + reqUrl;
}
var self=this;
pobj.actionType = "receiveIcpFeedback";
// 2020 0803 lin 修改;
// 2020 0803 lin 修改;
if(pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq
if(pobj.intentionStatus == 5) {
......@@ -196,18 +198,28 @@ class UtilsNeedService extends AppServiceBase {
if (!actionBody.channelNeedNo) {
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;
pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo;
pobj.actionType = "needClose"
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
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
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");
return system.getResultSuccess();
} else {
return system.getResult(null, "close fail 100389");
return system.getResult(null, "close fail 100389 ");
}
}
......@@ -275,8 +287,13 @@ class UtilsNeedService extends AppServiceBase {
appInfo: pobj.appInfo
}
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) {
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj.actionBody);
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
self.utilsPushSve.aliBusiness2Fq(tmpObj, "pushOrderICPClose");
}
}//通知更新状态
......
......@@ -32,6 +32,7 @@ class UtilsPushService extends AppServiceBase {
async aliBusiness2Fq(pobj, opType) {//供业务调用,在代码中调用,不在db中做配置进行调用
pobj.actionType = "getAppInterface";
debugger;
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
pobj.interface_info = productItemInterfaceResult.data;
......
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