Commit fd6ec8b3 by 宋毅

tj

parent 6341c45c
...@@ -27,7 +27,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -27,7 +27,7 @@ class QcCenterOrderService extends AppServiceBase {
this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve"); this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve");
this.utilsTmAliyunSve = system.getObject("service.utilsSve.utilsTmAliyunSve");//测试用 this.utilsTmAliyunSve = system.getObject("service.utilsSve.utilsTmAliyunSve");//测试用
this.opPushQueueUrl = settings.opPushQueueUrl(); this.opPushQueueUrl = settings.opPushQueueUrl();
}; };
//调用center-order //调用center-order
async reqCenterOrderApi(pobj, reqUrl) { async reqCenterOrderApi(pobj, reqUrl) {
...@@ -60,8 +60,8 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -60,8 +60,8 @@ class QcCenterOrderService extends AppServiceBase {
IntentionBizId: needinfo.channelNeedNo, IntentionBizId: needinfo.channelNeedNo,
CompanyName: solution.CompanyName, IcpType: solution.IcpType, CompanyAddress: solution.CompanyAddress, CompanyName: solution.CompanyName, IcpType: solution.IcpType, CompanyAddress: solution.CompanyAddress,
Area: solution.Area, Note: solution.Note, Area: solution.Area, Note: solution.Note,
ActionType:solution.actionType, ActionType: solution.actionType,
Source:"官网" Source: "官网"
}; };
if (needsolution.channelSolutionNo) { if (needsolution.channelSolutionNo) {
pushObj["BizId"] = needsolution.channelSolutionNo; pushObj["BizId"] = needsolution.channelSolutionNo;
...@@ -196,7 +196,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -196,7 +196,7 @@ class QcCenterOrderService extends AppServiceBase {
}; };
var self = this; var self = this;
//推送方案材料 //推送方案材料
if(pobj.appInfo.uapp_id ==18){ if (pobj.appInfo.uapp_id == 18) {
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 system.getResultSuccess();
...@@ -210,20 +210,20 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -210,20 +210,20 @@ class QcCenterOrderService extends AppServiceBase {
pobj.actionType = "getOrderByOrderNo"; pobj.actionType = "getOrderByOrderNo";
let orderUrl = settings.centerOrderUrl() + "action/order/springBoard"; let orderUrl = settings.centerOrderUrl() + "action/order/springBoard";
let orderResult = await this.restPostUrl(pobj, orderUrl); let orderResult = await this.restPostUrl(pobj, orderUrl);
if(orderResult.status !=0){ if (orderResult.status != 0) {
return system.getResultFail(-1,'查询订单失败') return system.getResultFail(-1, '查询订单失败')
} }
let uapp_id = orderResult.data.uapp_id; let uapp_id = orderResult.data.uapp_id;
pobj.appInfo = {uapp_id : uapp_id}; pobj.appInfo = { uapp_id: uapp_id };
pobj.actionType = "getAppInterface"; pobj.actionType = "getAppInterface";
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard"; var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl); var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
if(productItemInterfaceResult.status != 0){ if (productItemInterfaceResult.status != 0) {
system.getResultFail(-1,'获取接口参数失败') system.getResultFail(-1, '获取接口参数失败')
} }
pobj.interface_info = productItemInterfaceResult.data; pobj.interface_info = productItemInterfaceResult.data;
pobj.pushObj = res.data; pobj.pushObj = res.data;
this.utilsPushSve.pushBusInfo(pobj,'pushStatus',1); this.utilsPushSve.pushBusInfo(pobj, 'pushStatus', 1);
//推送数据至阿里 //推送数据至阿里
// var pushObj = { // var pushObj = {
// BizId: res.data.BizId, // BizId: res.data.BizId,
...@@ -253,7 +253,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -253,7 +253,7 @@ class QcCenterOrderService extends AppServiceBase {
return res; return res;
} }
// ----------- 文网文 ----------- // ----------- 文网文 -----------
//服务商提交服务操作(文网文)2020-9-26 //服务商提交服务操作(文网文)2020-9-26
async serviceSubmitOption(pobj) { async serviceSubmitOption(pobj) {
...@@ -265,12 +265,12 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -265,12 +265,12 @@ class QcCenterOrderService extends AppServiceBase {
BizId: pobj.actionBody.orderNo, BizId: pobj.actionBody.orderNo,
BizType: pobj.actionBody.channelType, BizType: pobj.actionBody.channelType,
OperateType: wangwenStatusDisct[resStatus], OperateType: wangwenStatusDisct[resStatus],
ExtInfo:pobj.actionBody.extInfo ExtInfo: pobj.actionBody.extInfo
}; };
console.log("fuwu++++pushObj",pushObj); console.log("fuwu++++pushObj", pushObj);
//推送状态变更 //推送状态变更
var r = await this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" }); var r = await this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('ttttssss',r) console.log('ttttssss', r)
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -278,10 +278,10 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -278,10 +278,10 @@ class QcCenterOrderService 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/qcapi/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;
var needsolution = res.data.needsolution;//方案信息 var needsolution = res.data.needsolution;//方案信息
solution = JSON.parse(solution); solution = JSON.parse(solution);
...@@ -316,8 +316,8 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -316,8 +316,8 @@ class QcCenterOrderService extends AppServiceBase {
// solution: res.data.needsolution.solutionContent // solution: res.data.needsolution.solutionContent
solution: solution solution: solution
}; };
console.log("wangwen",pushObj); console.log("wangwen", pushObj);
this.pushSubmitSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self); this.pushSubmitSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self);
return system.getResultSuccess(); return system.getResultSuccess();
} }
...@@ -329,7 +329,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -329,7 +329,7 @@ class QcCenterOrderService extends AppServiceBase {
async pushSubmitSolution(pushObj, solutionNo, appInfo, self) { async pushSubmitSolution(pushObj, solutionNo, appInfo, self) {
//推送状态变更 //推送状态变更
var pushRes = await this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2020-03-06" }); var pushRes = await this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('wangwen++++pushRespushRes',pushRes) console.log('wangwen++++pushRespushRes', pushRes)
if (pushRes && pushRes.status == 0 && pushRes.data) { if (pushRes && pushRes.status == 0 && pushRes.data) {
var resData = pushRes.data; var resData = pushRes.data;
var reqObj2 = { var reqObj2 = {
...@@ -359,7 +359,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -359,7 +359,7 @@ class QcCenterOrderService extends AppServiceBase {
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/qcapi/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) {
if (result.data) { if (result.data) {
pobj.actionBody.orderNo = result.data; pobj.actionBody.orderNo = result.data;
...@@ -390,8 +390,8 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -390,8 +390,8 @@ class QcCenterOrderService extends AppServiceBase {
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery", optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
}); });
// 推送ali // 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { IntentionBizId: pobj.actionBody.needNo, BizType: "esp.wangwen" ,Note : pobj.actionBody.note}, apiVersion: "2020-03-06" }); var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { IntentionBizId: pobj.actionBody.needNo, BizType: "esp.wangwen", Note: pobj.actionBody.note }, apiVersion: "2020-03-06" });
console.log('alalallala',a) console.log('alalallala', a)
// 2020 1021 lin 新增查看日志 // 2020 1021 lin 新增查看日志
self.logCtl.info({ self.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "", appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
...@@ -411,7 +411,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -411,7 +411,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录 //提交沟通记录
async recordLog(pobj) { async recordLog(pobj) {
console.log('提交沟通记录pobj',pobj) console.log('提交沟通记录pobj', pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/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");
...@@ -422,7 +422,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -422,7 +422,7 @@ class QcCenterOrderService extends AppServiceBase {
var self = this; var self = this;
var reqUrl = this.centerOrderUrl + "action/qcapi/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)
//推送交付系统 //推送交付系统
var reqParams = { var reqParams = {
actionBody: { actionBody: {
...@@ -441,7 +441,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -441,7 +441,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录 //提交沟通记录
var r = await this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" }); var r = await this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('www+提交沟通记录r',r) console.log('www+提交沟通记录r', r)
return system.getResultSuccess(); return system.getResultSuccess();
} }
...@@ -459,10 +459,10 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -459,10 +459,10 @@ class QcCenterOrderService extends AppServiceBase {
PageSize: pobj.actionBody.pageSize || 10, PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2020-03-06" }, apiVersion: "2020-03-06"
}); });
console.log('loglist-----',res) console.log('loglist-----', res)
if(res && res.data && res.data.Data){ if (res && res.data && res.data.Data) {
var len = res.data.Data.length; var len = res.data.Data.length;
for(var i=0; i<len;i++){ for (var i = 0; i < len; i++) {
res.data.Data[i].CreateTime = res.data.Data[i].CreateTime / 1000 res.data.Data[i].CreateTime = res.data.Data[i].CreateTime / 1000
} }
} }
...@@ -470,40 +470,40 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -470,40 +470,40 @@ class QcCenterOrderService extends AppServiceBase {
} }
// ----------- 食品 ----------- // ----------- 食品 -----------
//服务商提交服务操作 //服务商提交服务操作
async foodServiceSubmitOption(pobj) { async foodServiceSubmitOption(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/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;
var pushObj = { var pushObj = {
BizId: pobj.actionBody.orderNo, BizId: pobj.actionBody.orderNo,
BizType: pobj.actionBody.channelTpye, BizType: pobj.actionBody.channelTpye,
OperateType: wangwenStatusDisct[resStatus], OperateType: wangwenStatusDisct[resStatus],
ExtInfo:pobj.actionBody.extInfo ExtInfo: pobj.actionBody.extInfo
}; };
//推送状态变更 //推送状态变更
var r = await this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" }); var r = await this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('ttttssss',r) console.log('ttttssss', r)
return system.getResultSuccess(); return system.getResultSuccess();
}
return res;
} }
return res;
}
//提交方案 //提交方案
async submitFoodSolution(pobj) { async submitFoodSolution(pobj) {
console.log('food+++pobj',pobj) console.log('food+++pobj', pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/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);
var solution = res.data.needsolution.solutionContent; var solution = res.data.needsolution.solutionContent;
var needsolution = res.data.needsolution;//方案信息 var needsolution = res.data.needsolution;//方案信息
solution = JSON.parse(solution); solution = JSON.parse(solution);
solution = solution.solution solution = solution.solution
solution = JSON.stringify(solution) solution = JSON.stringify(solution)
//推送交付系统 //推送交付系统
var reqParams = { var reqParams = {
...@@ -526,142 +526,142 @@ async submitFoodSolution(pobj) { ...@@ -526,142 +526,142 @@ async submitFoodSolution(pobj) {
resultInfo: "", resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery", optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
}); });
//推送数据至阿里 //推送数据至阿里
var pushObj = { var pushObj = {
intentionBizId: res.data.needinfo.channelNeedNo, intentionBizId: res.data.needinfo.channelNeedNo,
bizType: res.data.needinfo.channelTypeCode, bizType: res.data.needinfo.channelTypeCode,
// solution: res.data.needsolution.solutionContent // solution: res.data.needsolution.solutionContent
solution: solution solution: solution
}; };
console.log("food",pushObj); console.log("food", pushObj);
this.pushSubmitSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self); this.pushSubmitSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self);
return system.getResultSuccess(); return system.getResultSuccess();
}
return res;
} }
return res;
}
//关闭需求 //关闭需求
async foodCloseNeed(pobj) { async foodCloseNeed(pobj) {
if (!pobj.actionBody.needNo) { if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100395"); return system.getResult(null, "actionBody.needNo can not be empty,100395");
} }
if (!pobj.actionBody.note) { if (!pobj.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.needNo; pobj.actionBody.intentionBizId = pobj.actionBody.needNo;
pobj.actionType = "abolishIcpProgrammeByNeed" pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/qcapi/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) {
if (result.data) { if (result.data) {
pobj.actionBody.orderNo = result.data; pobj.actionBody.orderNo = result.data;
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, "订单关闭失败");
}
}
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.needNo,
status: "closeNeed"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
} }
var self = this;
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/common/qcCenterOrderSve.js/foodCloseNeed",
content: JSON.stringify(reqParams),
resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
// 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { IntentionBizId: pobj.actionBody.needNo, BizType: "esp.wangwen", Note: pobj.actionBody.note }, apiVersion: "2020-03-06" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseFoodNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "close fail 100389 ");
} }
}
//提交沟通记录
async foodRecordLog(pobj) {
console.log('提交沟通记录pobj', pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo 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/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('提交沟通记录result', result)
//推送交付系统 //推送交付系统
var reqParams = { var reqParams = {
actionBody: { actionBody: {
intentionBizId: pobj.actionBody.needNo, intentionBizId: pobj.actionBody.needNo,
status: "closeNeed" status: "followingUp"
}, },
opType: "updateChanceStatus", opType: "updateChanceStatus",
appInfo: pobj.appInfo appInfo: pobj.appInfo
} }
var self = this;
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus"); self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
//日志记录 //推送数据至阿里
self.logCtl.info({ var pushObj = {
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "", IntentionBizId: pobj.actionBody.needNo,
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "", note: pobj.actionBody.note
requestId: pobj.requestId || "", };
op: "service/impl/common/qcCenterOrderSve.js/foodCloseNeed", //提交沟通记录
content: JSON.stringify(reqParams), var r = await this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" });
resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
// 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { IntentionBizId: pobj.actionBody.needNo, BizType: "esp.wangwen" ,Note : pobj.actionBody.note}, apiVersion: "2020-03-06" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseFoodNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "close fail 100389 ");
}
}
//提交沟通记录 console.log('提交沟通记录r', r)
async foodRecordLog(pobj) { return system.getResultSuccess();
console.log('提交沟通记录pobj',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo 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/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('提交沟通记录result',result)
//推送交付系统
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: pobj.actionBody.note
};
//提交沟通记录
var r = await this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('提交沟通记录r',r) //查看沟通记录
return system.getResultSuccess(); async foodRecordLogList(pobj) {
} if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100493");
//查看沟通记录
async foodRecordLogList(pobj) {
if (!pobj.actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100493");
}
let res = await this.aliclient.reqbyget({
action: "ListIntentionNote", reqbody: {
BeginTime: pobj.actionBody.BeginTime ? pobj.actionBody.BeginTime : "",
EndTime: pobj.actionBody.EndTime ? pobj.actionBody.EndTime : "",
IntentionBizId: pobj.actionBody.needNo,
PageNum: pobj.actionBody.pageNum || 1,
PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2020-03-06"
});
if(res && res.data && res.data.Data){
var len = res.data.Data.length;
for(var i=0; i<len;i++){
res.data.Data[i].CreateTime = res.data.Data[i].CreateTime / 1000
} }
let res = await this.aliclient.reqbyget({
action: "ListIntentionNote", reqbody: {
BeginTime: pobj.actionBody.BeginTime ? pobj.actionBody.BeginTime : "",
EndTime: pobj.actionBody.EndTime ? pobj.actionBody.EndTime : "",
IntentionBizId: pobj.actionBody.needNo,
PageNum: pobj.actionBody.pageNum || 1,
PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2020-03-06"
});
if (res && res.data && res.data.Data) {
var len = res.data.Data.length;
for (var i = 0; i < len; i++) {
res.data.Data[i].CreateTime = res.data.Data[i].CreateTime / 1000
}
}
return system.getResultSuccess(res);
} }
return system.getResultSuccess(res);
}
//推送订单状态 //推送订单状态
async pushOrderStatus(pobj){ async pushOrderStatus(pobj) {
if (!pobj.interface_params) { if (!pobj.interface_params) {
return system.getResult(null, "interface_params can not be empty,100400"); return system.getResult(null, "interface_params can not be empty,100400");
} }
let interface_params_info = JSON.parse(pobj.interface_params); let interface_params_info = JSON.parse(pobj.interface_params);
if (!interface_params_info || !interface_params_info.action || interface_params_info.apiVersion) { if (!interface_params_info || !interface_params_info.action || !interface_params_info.apiVersion) {
return system.getResult(null, "interface_params(action、apiVersion) can not be empty,100430"); return system.getResult(null, "interface_params(action、apiVersion) can not be empty,100430");
} }
let pushObj = { let pushObj = {
BizId: pobj.pushObj.BizId, BizId: pobj.pushObj.BizId,
...@@ -669,35 +669,35 @@ async foodRecordLogList(pobj) { ...@@ -669,35 +669,35 @@ async foodRecordLogList(pobj) {
ApplicationStatus: pobj.pushObj.ApplicationStatus ApplicationStatus: pobj.pushObj.ApplicationStatus
}; };
let obj = { let obj = {
action:interface_params_info.action, action: interface_params_info.action,
reqbody:pushObj, reqbody: pushObj,
apiVersion:interface_params_info.apiVersion apiVersion: interface_params_info.apiVersion
} }
let result = await this.aliclient.reqbyget(obj); let result = await this.aliclient.reqbyget(obj);
return result; return result;
} }
// //推送ICP方案 // //推送ICP方案
// async pushIcpSolution1(pushObj, solutionNo, appInfo, self) { // async pushIcpSolution1(pushObj, solutionNo, appInfo, self) {
// //推送方案确认信息 // //推送方案确认信息
// var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" }); // var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
// console.log("confirmRes",confirmRes) // console.log("confirmRes",confirmRes)
// // if (confirmRes && confirmRes.status == 0 && confirmRes.data) { // // if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
// // var confirmResData = confirmRes.data; // // var confirmResData = confirmRes.data;
// // if (confirmResData.ConfirmUrl) { // // if (confirmResData.ConfirmUrl) {
// // var reqObj3 = { // // var reqObj3 = {
// // actionType: "receiveIcpConfirmUrl", // // actionType: "receiveIcpConfirmUrl",
// // appInfo: appInfo, // // appInfo: appInfo,
// // actionBody: { // // actionBody: {
// // solutionNo: solutionNo, // // solutionNo: solutionNo,
// // confirmUrl: confirmResData.ConfirmUrl // // confirmUrl: confirmResData.ConfirmUrl
// // } // // }
// // }; // // };
// // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url // // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
// // } // // }
// // } // // }
// // return confirmRes; // // return confirmRes;
// } // }
} }
module.exports = QcCenterOrderService; module.exports = QcCenterOrderService;
......
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