Commit 4e11108a by 兰国旗

laolan

parent 1104c0a6
......@@ -48,22 +48,22 @@ class RegAPI extends APIBase {
opResult = await this.regCenterOrderSve.getSolutionByChannelOrderNo(pobj, pobj.actionBody);
break;
//------------3.
case "submitRegSolution"://方案提交
opResult = await this.regCenterOrderSve.submitRegSolution(pobj);
case "regSubmitSolution"://方案提交
opResult = await this.regCenterOrderSve.regSubmitSolution(pobj);
break;
case "writeRegCommunicationLog"://新增沟通记录
opResult = await this.regCenterOrderSve.writeRegCommunicationLog(pobj);
case "regWriteCommunicationLog"://新增沟通记录
opResult = await this.regCenterOrderSve.regWriteCommunicationLog(pobj);
break;
case "queryExpertRegCommunicationLogs"://获取沟通记录
opResult = await this.regCenterOrderSve.queryExpertRegCommunicationLogs(pobj);
case "regQueryExpertCommunicationLogs"://获取沟通记录
opResult = await this.regCenterOrderSve.regQueryExpertCommunicationLogs(pobj);
break;
case "updateOrdertatus"://提交交付信息/修改订单状态
opResult = await this.regCenterOrderSve.updateOrdertatus(pobj);
case "regUpdateOrderStatus"://提交交付信息/修改订单状态
opResult = await this.regCenterOrderSve.regUpdateOrderStatus(pobj);
break;
case "regNeedClose"://需求关闭
opResult = await this.regCenterOrderSve.regNeedClose(pobj);
break;
case "getRegInfoByChannelNeedNo"://获取需求方案列表
case "regGetInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.regCenterOrderSve.reqCenterOrderApi(pobj,"action/regapi/springBoard");
break;
// case "closeRegSolution"://服务商方案关闭
......
......@@ -99,9 +99,24 @@ var regCfg = {
},
//区分渠道的uappid
uappId : {
'ali':18,
'baidu':44
},
//交付状态
deliverRegStatus:{
'RECEIVED': 'RECEIVED',//已接单
'COLLECTING': 'COLLECTING',//材料收集环节
'AUDITING': 'AUDITING',//工商审核环节
'ENGRAVING': 'ENGRAVING',//刻章环节
'SUCCESS': 'SUCCESS' //已完成
},
//交付状态
deliverStatus:{
'RECEIVED': '已接单',//
'COLLECTING': '材料收集环节',//
'AUDITING': '工商审核环节',//
'ENGRAVING': '刻章环节',//
'SUCCESS': '已完成' //
},
//返回结果配置
getUUID() {
var uuid = uuidv4();
......
......@@ -91,7 +91,7 @@ async regPaySuccess(pobj) {
}
pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId;
pobj.actionType = "receiveSolutionPayInfoNew";
pobj.actionType = "regReceiveSolutionPayInfo";
var url = settings.centerOrderUrl() + "action/regCenterOrder/springBoard";
var solutionrtn = await this.execClient.execPost(pobj, url);
if (!solutionrtn || !solutionrtn.stdout) {
......@@ -242,7 +242,7 @@ async regPaySuccess(pobj) {
}
pobj.actionType = "submitRegNeed";
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
// var reqParams = {
......@@ -357,33 +357,6 @@ async regPaySuccess(pobj) {
}
//提交交付信息/修改订单状态
async updateOrdertatus(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
console.log('zzzzlllll+++++',res)
console.log('zzzzlllll++pobj+++',pobj)
if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息
var ab = pobj.actionBody;
if(res.data.uapp_id == regCfg.uappId.baidu){
//推送数据至百度
var BizId = needsolution.orderChannelNo;
console.log('BizId++',BizId)
var pushObj = {
orderNo:,
status :,
deliverContent :
};
var self = this;
//推送交付信息/修改订单状态
var baidu = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/license/material", reqbody: pushObj });
console.log('推送交付信息/修改订单状态baidu+++',baidu)
}
console.log('rsrsr++++------------++++',res)
return res
}
}
//通知交付状态变更
......@@ -410,7 +383,7 @@ async regPaySuccess(pobj) {
//--------------3.
//提交reg注册方案
async submitRegSolution(pobj) {
async regSubmitSolution(pobj) {
console.log('reg --- pobj -----',pobj)
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolutions) {
......@@ -489,8 +462,106 @@ async regPaySuccess(pobj) {
}
}
//reg关闭需求
async regNeedClose(pobj) {
pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo;
pobj.actionType = "regNeedClose"
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('regNeedClose+++result', result)
var i;
var len = result.data.length
var orders = []
if (result.status == 0) {
for(i=0;i<len;i++){
if (result.data && result.data[i].orderNo) {
orders.push(result.data[i].orderNo)
pobj.actionBody.orderNo = orders;
var orderrtn = await this.utilsOrderSve.delOrders(pobj, pobj.actionBody);
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
}
}
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.needNo,
status: "closeNeed"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/common/regCenterOrderSve.js/regNeedClose",
content: JSON.stringify(reqParams),
resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
var pushObj = {
IntentionBizId: pobj.actionBody.needNo,
Note: pobj.actionBody.note
}
// 推送baidu
var a = await this.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?close=", pushObj});
console.log('regNeedClose+++', a)
//查看日志
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/common/regCenterOrderSve.js/regNeedClose",
content: JSON.stringify(a),
resultInfo: "",
optitle: "推送baidu-reg关闭需求->closeNeed",
});
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
}
return result;
}
//提交交付信息/修改订单状态
async regUpdateOrderStatus(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/regapi/springBoard");
console.log('zzzzlllll+++++',res)
console.log('zzzzlllll++pobj+++',pobj)
if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息
var deliverContent = {
applicationFormUrl:"",//公司注册申请登记表文件
registDocumentsUrl:"",//注册文件
baseInfo:res.data.solution,//基本信息
companyInfo:""//公司信息
}
if(res.data.uapp_id == regCfg.uappId.baidu){
//推送数据至百度
var BizId = needsolution.orderChannelNo;
console.log('BizId++',BizId)
var pushObj = {
orderNo:res.data.bizId,
status :res.data.status,
deliverContent :deliverContent
};
var self = this;
//推送交付信息/修改订单状态
var baidu = await self.baiduRegClient.baiduReqbyget({ path: "/v1/provider/order", reqbody: pushObj });
console.log('推送交付信息/修改订单状态baidu+++',baidu)
}
console.log('rsrsr++++------------++++',res)
return res
}
}
//reg回写沟通记录
async writeRegCommunicationLog(pobj) {
async regWriteCommunicationLog(pobj) {
var self = this;
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
......@@ -530,7 +601,7 @@ async regPaySuccess(pobj) {
}
//reg查询沟通记录
async queryExpertRegCommunicationLogs(pobj) {
async regQueryExpertCommunicationLogs(pobj) {
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('jilu+++result++++', result)
......@@ -556,69 +627,6 @@ async regPaySuccess(pobj) {
}
//reg关闭需求
async regNeedClose(pobj) {
pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo;
pobj.actionType = "regNeedClose"
var reqUrl = this.centerOrderUrl + "action/regapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
console.log('regNeedClose+++result', result)
var i;
var len = result.data.length
var orders = []
if (result.status == 0) {
for(i=0;i<len;i++){
if (result.data && result.data[i].orderNo) {
orders.push(result.data[i].orderNo)
pobj.actionBody.orderNo = orders;
var orderrtn = await this.utilsOrderSve.delOrders(pobj, pobj.actionBody);
if (orderrtn.status < 0) {
return system.getResultFail(-5022, "订单关闭失败");
}
}
}
//推送交付系统
var reqParams = {
actionBody: {
intentionBizId: pobj.actionBody.needNo,
status: "closeNeed"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
}
this.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
//日志记录
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/common/regCenterOrderSve.js/regNeedClose",
content: JSON.stringify(reqParams),
resultInfo: "",
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
var pushObj = {
IntentionBizId: pobj.actionBody.needNo,
Note: pobj.actionBody.note
}
// 推送baidu
var a = await this.baiduRegClient.baiduReqbyget({ path: "/v1/provider/demand?close=", pushObj});
console.log('regNeedClose+++', a)
//查看日志
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/impl/common/regCenterOrderSve.js/regNeedClose",
content: JSON.stringify(a),
resultInfo: "",
optitle: "推送baidu-reg关闭需求->closeNeed",
});
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
}
return result;
}
//-----------接入百度reg------end----------------------------------
}
......
......@@ -28,7 +28,7 @@ module.exports = {
"ncSubmitMaterial","ncNotification","ncSubmitSolution","ncCloseNeed","ncClosePlan",
"rtSubmitMaterial","rtNotification","rtSubmitSolution","rtCloseNeed","rtClosePlan",
//百度工商注册
"submitRegSolution","writeRegCommunicationLog","queryExpertRegCommunicationLogs","updateOrdertatus","closeBdRegNeed"
"regSubmitSolution","regWriteCommunicationLog","regQueryExpertCommunicationLogs","regUpdateOrderStatus","regNeedClose","regGetInfoByChannelNeedNo"
],
apiSecretPathList: [
"/api/icp/consultation/submit",
......
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