Commit db0262b9 by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents 8e0cf83e 4ed6c28e
......@@ -41,7 +41,8 @@ var regCfg = {
"330700":"金华",
"220100":"长春",
"430100":"长沙",
"370200":"青岛",
"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 res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
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)
bizTypes = JSON.parse(bizTypes)
console.log('bizTypes++++',bizTypes)
console.log('bizTypes type-----',typeof(bizTypes))
if(typeof(bizTypes) == 'string'){
bizTypes = JSON.parse(bizTypes)
}
bizTypes.solution.area = regCfg.baiduAreaCode[bizTypes.solution.area]
bizTypes.solution.serviceArea = bizTypes.solution.area
bizTypes.solution.isWhether = true//是否刻章,必带刻章true
var list = {
gsbBizId:needsolutions[i].solutionNo,
// bizType:"GSREG",
bizType:bizTypes.bizType,
solutionContent:bizTypes.solution
//根据前端传参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: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查询沟通记录
......
......@@ -535,6 +535,7 @@ class UtilsTmAliyunService extends AppServiceBase {
//-------------------------操作渠道商标信息
async addAliChannelTmApplicant(pobj, actionBody) {//新增ali渠道商标交付信息
return system.getResultSuccess();//钉钉h5商标,接入钉钉内容问题没有处理成功
var tmpPobj = {
actionType: "addAliChannelTmApplicant",
appInfo: pobj.appInfo,
......
......@@ -20,7 +20,7 @@ module.exports = {
"putUserPwdByMobile", "icpNotifyNew",
//百度工商注册
"regGetInfoByChannelNeedNo","submitRegNeed","regFeedbackSubmit","regOrderStatus","regOrderClose",
"getSolutionByChannelOrderNo","getItemByChannelSolutionNo","regSubmitSolution","regNeedClose",
"getSolutionByChannelOrderNo","regSubmitSolution","regNeedClose",
"regWriteCommunicationLog","regQueryExpertCommunicationLogs","regUpdateOrderStatus","regPaySuccess"
],
apiMustUserpinList: [
......@@ -31,7 +31,7 @@ module.exports = {
"rtSubmitMaterial","rtNotification","rtSubmitSolution","rtCloseNeed","rtClosePlan",
//百度工商注册
"regGetInfoByChannelNeedNo","submitRegNeed","regFeedbackSubmit","regOrderStatus","regOrderClose",
"getSolutionByChannelOrderNo","getItemByChannelSolutionNo","regSubmitSolution","regNeedClose",
"getSolutionByChannelOrderNo","regSubmitSolution","regNeedClose",
"regWriteCommunicationLog","regQueryExpertCommunicationLogs","regUpdateOrderStatus","regPaySuccess"
],
apiSecretPathList: [
......
<a name="menu" href="/doc">返回主目录</a>
1. [接口调用说明](#interfaceDesc)
1. [同步需求给服务商](#consultationsubmit)
......@@ -7,6 +8,11 @@
[返回到目录](#menu)
##### 接口描述
统一的接口调用,调用其他接口参考此示例
请求头参数:
--header 'appkey: 202010261354' 
--header 'sign: 067BE4B7D84EDDDC27644F464783C6A6' 
--header 'Content-Type: application/json' 
#### sign签名规则
所有请求参数(去除sign参数)首字符进行ASCII正序排序,对排序后的参数值进行签名,如:area=1&consultType=5&description=需求测试_001&intentionBizIdI=20200320201737000001&phone=13800138000&userName=李四
其中参数值拼接后最后在加上key,key为获取的密钥信息,拼接后字符串:
......
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