Commit 1cdebd1f by 王栋源

wdy

parent 87808f48
...@@ -203,10 +203,10 @@ class CenterorderService extends AppServiceBase { ...@@ -203,10 +203,10 @@ class CenterorderService extends AppServiceBase {
/** /**
* 推送ICP交付信息至企业宝(交付系统) * 推送ICP交付信息至企业宝(交付系统)
*/ */
async pushIcpOrderDelivery2Qfb(orderNo,needsolution){ async pushIcpOrderDelivery2Qfb(orderNo, needsolution) {
var pushObj = { var pushObj = {
orderNo:orderNo, orderNo: orderNo,
needsolution:needsolution needsolution: needsolution
}; };
var url = this.qifubaoUrl + "xxx/xxxxx"; var url = this.qifubaoUrl + "xxx/xxxxx";
var rtn = await this.execClient.execPost(pushObj, url); var rtn = await this.execClient.execPost(pushObj, url);
...@@ -254,7 +254,7 @@ class CenterorderService extends AppServiceBase { ...@@ -254,7 +254,7 @@ class CenterorderService extends AppServiceBase {
if (orderrtn.data) { if (orderrtn.data) {
pobj.actionBody.orderNo = orderrtn.data.orderNo pobj.actionBody.orderNo = orderrtn.data.orderNo
} }
pobj.actionBody.channelSolutionNo=pobj.actionBody.bizId; pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId;
pobj.actionType = "receiveSolutionPayInfo"; pobj.actionType = "receiveSolutionPayInfo";
var url = settings.centerOrderUrl() + "action/icapi/springBoard"; var url = settings.centerOrderUrl() + "action/icapi/springBoard";
...@@ -270,14 +270,27 @@ class CenterorderService extends AppServiceBase { ...@@ -270,14 +270,27 @@ class CenterorderService extends AppServiceBase {
if (solutiondata.data && solutiondata.data.channelNeedNo) { if (solutiondata.data && solutiondata.data.channelNeedNo) {
pobj.actionBody.needId = solutiondata.data.channelNeedNo; pobj.actionBody.needId = solutiondata.data.channelNeedNo;
} }
if(pobj.actionBody.channelItemCode=='5'){ if (pobj.actionBody.channelItemCode == '5') {
pobj.actionBody.regType="ali.icp"; pobj.actionBody.regType = "ali.icp";
}else if(pobj.actionBody.channelItemCode=='7'){ } else if (pobj.actionBody.channelItemCode == '7') {
pobj.actionBody.regType="ali.edi"; pobj.actionBody.regType = "ali.edi";
} }
if (solutiondata.status == 0) { if (solutiondata.status == 0) {
var fqobj = {
"actionType": "getOrderDetails",
"actionBody":
{
"area": pobj.actionBody.province,
"city": pobj.actionBody.province,
"regType": pobj.actionBody.regType,
"orderNo": pobj.actionBody.channelOrder.channelOrderNo,
"orderPrice": pobj.actionBody.orderPrice,
"phone": pobj.actionBody.mobile,
"needId": solutiondata.data.channelNeedNo
}
}
pobj.actionBody.orderNo = pobj.actionBody.channelOrder.channelOrderNo; pobj.actionBody.orderNo = pobj.actionBody.channelOrder.channelOrderNo;
this.utilsPushSve.aliBusiness2Fq(pobj, "paySuccess"); this.utilsPushSve.aliBusiness2Fq(fqobj, "pushOrderICPBusiness");
} }
return system.getResultSuccess(); return system.getResultSuccess();
} }
...@@ -307,7 +320,7 @@ class CenterorderService extends AppServiceBase { ...@@ -307,7 +320,7 @@ class CenterorderService extends AppServiceBase {
}; };
var self = this; var self = this;
//推送方案 //推送方案
this.pushIcpSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self); this.pushIcpSolution(pushObj, needsolution.solutionNo, pobj.appInfo, self);
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -330,7 +343,7 @@ class CenterorderService extends AppServiceBase { ...@@ -330,7 +343,7 @@ class CenterorderService extends AppServiceBase {
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id
if (a && a.status == 0) { if (a && a.status == 0) {
//推送方案确认信息 //推送方案确认信息
await self.aliclient.reqbyget({action:"ConfirmIntention",reqbody:{BizId:pushObj.IntentionBizId},apiVersion:"2019-05-08"}); await self.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
} }
} }
} }
...@@ -376,7 +389,7 @@ class CenterorderService extends AppServiceBase { ...@@ -376,7 +389,7 @@ class CenterorderService extends AppServiceBase {
}; };
var self = this; var self = this;
//推送方案材料 //推送方案材料
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();
} }
return res; return res;
...@@ -389,12 +402,12 @@ class CenterorderService extends AppServiceBase { ...@@ -389,12 +402,12 @@ class CenterorderService extends AppServiceBase {
//推送数据至阿里 //推送数据至阿里
// var pushObj = res.data; // var pushObj = res.data;
var pushObj = { var pushObj = {
BizId:res.data.BizId, BizId: res.data.BizId,
OfficialFileURL:res.data.OfficialFileURL, OfficialFileURL: res.data.OfficialFileURL,
ApplicationStatus:res.data.ApplicationStatus ApplicationStatus: res.data.ApplicationStatus
}; };
//推送方案 //推送方案
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"}); this.aliclient.reqbyget({ action: "AcceptPartnerNotification", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -413,81 +426,81 @@ class CenterorderService extends AppServiceBase { ...@@ -413,81 +426,81 @@ class CenterorderService extends AppServiceBase {
BizId: ab.BizId, Note: ab.Note BizId: ab.BizId, Note: ab.Note
}; };
//关闭方案 //关闭方案
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"}); this.aliclient.reqbyget({ action: "CloseIcpProduce", reqbody: pushObj, apiVersion: "2019-05-08" });
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
} }
//--------------------------阿里ICP---end-------------------------------------------------------- //--------------------------阿里ICP---end--------------------------------------------------------
//LOGO场景接口服务 //LOGO场景接口服务
async downloadlogoscene(pobj){ async downloadlogoscene(pobj) {
var reqUrl = "http://123.57.217.203:4724/api/downloadscene";//"http://ailogo-service/api/downloadscene"; var reqUrl = "http://123.57.217.203:4724/api/downloadscene";//"http://ailogo-service/api/downloadscene";
var obj = pobj.actionBody; var obj = pobj.actionBody;
if(!obj.title){ if (!obj.title) {
return system.getResult(null,"品牌名称不能为空"); return system.getResult(null, "品牌名称不能为空");
} }
if(!obj.id){ if (!obj.id) {
return system.getResult(null,"品牌id不能为空"); return system.getResult(null, "品牌id不能为空");
} }
var rtn = null; var rtn = null;
try { try {
rtn = await this.execClient.execPost(obj, reqUrl); rtn = await this.execClient.execPost(obj, reqUrl);
var res = JSON.parse(rtn.stdout); var res = JSON.parse(rtn.stdout);
return res; return res;
}catch (e) { } catch (e) {
return system.getResult(null,"获取logo场景异常"); return system.getResult(null, "获取logo场景异常");
} }
} }
//换一批logo //换一批logo
async changelogo(pobj){ async changelogo(pobj) {
var reqUrl = "http://123.57.217.203:4724/api/changelogo"; var reqUrl = "http://123.57.217.203:4724/api/changelogo";
var obj = pobj.actionBody; var obj = pobj.actionBody;
if(!obj.title){ if (!obj.title) {
return system.getResult(null,"品牌名称不能为空"); return system.getResult(null, "品牌名称不能为空");
} }
if(!obj.profession){ if (!obj.profession) {
return system.getResult(null,"行业名称不能为空"); return system.getResult(null, "行业名称不能为空");
} }
if(!obj.description){ if (!obj.description) {
obj.description=""; obj.description = "";
} }
var rtn = null; var rtn = null;
try { try {
rtn = await this.execClient.execPost(obj, reqUrl); rtn = await this.execClient.execPost(obj, reqUrl);
var res = JSON.parse(rtn.stdout); var res = JSON.parse(rtn.stdout);
return res; return res;
}catch (e) { } catch (e) {
return system.getResult(null,"获取logo异常"); return system.getResult(null, "获取logo异常");
} }
} }
//生成logo //生成logo
async singlelogo(pobj){ async singlelogo(pobj) {
var reqUrl = "http://123.57.217.203:4724/api/singlelogo"; var reqUrl = "http://123.57.217.203:4724/api/singlelogo";
var obj = pobj.actionBody; var obj = pobj.actionBody;
if(!obj.title){ if (!obj.title) {
return system.getResult(null,"品牌名称不能为空"); return system.getResult(null, "品牌名称不能为空");
} }
// if(!obj.subtitle){ // if(!obj.subtitle){
// return system.getResult(null,"品牌标语不能为空"); // return system.getResult(null,"品牌标语不能为空");
// } // }
if(!obj.profession){ if (!obj.profession) {
return system.getResult(null,"行业名称不能为空"); return system.getResult(null, "行业名称不能为空");
} }
if(!obj.description){ if (!obj.description) {
obj.description=""; obj.description = "";
} }
var rtn = null; var rtn = null;
try { try {
rtn = await this.execClient.execPost(obj, reqUrl); rtn = await this.execClient.execPost(obj, reqUrl);
var res = JSON.parse(rtn.stdout); var res = JSON.parse(rtn.stdout);
if(res && res.status==0 && res.data){ if (res && res.status == 0 && res.data) {
return res;//system.getResultSuccess(res.data); return res;//system.getResultSuccess(res.data);
}else{ } else {
return system.getResult(null,"生成logo操作失败"); return system.getResult(null, "生成logo操作失败");
} }
}catch (e) { } catch (e) {
return system.getResult(null,"生成logo操作异常"); return system.getResult(null, "生成logo操作异常");
} }
} }
} }
......
...@@ -45,9 +45,9 @@ class UtilsNeedService extends AppServiceBase { ...@@ -45,9 +45,9 @@ class UtilsNeedService extends AppServiceBase {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness"); this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness");
}else{ }else{
if(pobj.actionBody.channel_type_code==5){ if(pobj.actionBody.channel_type_code==5){
pobj.actionBody.regType="ali.icp"; pobj.actionBody.type="ali.icp";
}else{ }else{
pobj.actionBody.regType="ali.edi"; pobj.actionBody.type="ali.edi";
} }
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness"); this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness");
} }
......
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