Commit 64a11372 by 庄冰

pushTmConfirm

parent 24d5c9a5
......@@ -57,7 +57,52 @@ class UtilsOpOrderService extends AppServiceBase {
}
var reqUrl = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if(result && result.status==0 && result.data){
// this.pushTmConfirm(result,pobj,actionBody);//推送方案确认信息
return system.getResultSuccess();
}
return result;
}
//推送方案确认信息
async pushTmConfirm(result,pobj,actionBody){
var orderdelivery = result.data;
var deliveryContent = orderdelivery.deliveryContent;
if(deliveryContent){
var pushObj = {//推送参数
serviceNo:deliveryContent.serviceNo,
isConfirm:actionBody.isConfirm,
channelCode:deliveryContent.channelCode,
notes:actionBody.notes || "",
appInfo: pobj.appInfo
};
var tmpPobj = {
appInfo: pobj.appInfo,
actionBody: pushObj
}
//获取产品详情
var getProductDetailUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var getProductDetailObj = {
"actionType":"getProductDetail",
"appInfo":pobj.appInfo,
"actionBody":{"channelItemCode":deliveryContent.itemCode}
};
var productItemResult = await this.restPostUrl(getProductDetailObj, getProductDetailUrl);
if (productItemResult.status != 0) {
return productItemResult;
}
tmpPobj.actionBody.product_info = productItemResult.data;
tmpPobj.actionBody.product_id = tmpPobj.actionBody.product_info.id;
//获取推送接口信息
var getProductInterfaceUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var getProductInterfaceObj = {
"actionType":"getProductInterface",
"appInfo":pobj.appInfo,
"actionBody":{"product_id":tmpPobj.actionBody.product_id}
};
var productItemInterfaceResult = await this.restPostUrl(getProductInterfaceObj, getProductInterfaceUrl);
tmpPobj.actionBody.product_info.interface_info = productItemInterfaceResult.data;
this.utilsPushSve.pushBusInfo(tmpPobj, "pushOpSolution", 1);
}
}
}
module.exports = UtilsOpOrderService;
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