Commit 540efbad by 宋毅

修改日志记录

parent 9beb0d2e
...@@ -16,6 +16,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -16,6 +16,7 @@ class RegCenterOrderService extends AppServiceBase {
this.baiduRegClient = system.getObject("util.baiduRegClient"); this.baiduRegClient = system.getObject("util.baiduRegClient");
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve"); this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
}; };
//调用center-order //调用center-order
async reqCenterOrderApi(pobj, reqUrl) { async reqCenterOrderApi(pobj, reqUrl) {
var url = this.centerOrderUrl + "action/regapi/springBoard"; var url = this.centerOrderUrl + "action/regapi/springBoard";
...@@ -37,20 +38,21 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -37,20 +38,21 @@ class RegCenterOrderService extends AppServiceBase {
var itemResult = await this.restPostUrl(pobj, reqUrl); var itemResult = await this.restPostUrl(pobj, reqUrl);
return itemResult; return itemResult;
} }
async regPaySuccess(pobj) { async regPaySuccess(pobj) {
console.log('regPaySuccess++++pobj----',pobj) console.log('regPaySuccess++++pobj----', pobj)
var sobj = { var sobj = {
actionType: "getRegProducePrice", actionType: "getRegProducePrice",
actionBody: { actionBody: {
typeCode: pobj.actionBody.consultType, typeCode: pobj.actionBody.consultType,
city: pobj.actionBody.area, city: pobj.actionBody.area,
taxpayerType:pobj.actionBody.taxpayerType, taxpayerType: pobj.actionBody.taxpayerType,
companyProperties:pobj.actionBody.companyProperties companyProperties: pobj.actionBody.companyProperties
}, },
appInfo: pobj.appInfo, appInfo: pobj.appInfo,
actionProcess: pobj.actionProcess actionProcess: pobj.actionProcess
} }
console.log('regPaySuccess++++sobj----',sobj) console.log('regPaySuccess++++sobj----', sobj)
var url = settings.centerAppUrl() + "action/opProduct/springBoard"; var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var rtn = await this.execClient.execPost(sobj, url); var rtn = await this.execClient.execPost(sobj, url);
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
...@@ -60,7 +62,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -60,7 +62,7 @@ class RegCenterOrderService extends AppServiceBase {
if (data.status != 0) { if (data.status != 0) {
return system.getResultFail(-5010, "产品查询失败"); return system.getResultFail(-5010, "产品查询失败");
} }
console.log('data----data----',data) console.log('data----data----', data)
// pobj.actionBody = data.data; // pobj.actionBody = data.data;
// pobj.actionBody.orderNo = pobj.actionBody.bizId; // pobj.actionBody.orderNo = pobj.actionBody.bizId;
pobj.actionBody.totalSum = data.data.price; pobj.actionBody.totalSum = data.data.price;
...@@ -68,7 +70,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -68,7 +70,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj.actionBody.payTotalSum = data.data.price; pobj.actionBody.payTotalSum = data.data.price;
pobj.actionBody.payCode = data.data.payCode; pobj.actionBody.payCode = data.data.payCode;
pobj.actionBody.channelItemCode = data.data.channelItemCode; pobj.actionBody.channelItemCode = data.data.channelItemCode;
pobj.actionBody.channelNeedNo = data.data.channelNeedNo || data.data.bizId ; pobj.actionBody.channelNeedNo = data.data.channelNeedNo || data.data.bizId;
pobj.actionBody.needNo = data.data.needNo; pobj.actionBody.needNo = data.data.needNo;
pobj.actionBody.quantity = 1; pobj.actionBody.quantity = 1;
pobj.actionBody.channelOrder = { pobj.actionBody.channelOrder = {
...@@ -76,10 +78,10 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -76,10 +78,10 @@ class RegCenterOrderService extends AppServiceBase {
channelOrderNo: pobj.actionBody.orderNo, channelOrderNo: pobj.actionBody.orderNo,
orderStatus: 2 orderStatus: 2
} }
console.log('pobj.actionBody------',pobj.actionBody) console.log('pobj.actionBody------', pobj.actionBody)
var orderrtn = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody); var orderrtn = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody);
console.log('orderrtn----',orderrtn) console.log('orderrtn----', orderrtn)
if (orderrtn.status != 0 && orderrtn.status != -1) { if (orderrtn.status != 0 && orderrtn.status != -1) {
return system.getResultFail(-5012, "订单创建失败"); return system.getResultFail(-5012, "订单创建失败");
} }
...@@ -95,7 +97,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -95,7 +97,7 @@ class RegCenterOrderService extends AppServiceBase {
return system.getResultFail(-5011, "方案查询失败"); return system.getResultFail(-5011, "方案查询失败");
} }
var solutiondata = JSON.parse(solutionrtn.stdout); var solutiondata = JSON.parse(solutionrtn.stdout);
console.log('solutiondata----',solutiondata) console.log('solutiondata----', solutiondata)
if (solutiondata.status != 0) { if (solutiondata.status != 0) {
return system.getResultFail(-5011, "方案查询失败"); return system.getResultFail(-5011, "方案查询失败");
} }
...@@ -116,16 +118,16 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -116,16 +118,16 @@ class RegCenterOrderService extends AppServiceBase {
orderPrice: Number(pobj.actionBody.orderPrice / 100), orderPrice: Number(pobj.actionBody.orderPrice / 100),
phone: pobj.actionBody.publishMobile, phone: pobj.actionBody.publishMobile,
needId: solutiondata.data.channelNeedNo, needId: solutiondata.data.channelNeedNo,
price_desc : pobj.actionBody.taxpayerType, price_desc: pobj.actionBody.taxpayerType,
additions_desc : pobj.actionBody.companyProperties, additions_desc: pobj.actionBody.companyProperties,
// companyName:solutiondata.data.solutionContent.CompanyName || '' // companyName:solutiondata.data.solutionContent.CompanyName || ''
//2021-1-21 laolan add new //2021-1-21 laolan add new
appName:pobj.appInfo.app_name || '', appName: pobj.appInfo.app_name || '',
sku:data.data.service_code || '' sku: data.data.service_code || ''
}, },
appInfo: pobj.appInfo appInfo: pobj.appInfo
} }
console.log('fqobj----',fqobj) console.log('fqobj----', fqobj)
var baiduPushRes = await this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusinessNew"); var baiduPushRes = await this.utilsPushSve.business2Channel(fqobj, "pushOrderICPBusinessNew");
var deliveryObj = { var deliveryObj = {
actionBody: { actionBody: {
...@@ -141,18 +143,18 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -141,18 +143,18 @@ 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(baiduPushRes && baiduPushRes.status==0){ if (baiduPushRes && baiduPushRes.status == 0) {
if(baiduPushRes.data && baiduPushRes.data.data){ if (baiduPushRes.data && baiduPushRes.data.data) {
var resData = baiduPushRes.data.data; var resData = baiduPushRes.data.data;
var salesmanInfo = { var 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={ var salesmanObj = {
appInfo:pobj.appInfo, appInfo: pobj.appInfo,
actionType:"addRegSalesmanInfo",//添加业务员信息 actionType: "addRegSalesmanInfo",//添加业务员信息
actionBody:{salesmanInfo:salesmanInfo,orderNo:orderrtn.data.orderNo} actionBody: {salesmanInfo: salesmanInfo, orderNo: orderrtn.data.orderNo}
}; };
var url = settings.centerOrderUrl() + "action/regapi/springBoard"; var url = settings.centerOrderUrl() + "action/regapi/springBoard";
var addRes = await this.execClient.execPost(salesmanObj, url); var addRes = await this.execClient.execPost(salesmanObj, url);
...@@ -166,14 +168,14 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -166,14 +168,14 @@ class RegCenterOrderService extends AppServiceBase {
} }
} }
}else{ } else {
this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder"); this.utilsPushSve.business2Channel(deliveryObj, "pushDeliveryOrder");
} }
return system.getResultSuccess(); return system.getResultSuccess();
} }
// channelNeedNo获取需求详情 // channelNeedNo获取需求详情
async selectNeedInfo(pobj){ async selectNeedInfo(pobj) {
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var itemResult = await this.restPostUrl(pobj, reqUrl); var itemResult = await this.restPostUrl(pobj, reqUrl);
return itemResult; return itemResult;
...@@ -189,6 +191,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -189,6 +191,7 @@ class RegCenterOrderService extends AppServiceBase {
var itemResult = await this.restPostUrl(pobj, reqUrl); var itemResult = await this.restPostUrl(pobj, reqUrl);
return itemResult; return itemResult;
} }
/** /**
* 提交需求 * 提交需求
* @param {*} pobj * @param {*} pobj
...@@ -210,7 +213,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -210,7 +213,7 @@ class RegCenterOrderService extends AppServiceBase {
if (data.status != 0) { if (data.status != 0) {
return system.getResultFail(-5016, "需求类型查询失败"); return system.getResultFail(-5016, "需求类型查询失败");
} }
pobj.actionBody.service_product_id= data.data.service_product_id; pobj.actionBody.service_product_id = data.data.service_product_id;
pobj.actionBody.productId = data.data.service_product_id; pobj.actionBody.productId = data.data.service_product_id;
pobj.actionBody.appName = pobj.appInfo.app_name; pobj.actionBody.appName = pobj.appInfo.app_name;
pobj.actionBody.type_code = data.data.type_code; pobj.actionBody.type_code = data.data.type_code;
...@@ -279,6 +282,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -279,6 +282,7 @@ class RegCenterOrderService extends AppServiceBase {
var data = JSON.parse(rtn.stdout); var data = JSON.parse(rtn.stdout);
return data; return data;
} }
//状态更新 //状态更新
async regOrderStatus(pobj) { async regOrderStatus(pobj) {
var actionBody = pobj.actionBody; var actionBody = pobj.actionBody;
...@@ -296,7 +300,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -296,7 +300,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj.actionType = "regOrderStatus"; pobj.actionType = "regOrderStatus";
var url = settings.centerOrderUrl() + "action/regapi/springBoard"; var url = settings.centerOrderUrl() + "action/regapi/springBoard";
var rtn = await this.restPostUrl(pobj, url); var rtn = await this.restPostUrl(pobj, url);
console.log('公司宝--rtn---',rtn) console.log('公司宝--rtn---', rtn)
if (actionBody.status == 2) { if (actionBody.status == 2) {
var deliveryObj = { var deliveryObj = {
actionBody: { actionBody: {
...@@ -377,15 +381,15 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -377,15 +381,15 @@ class RegCenterOrderService extends AppServiceBase {
//--------------3. //--------------3.
//提交reg注册方案 //提交reg注册方案
async regSubmitSolution(pobj) { async regSubmitSolution(pobj) {
console.log('reg --- pobj -----',pobj) console.log('reg --- pobj -----', pobj)
var s var s
var subSnLength var subSnLength
if(pobj.actionBody.solutionList){ if (pobj.actionBody.solutionList) {
subSnLength = pobj.actionBody.solutionList.length subSnLength = pobj.actionBody.solutionList.length
for(s = 0; s < subSnLength; s++){ for (s = 0; s < subSnLength; s++) {
if(!pobj.actionBody.solutionList[s].solutionContent.solution.channelSolutionNo){ if (!pobj.actionBody.solutionList[s].solutionContent.solution.channelSolutionNo) {
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
}else{ } else {
pobj.actionType = "updateSolution" pobj.actionType = "updateSolution"
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
} }
...@@ -393,41 +397,41 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -393,41 +397,41 @@ class RegCenterOrderService extends AppServiceBase {
} }
if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolutions) { if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolutions) {
console.log('reg --- res -----',res) console.log('reg --- res -----', res)
var needinfo = res.data.needinfo;//需求信息 var needinfo = res.data.needinfo;//需求信息
var needsolutions = res.data.needsolutions;//方案信息 var needsolutions = res.data.needsolutions;//方案信息
var self = this; var self = this;
var bizTypes; var bizTypes;
var solutionList = []; var solutionList = [];
if(needinfo.uapp_id == regCfg.uappId.baidu){ if (needinfo.uapp_id == regCfg.uappId.baidu) {
//推送数据至baidu //推送数据至baidu
var i=0; var i = 0;
var needsolutionsLength = needsolutions.length; var needsolutionsLength = needsolutions.length;
var channelSolutionNo; var channelSolutionNo;
for(i=0;i<needsolutionsLength;i++){ for (i = 0; i < needsolutionsLength; i++) {
bizTypes = needsolutions[i].solutionContent; bizTypes = needsolutions[i].solutionContent;
console.log('bizTypes-----',bizTypes) console.log('bizTypes-----', bizTypes)
console.log('bizTypes type-----',typeof(bizTypes)) console.log('bizTypes type-----', typeof (bizTypes))
if(typeof(bizTypes) == 'string'){ if (typeof (bizTypes) == 'string') {
bizTypes = JSON.parse(bizTypes) bizTypes = JSON.parse(bizTypes)
} }
bizTypes.solution.area = regCfg.baiduAreaCode[bizTypes.solution.area] bizTypes.solution.area = regCfg.baiduAreaCode[bizTypes.solution.area]
bizTypes.solution.serviceArea = bizTypes.solution.area bizTypes.solution.serviceArea = bizTypes.solution.area
bizTypes.solution.isWhether = true//是否刻章,必带刻章true bizTypes.solution.isWhether = true//是否刻章,必带刻章true
//根据前端传参channelSolutionNo判断是新建方案还是修改方案 //根据前端传参channelSolutionNo判断是新建方案还是修改方案
if(pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo){ if (pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo) {
channelSolutionNo = pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo channelSolutionNo = pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo
var list = { var list = {
bizId:channelSolutionNo, bizId: channelSolutionNo,
gsbBizId:needsolutions[i].solutionNo, gsbBizId: needsolutions[i].solutionNo,
bizType:bizTypes.bizType, bizType: bizTypes.bizType,
solutionContent:bizTypes.solution solutionContent: bizTypes.solution
} }
}else{ } else {
var list = { var list = {
gsbBizId:needsolutions[i].solutionNo, gsbBizId: needsolutions[i].solutionNo,
bizType:bizTypes.bizType, bizType: bizTypes.bizType,
solutionContent:bizTypes.solution solutionContent: bizTypes.solution
} }
} }
solutionList.push(list) solutionList.push(list)
...@@ -435,13 +439,13 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -435,13 +439,13 @@ class RegCenterOrderService extends AppServiceBase {
var pushObj = { var pushObj = {
intentionBizId: needinfo.channelNeedNo, intentionBizId: needinfo.channelNeedNo,
solutionList:solutionList solutionList: solutionList
}; };
console.log('pushObj---pushObj---',pushObj) console.log('pushObj---pushObj---', pushObj)
var pushBaiduRegSolution = await this.pushBaiduRegSolution(pushObj, pobj.appInfo, self); var pushBaiduRegSolution = await this.pushBaiduRegSolution(pushObj, pobj.appInfo, self);
console.log('pushBaiduRegSolution+++',pushBaiduRegSolution) console.log('pushBaiduRegSolution+++', pushBaiduRegSolution)
if(pushBaiduRegSolution.status != 0 ){ if (pushBaiduRegSolution.status != 0) {
return system.getResultFail(-101,pushBaiduRegSolution.msg) return system.getResultFail(-101, pushBaiduRegSolution.msg)
} }
} }
this.logCtl.info({ this.logCtl.info({
...@@ -468,10 +472,13 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -468,10 +472,13 @@ class RegCenterOrderService extends AppServiceBase {
//推送reg方案 //推送reg方案
async pushBaiduRegSolution(pushObj, appInfo, self) { async pushBaiduRegSolution(pushObj, appInfo, self) {
console.log('pushObj++baidu+++',pushObj) console.log('pushObj++baidu+++', pushObj)
//推送方案信息 //推送方案信息
var pushRes = await self.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?submitSolutions=", reqbody: pushObj }); var pushRes = await self.baiduRegClient.baiduReqbyget({
console.log("pushRes----",pushRes) path: "/v1/provider/demand?submitSolutions=",
reqbody: pushObj
});
console.log("pushRes----", pushRes)
if (pushRes && pushRes.status == 0 && pushRes.data && pushRes.data.data && pushRes.data.data.infos) { if (pushRes && pushRes.status == 0 && pushRes.data && pushRes.data.data && pushRes.data.data.infos) {
var reqObj2 = { var reqObj2 = {
actionType: "saveReginfo", actionType: "saveReginfo",
...@@ -481,7 +488,7 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -481,7 +488,7 @@ class RegCenterOrderService extends AppServiceBase {
} }
}; };
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id,用户确认方案url var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id,用户确认方案url
console.log("保存渠道方案id,用户确认方案url aaaa++ ",a) console.log("保存渠道方案id,用户确认方案url aaaa++ ", a)
} }
return pushRes.data; return pushRes.data;
} }
...@@ -519,19 +526,17 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -519,19 +526,17 @@ class RegCenterOrderService extends AppServiceBase {
intentionBizId: pobj.actionBody.channelNeedNo, intentionBizId: pobj.actionBody.channelNeedNo,
note: pobj.actionBody.note note: pobj.actionBody.note
} }
console.log('pushObj----/////',pushObj)
// 推送baidu // 推送baidu
var a = await this.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?close=", reqbody:pushObj}); var tmpResult = await this.baiduRegClient.baiduReqbyget({path: "/v1/provider/demand?close=", reqbody: pushObj});
console.log('regNeedClose+++a----', a)
//查看日志 //查看日志
this.logCtl.info({ this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "", appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "", appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "", requestId: pobj.requestId || "",
op: "service/impl/common/regCenterOrderSve.js/regNeedClose", op: "service/impl/common/regCenterOrderSve.js/regNeedClose",
content: JSON.stringify(a), content: JSON.stringify(pushObj),
resultInfo: "", resultInfo: JSON.stringify(tmpResult),
optitle: "推送baidu-reg关闭需求->closeNeed", optitle: "推送baidu-reg关闭需求返回结果->closeNeed",
}); });
this.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed"); this.utilsPushSve.business2Channel(pobj, "pushCloseICPNeed");
...@@ -543,37 +548,37 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -543,37 +548,37 @@ class RegCenterOrderService extends AppServiceBase {
//提交交付信息/修改订单状态 //提交交付信息/修改订单状态
async regUpdateOrderStatus(pobj) { async regUpdateOrderStatus(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
console.log('推送交付信息/修改订单状态res+++++',res) console.log('推送交付信息/修改订单状态res+++++', res)
console.log('推送交付信息/修改订单状态++pobj+++',pobj) console.log('推送交付信息/修改订单状态++pobj+++', pobj)
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
var deliverContent var deliverContent
if( pobj.actionBody.deliverContent){ if (pobj.actionBody.deliverContent) {
if(pobj.actionBody.deliverContent.companyInfo && pobj.actionBody.deliverContent.companyInfo.serviceArea){ if (pobj.actionBody.deliverContent.companyInfo && pobj.actionBody.deliverContent.companyInfo.serviceArea) {
pobj.actionBody.deliverContent.companyInfo.serviceArea = regCfg.baiduAreaCode[pobj.actionBody.deliverContent.companyInfo.serviceArea] pobj.actionBody.deliverContent.companyInfo.serviceArea = regCfg.baiduAreaCode[pobj.actionBody.deliverContent.companyInfo.serviceArea]
} }
deliverContent = { deliverContent = {
applicationFormUrl:pobj.actionBody.deliverContent.applicationFormUrl || "",//公司注册申请登记表文件 applicationFormUrl: pobj.actionBody.deliverContent.applicationFormUrl || "",//公司注册申请登记表文件
registDocumentsUrl:pobj.actionBody.deliverContent.registDocumentsUrl || "",//注册文件 registDocumentsUrl: pobj.actionBody.deliverContent.registDocumentsUrl || "",//注册文件
baseInfo:pobj.actionBody.deliverContent.baseInfo || {},//基本信息 baseInfo: pobj.actionBody.deliverContent.baseInfo || {},//基本信息
companyInfo:pobj.actionBody.deliverContent.companyInfo || {}//公司信息 companyInfo: pobj.actionBody.deliverContent.companyInfo || {}//公司信息
} }
} }
if(res.data.uapp_id == regCfg.uappId.baidu){ if (res.data.uapp_id == regCfg.uappId.baidu) {
//推送数据至百度 //推送数据至百度
var pushObj = { var pushObj = {
orderNo:res.data.bizId, orderNo: res.data.bizId,
status :res.data.deliveryContent.status, status: res.data.deliveryContent.status,
deliverContent :deliverContent deliverContent: deliverContent
}; };
var self = this; var self = this;
//推送交付信息/修改订单状态 //推送交付信息/修改订单状态
var baidu = await self.baiduRegClient.baiduReqbyget({ path: "/v1/provider/comreg", reqbody: pushObj }); var baidu = await self.baiduRegClient.baiduReqbyget({path: "/v1/provider/comreg", reqbody: pushObj});
console.log('推送交付信息/修改订单状态baidu+++',baidu) console.log('推送交付信息/修改订单状态baidu+++', baidu)
console.log('推送交付信息/修改订单状态pushObj+++',pushObj) console.log('推送交付信息/修改订单状态pushObj+++', pushObj)
return baidu.data return baidu.data
} }
console.log('rsrsr++++------------++++',res) console.log('rsrsr++++------------++++', res)
} }
return res return res
} }
...@@ -581,11 +586,11 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -581,11 +586,11 @@ class RegCenterOrderService extends AppServiceBase {
//reg回写沟通记录 //reg回写沟通记录
async regWriteCommunicationLog(pobj) { async regWriteCommunicationLog(pobj) {
console.log('reg回写沟通记录---',pobj) console.log('reg回写沟通记录---', pobj)
var self = this; var self = this;
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard"; var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
console.log('reg回写沟通记录--result---',result) console.log('reg回写沟通记录--result---', result)
var pushObj = {} var pushObj = {}
if (result && result.status == 0 && result.data) { if (result && result.status == 0 && result.data) {
pushObj = { pushObj = {
...@@ -593,8 +598,11 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -593,8 +598,11 @@ class RegCenterOrderService extends AppServiceBase {
note: pobj.actionBody.note note: pobj.actionBody.note
} }
if (result.data == regCfg.uappId.baidu) { if (result.data == regCfg.uappId.baidu) {
var ress = await self.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?addCommRecord=", reqbody: pushObj }); var ress = await self.baiduRegClient.baiduReqbyget({
if(ress.data.status != 0 ){ path: "/v1/provider/demand?addCommRecord=",
reqbody: pushObj
});
if (ress.data.status != 0) {
return system.getResultFail(ress.data.msg) return system.getResultFail(ress.data.msg)
} }
console.log("regWriteCommunicationLog---------", ress) console.log("regWriteCommunicationLog---------", ress)
...@@ -639,12 +647,13 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -639,12 +647,13 @@ class RegCenterOrderService extends AppServiceBase {
intentionBizId: pobj.actionBody.intentionBizId intentionBizId: pobj.actionBody.intentionBizId
} }
var res = await this.baiduRegClient.baiduReqbyget({ var res = await this.baiduRegClient.baiduReqbyget({
path: "/v1/provider/demand?listCommRecords=", reqbody: pushObj }); path: "/v1/provider/demand?listCommRecords=", reqbody: pushObj
});
console.log('xxcc+++', res) console.log('xxcc+++', res)
} }
} }
if(res && res.data && res.data.infos){ if (res && res.data && res.data.infos) {
res.data['Data'] = res.data.infos res.data['Data'] = res.data.infos
} }
return system.getResultSuccess(res); return system.getResultSuccess(res);
...@@ -654,4 +663,5 @@ class RegCenterOrderService extends AppServiceBase { ...@@ -654,4 +663,5 @@ class RegCenterOrderService extends AppServiceBase {
//-----------接入百度reg------end---------------------------------- //-----------接入百度reg------end----------------------------------
} }
module.exports = RegCenterOrderService; module.exports = RegCenterOrderService;
\ No newline at end of file
...@@ -14,7 +14,7 @@ class UtilsPushService extends AppServiceBase { ...@@ -14,7 +14,7 @@ class UtilsPushService extends AppServiceBase {
let productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl); let productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
pobj.interface_info = productItemInterfaceResult.data; pobj.interface_info = productItemInterfaceResult.data;
//日志记录 //日志记录
this.execClientNew.execLogs(`${pobj.opType}推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`, pobj, "center-channel-utilsPushSve-business2Channel", productItemInterfaceResult.data, null); this.execClientNew.execLogs(`${opType}推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`, pobj, "center-channel-utilsPushSve-business2Channel", productItemInterfaceResult.data, null);
if (pobj.interface_info && pobj.interface_info.length > 0) { if (pobj.interface_info && pobj.interface_info.length > 0) {
let tmpResult = await this.pushBusInfo(pobj, opType, 1); let tmpResult = await this.pushBusInfo(pobj, opType, 1);
return system.getResultSuccess(tmpResult); return system.getResultSuccess(tmpResult);
......
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