Commit 19db4d0d by 宋毅

修改推送方法

parent 3c3cb766
...@@ -146,35 +146,55 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -146,35 +146,55 @@ class RegCenterOrderService extends AppServiceBase {
}, },
appInfo: pobj.appInfo appInfo: pobj.appInfo
}; };
//往资质宝推送订单
if (pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy == 1) {//直接下单需执行添加订单业务员操作 if (pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy == 1) {//直接下单需执行添加订单业务员操作
if (yunfuRes && yunfuRes.status == 0) { if (yunfuPushRes && yunfuPushRes.status == 0) {
if (yunfuRes.data && yunfuRes.data.data) { if (yunfuPushRes.data && yunfuPushRes.data.data) {
var resData = yunfuRes.data.data; let resData = yunfuPushRes.data.data;
var salesmanInfo = { let salesmanInfo = {
salesmanName: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operatorName : "", salesmanName: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operatorName : "",
salesmanChannelId: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operator : "", salesmanChannelId: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operator : "",
}; };
var salesmanObj = { deliveryObj.actionBody.needsolution.salesmanInfo = salesmanInfo;
appInfo: pobj.appInfo, deliveryObj.actionBody.needsolution.orderNo = orderItem.data.orderNo;
actionType: "addRegSalesmanInfo",//添加业务员信息
actionBody: {salesmanInfo: salesmanInfo, orderNo: orderrtn.data.orderNo}
};
var url = settings.centerOrderUrl() + "action/regapi/springBoard";
var addRes = await this.execClient.execPost(salesmanObj, url);
if (addRes && addRes.stdout) {
var salesmanRes = JSON.parse(addRes.stdout);
if (salesmanRes.status == 0) {
deliveryObj.actionBody.needsolution = salesmanRes.data;
await this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
}
}
} }
} }
} else { }
//往资质宝推送订单
if (pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy == 1) {
// console.log("deliveryObj......................................................", JSON.stringify(deliveryObj))
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder"); this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
} }
// //往资质宝推送订单
// if (pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy == 1) {//直接下单需执行添加订单业务员操作
// if (yunfuRes && yunfuRes.status == 0) {
// if (yunfuRes.data && yunfuRes.data.data) {
// var resData = yunfuRes.data.data;
// var salesmanInfo = {
// salesmanName: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operatorName : "",
// salesmanChannelId: resData.orderList && resData.orderList.length > 0 ? resData.orderList[0].operator : "",
// };
// var salesmanObj = {
// appInfo: pobj.appInfo,
// actionType: "addRegSalesmanInfo",//添加业务员信息
// actionBody: {salesmanInfo: salesmanInfo, orderNo: orderrtn.data.orderNo}
// };
// //添加业务员
// var url = settings.centerOrderUrl() + "action/regapi/springBoard";
// var addRes = await this.execClient.execPost(salesmanObj, url);
// if (addRes && addRes.stdout) {
// var salesmanRes = JSON.parse(addRes.stdout);
// if (salesmanRes.status == 0) {
// deliveryObj.actionBody.needsolution = salesmanRes.data;
// await this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
// }
// }
//
// }
// }
// } else {
// this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
// }
return system.getResultSuccess(); return system.getResultSuccess();
} }
......
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