Commit c41498db by 兰国旗

laolan

parent fbce9085
......@@ -42,6 +42,7 @@ var regCfg = {
"220100":"长春",
"430100":"长沙",
"370200":"青岛",
"410200":"开封",
"230100":"哈尔滨",
"130100":"石家庄"
},
......@@ -86,6 +87,7 @@ var regCfg = {
"长春": "220100",
"长沙": "430100",
"青岛": "370200",
"开封": "410200",
"哈尔滨":"230100",
"石家庄":"130100"
},
......
......@@ -71,8 +71,6 @@ class RegCenterOrderService extends AppServiceBase {
pobj.actionBody.channelNeedNo = data.data.channelNeedNo || data.data.bizId ;
pobj.actionBody.needNo = data.data.needNo;
pobj.actionBody.quantity = 1;
pobj.actionBody.price_desc = pobj.actionBody.taxpayerType;
pobj.actionBody.additions_desc = pobj.actionBody.companyProperties;
pobj.actionBody.channelOrder = {
channelServiceNo: pobj.actionBody.orderNo,
channelOrderNo: pobj.actionBody.orderNo,
......@@ -117,7 +115,9 @@ class RegCenterOrderService extends AppServiceBase {
orderNo: pobj.actionBody.channelOrder.channelOrderNo,
orderPrice: Number(pobj.actionBody.orderPrice / 100),
phone: pobj.actionBody.publishMobile,
needId: solutiondata.data.channelNeedNo
needId: solutiondata.data.channelNeedNo,
price_desc : pobj.actionBody.taxpayerType,
additions_desc : pobj.actionBody.companyProperties
// companyName:solutiondata.data.solutionContent.CompanyName || ''
},
appInfo: pobj.appInfo
......@@ -382,7 +382,20 @@ class RegCenterOrderService extends AppServiceBase {
//提交reg注册方案
async regSubmitSolution(pobj) {
console.log('reg --- pobj -----',pobj)
var s
var subSnLength
if(pobj.actionBody.solutionList){
subSnLength = pobj.actionBody.solutionList.length
for(s = 0; s < subSnLength; s++){
if(!pobj.actionBody.solutionList[s].solutionContent.solution.channelSolutionNo){
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
}else{
pobj.actionType = "updateSolution"
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
}
}
}
if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolutions) {
console.log('reg --- res -----',res)
var needinfo = res.data.needinfo;//需求信息
......@@ -394,22 +407,36 @@ class RegCenterOrderService extends AppServiceBase {
//推送数据至baidu
var i=0;
var needsolutionsLength = needsolutions.length;
var channelSolutionNo;
for(i=0;i<needsolutionsLength;i++){
bizTypes = needsolutions[i].solutionContent;
console.log('bizTypes-----',bizTypes)
console.log('bizTypes type-----',typeof(bizTypes))
if(typeof(bizTypes) == 'string'){
bizTypes = JSON.parse(bizTypes)
console.log('bizTypes++++',bizTypes)
}
bizTypes.solution.area = regCfg.baiduAreaCode[bizTypes.solution.area]
bizTypes.solution.serviceArea = bizTypes.solution.area
bizTypes.solution.isWhether = true//是否刻章,必带刻章true
//根据前端传参channelSolutionNo判断是新建方案还是修改方案
if(pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo){
channelSolutionNo = pobj.actionBody.solutionList[i].solutionContent.solution.channelSolutionNo
var list = {
bizId:channelSolutionNo,
gsbBizId:needsolutions[i].solutionNo,
// bizType:"GSREG",
bizType:bizTypes.bizType,
solutionContent:bizTypes.solution
}
}else{
var list = {
gsbBizId:needsolutions[i].solutionNo,
bizType:bizTypes.bizType,
solutionContent:bizTypes.solution
}
}
solutionList.push(list)
}
var pushObj = {
intentionBizId: needinfo.channelNeedNo,
solutionList:solutionList
......@@ -417,8 +444,8 @@ class RegCenterOrderService extends AppServiceBase {
console.log('pushObj---pushObj---',pushObj)
var pushBaiduRegSolution = await this.pushBaiduRegSolution(pushObj, pobj.appInfo, self);
console.log('pushBaiduRegSolution+++',pushBaiduRegSolution)
if(pushBaiduRegSolution.data.status != 0 ){
return system.getResultFail(-101,pushBaiduRegSolution.data.msg)
if(pushBaiduRegSolution.status != 0 ){
return system.getResultFail(-101,pushBaiduRegSolution.msg)
}
}
this.logCtl.info({
......@@ -460,7 +487,7 @@ class RegCenterOrderService extends AppServiceBase {
var a = await self.reqCenterOrderApi(reqObj2);//保存渠道方案id,用户确认方案url
console.log("保存渠道方案id,用户确认方案url aaaa++ ",a)
}
return pushRes;
return pushRes.data;
}
//reg关闭需求
......@@ -586,6 +613,9 @@ class RegCenterOrderService extends AppServiceBase {
}
if (result.data == regCfg.uappId.baidu) {
var ress = await self.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?addCommRecord=", reqbody: pushObj });
if(ress.data.status != 0 ){
return system.getResultFail(ress.data.msg)
}
console.log("regWriteCommunicationLog---------", ress)
}
}
......@@ -610,7 +640,7 @@ class RegCenterOrderService extends AppServiceBase {
appInfo: pobj.appInfo
}
self.utilsPushSve.baiduBusiness2Fq(fqobj, "aliFollowup");
return system.getResultSuccess();
return result
}
//reg查询沟通记录
......
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