Commit d1d2688c by 兰国旗

laolan

parent d8de3205
...@@ -58,6 +58,12 @@ class QcAPI extends APIBase { ...@@ -58,6 +58,12 @@ class QcAPI extends APIBase {
case "submitWangwenSolution"://提交方案(文网文)2020-9-26 case "submitWangwenSolution"://提交方案(文网文)2020-9-26
opResult = await this.centerorderSve.submitWangwenSolution(pobj); opResult = await this.centerorderSve.submitWangwenSolution(pobj);
break; break;
case "closeNeed"://关闭需求(文网文)2020-9-28
opResult = await this.centerorderSve.closeNeed(pobj);
break;
case "recordLog"://提交沟通记录(文网文)2020-9-28
opResult = await this.centerorderSve.recordLog(pobj);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -254,5 +254,103 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -254,5 +254,103 @@ class QcCenterOrderService extends AppServiceBase {
} }
return res; return res;
} }
//关闭需求
async closeNeed(pobj) {
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 = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/utilsNeedSve.js/closeNeed",
content: JSON.stringify(pobj),
resultInfo: JSON.stringify(result),
optitle: "abolishIcpProgrammeByNeed推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
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, "订单关闭失败");
}
}
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.channelNeedNo,
status: "closeNeed"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
//日志记录
self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/utilsSve/utilsNeedSve.js/closeNeed",
content: JSON.stringify(reqParams),
resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
// 推送ali
var a = await self.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: { BizId: actionBody.channelNeedNo, note: actionBody.note }, apiVersion: "2019-03-06" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "close fail 100389 ");
}
}
//提交沟通记录
async recordLog(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (!pobj.actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100491");
}
if (!pobj.actionBody.note) {
return system.getResult(null, "actionBody.note can not be empty,100492");
}
var self = this;
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log("res", res)
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.needNo,
status: "followingUp"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
//推送数据至阿里
var pushObj = {
intentionBizId: pobj.actionBody.needNo,
note: solution.pobj.actionBody.note
};
//提交沟通记录
this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2019-03-06" });
return system.getResultSuccess();
}
} }
module.exports = QcCenterOrderService; module.exports = QcCenterOrderService;
\ No newline at end of file
...@@ -282,7 +282,7 @@ module.exports = function (app) { ...@@ -282,7 +282,7 @@ module.exports = function (app) {
"submitIcpIntention", "queryIntentionList", "confirmIcpIntention", "submitIcpIntention", "queryIntentionList", "confirmIcpIntention",
"tmAccept", "tmStatus", "tmAccept", "tmStatus",
"needBatchUpload", "needBatchUpload",
"serviceSubmitOption","submitWangwenSolution" "serviceSubmitOption","submitWangwenSolution","closeNeed","recordLog"
]; ];
if (lst.indexOf(req.body.actionType) >= 0) { if (lst.indexOf(req.body.actionType) >= 0) {
......
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