Commit 045a1ff9 by 宋毅

增加日志

parent 8df5446b
......@@ -62,6 +62,7 @@ const baiduIcpStatus = {
class BaseCenterOrderService extends AppServiceBase {
constructor() {
super();
this.execClientNew = system.getObject("util.execClientNew");
this.centerOrderUrl = settings.centerOrderUrl();
this.execClient = system.getObject("util.execClient");
this.aliclient = system.getObject("util.aliyunClient");
......@@ -73,7 +74,7 @@ class BaseCenterOrderService extends AppServiceBase {
this.baiduclient = system.getObject("util.baiduClient");
this.utils360Sve = system.getObject("service.utilsSve.utils360Sve")
};
//调用center-order
//调用center-order
async reqCenterOrderApi(pobj, reqUrl) {
var url = this.centerOrderUrl + "action/qcapi/springBoard";
if (reqUrl) {
......@@ -124,10 +125,10 @@ class BaseCenterOrderService extends AppServiceBase {
// var bizType = needinfo.channelTypeCode;//业务类型里
var pushObj = {
IntentionBizId: needinfo.channelNeedNo,
CompanyName: solution.CompanyName,
IcpType: solution.IcpType,
CompanyName: solution.CompanyName,
IcpType: solution.IcpType,
CompanyAddress: solution.CompanyAddress,
Area: solution.Area,
Area: solution.Area,
Note: solution.Note,
ActionType:solution.ActionType,
Source:"官网"
......@@ -137,7 +138,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
var pushIcpSolutionRes = await this.pushIcpSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self);
}
if(needinfo.uapp_id == uappId.baidu){
//推送数据至baidu
// var bizType = needinfo.channelTypeCode;//业务类型里
......@@ -147,7 +148,7 @@ class BaseCenterOrderService extends AppServiceBase {
requirementId: needinfo.channelNeedNo,
companyName: solution.CompanyName,
companyAddress: solution.CompanyAddress,
area: solution.Area,
area: solution.Area,
type:solution.IcpType
};
if (needsolution.channelSolutionNo) {
......@@ -166,7 +167,7 @@ class BaseCenterOrderService extends AppServiceBase {
IntentionBizId: needinfo.channelNeedNo,
CompanyName: solution.CompanyName,
CompanyAddress: solution.CompanyAddress,
Area: solution.Area,
Area: solution.Area,
IcpType:solution.IcpType
};
if (needsolution.channelSolutionNo) {
......@@ -185,7 +186,7 @@ class BaseCenterOrderService extends AppServiceBase {
optitle: "createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
}
var reqParams = {
actionBody: {
intentionBizId: needinfo.channelNeedNo,
......@@ -212,10 +213,10 @@ class BaseCenterOrderService extends AppServiceBase {
//推送数据至阿里
var pushObj = {
IntentionBizId: actionBody.channelNeedNo,
CompanyName: actionBody.CompanyName,
IcpType: actionBody.IcpType,
CompanyName: actionBody.CompanyName,
IcpType: actionBody.IcpType,
CompanyAddress: actionBody.CompanyAddress,
Area: actionBody.Area,
Area: actionBody.Area,
Note: actionBody.Note,
ActionType:actionBody.ActionType,
Source:"官网"
......@@ -232,7 +233,7 @@ class BaseCenterOrderService extends AppServiceBase {
requirementId: actionBody.channelNeedNo,
companyName: actionBody.CompanyName,
companyAddress: actionBody.CompanyAddress,
area: actionBody.Area,
area: actionBody.Area,
type:actionBody.IcpType
};
if (actionBody.channelSolutionNo) {
......@@ -307,7 +308,7 @@ class BaseCenterOrderService extends AppServiceBase {
return system.getResult(null, "execPost data is empty");
}
var pushRes = JSON.parse(rtn.stdout);
// var pushRes = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/plan", reqbody: pushObj });
console.log("pushRes++++",pushRes)
if (pushRes && pushRes.ErrorCode == "200" && pushRes.Success==true && pushRes.BizId) {
......@@ -382,7 +383,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
if(actionBody){
if(actionBody.uapp_id == uappId.ali){
//推送数据至阿里
//推送数据至阿里
var pushObj = {
"BizId": actionBody.BizId,
"Domain": actionBody.Domain,
......@@ -411,7 +412,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
if(actionBody.uapp_id == uappId.baidu){
//推送数据至百度
//推送数据至百度
var pushObj = {
"businessLicense" : {
"address" :actionBody.businessLicense.address || "",
......@@ -482,9 +483,9 @@ class BaseCenterOrderService extends AppServiceBase {
var reqPushParams = {};
if(ab.isTest && ab.isTest==1){
if(res.data.uapp_id == uappId.ali){
//推送数据至阿里
//推送数据至阿里
var BizId = needsolution.channelSolutionNo;//⽅案业务ID
reqPushParams = {
actionBody: {
"uapp_id":res.data.uapp_id,
......@@ -506,9 +507,9 @@ class BaseCenterOrderService extends AppServiceBase {
appInfo: pobj.appInfo
};
}
if(res.data.uapp_id == uappId.baidu){
//推送数据至百度
//推送数据至百度
var BizId = needsolution.orderChannelNo;
console.log('BizId++',BizId)
reqPushParams = {
......@@ -548,7 +549,7 @@ class BaseCenterOrderService extends AppServiceBase {
// console.log('result+++-reqPushParams--++++----',reqPushParams)
}else{
if(res.data.uapp_id == uappId.ali){
//推送数据至阿里
//推送数据至阿里
var BizId = needsolution.channelSolutionNo;//⽅案业务ID
var pushObj = {
"CompanyName":material.CompanyName,
......@@ -579,7 +580,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
if(res.data.uapp_id == uappId.baidu){
//推送数据至百度
//推送数据至百度
var BizId = needsolution.orderChannelNo;
console.log('BizId++',BizId)
var pushObj = {
......@@ -664,12 +665,12 @@ class BaseCenterOrderService extends AppServiceBase {
}else{
var pushRes = JSON.parse(rtn.stdout);
if(pushRes && pushRes.Success && pushRes.Success==true){
aliFlag == 200;
aliFlag == 200;
}else{
aliFlag == -200;
aliFlag == -200;
}
}
}
if(aliFlag == 200 || baiduFlag == 200){
return system.getResultSuccess();
......@@ -680,7 +681,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
return res
}
//队列通知交付状态变更
async serviceProvider2Notification(pobj){
......@@ -741,10 +742,11 @@ class BaseCenterOrderService extends AppServiceBase {
return pushRes;
}
//通知交付状态变更
//通知交付状态变更-所有渠道状态更改
async serviceProviderNotification(pobj) {
console.log('zhuangtai ++++',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
let res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
this.execClientNew.execLogs("serviceProviderNotification-reqCenterOrderApi:", pobj, "center-channel-serviceProviderNotification", res, null);
if (res && res.status == 0 && res.data) {
if(pobj.actionBody.isTest && pobj.actionBody.isTest==1){
var reqPushParams = {};
......@@ -812,9 +814,9 @@ class BaseCenterOrderService extends AppServiceBase {
}else{
var pushRes = JSON.parse(rtn.stdout);
if(pushRes && pushRes.Success && pushRes.Success==true){
enameFlag == 200;
enameFlag == 200;
}else{
enameFlag == -200;
enameFlag == -200;
}
}
}
......@@ -829,7 +831,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
//推送状态变更
var baidu = await this.baiduclient.baiduReqbyget({ path: "/api/bla/provider/license/update", reqbody: pushObj });
console.log('res.data baidu +++++',baidu)
this.execClientNew.execLogs("serviceProviderNotification-baiduReqbyget:", pushObj, "center-channel-serviceProviderNotification", baidu, null);
if(baidu && baidu.data && baidu.data.result){
var baiduFlag = 200
}else{
......@@ -863,7 +865,7 @@ class BaseCenterOrderService extends AppServiceBase {
console.log("eNameCloseOrder+++",pobj)
var pushObj = {}
var orderNo
var note
var note
orderNo = pobj.actionBody.orderNo
note = pobj.actionBody.note
pobj.actionType = "delENameOrder"
......
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