Commit d7133a56 by 兰国旗

wancheng

parent 896bd7ad
...@@ -35,7 +35,7 @@ class BaseAPI extends APIBase { ...@@ -35,7 +35,7 @@ class BaseAPI extends APIBase {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "receiveProgrammeNo"://接收方案编号(方案推送至阿里后,接收保存方案信息) case "receiveProgrammeNo"://接收方案编号(方案推送至阿里后,接收保存方案信息)
opResult = await this.baseqcSve.receiveProgrammeNo(pobj); opResult = await this.aliyunqcSve.receiveProgrammeNo(pobj);
break; break;
case "submitIcpProgramme"://icp方案提交 case "submitIcpProgramme"://icp方案提交
opResult = await this.baseqcSve.submitIcpProgramme(pobj); opResult = await this.baseqcSve.submitIcpProgramme(pobj);
...@@ -47,25 +47,25 @@ class BaseAPI extends APIBase { ...@@ -47,25 +47,25 @@ class BaseAPI extends APIBase {
opResult = await this.baseqcSve.acceptIcpPartnerNotification(pobj); opResult = await this.baseqcSve.acceptIcpPartnerNotification(pobj);
break; break;
case "abolishIcpProgramme"://服务商icp方案关闭 case "abolishIcpProgramme"://服务商icp方案关闭
opResult = await this.baseqcSve.abolishIcpProgramme(pobj); opResult = await this.aliyunqcSve.abolishIcpProgramme(pobj);
break; break;
case "getIcpProgrammeDetail"://获取icp方案 case "getIcpProgrammeDetail"://获取icp方案
opResult = await this.baseqcSve.getIcpProgrammeDetail(pobj); opResult = await this.aliyunqcSve.getIcpProgrammeDetail(pobj);
break; break;
case "getNeedSolutionDetailByUser"://获取方案详情 case "getNeedSolutionDetailByUser"://获取方案详情
opResult = await this.baseqcSve.getNeedSolutionDetailByUser(pobj); opResult = await this.aliyunqcSve.getNeedSolutionDetailByUser(pobj);
break; break;
case "receiveIcpStatusNotify"://接收渠道方案状态变更通知2.3 case "receiveIcpStatusNotify"://接收渠道方案状态变更通知2.3
opResult = await this.baseqcSve.receiveIcpStatusNotify(pobj); opResult = await this.aliyunqcSve.receiveIcpStatusNotify(pobj);
break; break;
case "receiveIcpFeedback"://接收icp用户方案反馈2.2 case "receiveIcpFeedback"://接收icp用户方案反馈2.2
opResult = await this.baseqcSve.receiveIcpFeedback(pobj); opResult = await this.aliyunqcSve.receiveIcpFeedback(pobj);
break; break;
case "getIcpProgrammeDetail"://获取方案详情(内部调用) case "getIcpProgrammeDetail"://获取方案详情(内部调用)
opResult = await this.baseqcSve.getIcpProgrammeDetail(pobj); opResult = await this.aliyunqcSve.getIcpProgrammeDetail(pobj);
break; break;
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表 case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.baseqcSve.getProgrammeInfoByChannelNeedNo(pobj); opResult = await this.aliyunqcSve.getProgrammeInfoByChannelNeedNo(pobj);
break; break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息 case "serviceProviderSubmitMaterial"://交付商提交材料信息
...@@ -75,40 +75,40 @@ class BaseAPI extends APIBase { ...@@ -75,40 +75,40 @@ class BaseAPI extends APIBase {
opResult = await this.baseqcSve.serviceProviderNotification(pobj); opResult = await this.baseqcSve.serviceProviderNotification(pobj);
break; break;
case "closeOrderDelivery"://交付商关闭交付单 case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.baseqcSve.closeOrderDelivery(pobj); opResult = await this.aliyunqcSve.closeOrderDelivery(pobj);
break; break;
case "abolishIcpProgrammeByNeed"://前端关闭ICP需求及方案 case "abolishIcpProgrammeByNeed"://前端关闭ICP需求及方案
opResult = await this.baseqcSve.abolishIcpProgrammeByNeed(pobj); opResult = await this.aliyunqcSve.abolishIcpProgrammeByNeed(pobj);
break; break;
case "receiveIcpConfirmUrl"://前端关闭ICP需求及方案 case "receiveIcpConfirmUrl"://前端关闭ICP需求及方案
opResult = await this.baseqcSve.receiveIcpConfirmUrl(pobj); opResult = await this.aliyunqcSve.receiveIcpConfirmUrl(pobj);
break; break;
//-----------文网文----------- //-----------文网文-----------
case "serviceSubmitOption"://服务商提交服务操作 case "serviceSubmitOption"://服务商提交服务操作
opResult = await this.baseqcSve.serviceSubmitOption(pobj); opResult = await this.aliyunqcSve.serviceSubmitOption(pobj);
break; break;
case "submitWangwenSolution"://提交方案 case "submitWangwenSolution"://提交方案
opResult = await this.baseqcSve.submitWangwenSolution(pobj); opResult = await this.aliyunqcSve.submitWangwenSolution(pobj);
break; break;
case "closeNeed"://关闭需求 case "closeNeed"://关闭需求
opResult = await this.baseqcSve.closeNeed(pobj); opResult = await this.aliyunqcSve.closeNeed(pobj);
break; break;
case "recordLog"://提交沟通记录 case "recordLog"://提交沟通记录
opResult = await this.baseqcSve.recordLog(pobj); opResult = await this.aliyunqcSve.recordLog(pobj);
break; break;
//-----------食品----------- //-----------食品-----------
case "foodServiceSubmitOption"://服务商提交服务操作 case "foodServiceSubmitOption"://服务商提交服务操作
opResult = await this.baseqcSve.foodServiceSubmitOption(pobj); opResult = await this.aliyunqcSve.foodServiceSubmitOption(pobj);
break; break;
case "submitFoodSolution"://提交方案 case "submitFoodSolution"://提交方案
opResult = await this.baseqcSve.submitFoodSolution(pobj); opResult = await this.aliyunqcSve.submitFoodSolution(pobj);
break; break;
case "foodCloseNeed"://关闭需求 case "foodCloseNeed"://关闭需求
opResult = await this.baseqcSve.foodCloseNeed(pobj); opResult = await this.aliyunqcSve.foodCloseNeed(pobj);
break; break;
case "foodRecordLog"://提交沟通记录 case "foodRecordLog"://提交沟通记录
opResult = await this.baseqcSve.foodRecordLog(pobj); opResult = await this.aliyunqcSve.foodRecordLog(pobj);
break; break;
case "receiveOrderStatusNotify"://接收订单状态推送 百度icp 2.3 case "receiveOrderStatusNotify"://接收订单状态推送 百度icp 2.3
......
...@@ -6,6 +6,7 @@ class IcAPI extends APIBase { ...@@ -6,6 +6,7 @@ class IcAPI extends APIBase {
super(); super();
this.needinfoSve = system.getObject("service.dbneed.needinfoSve"); this.needinfoSve = system.getObject("service.dbneed.needinfoSve");
this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve"); this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve");
this.needinfoSve2 = system.getObject("service.dbneed.needinfoSve2");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
...@@ -67,6 +68,9 @@ class IcAPI extends APIBase { ...@@ -67,6 +68,9 @@ class IcAPI extends APIBase {
case "createSolution"://创建方案 case "createSolution"://创建方案
opResult = await this.needsolutionSve.createNewSolution(pobj); opResult = await this.needsolutionSve.createNewSolution(pobj);
break; break;
case "queryExpertApplyCommunicationLogs":// 查询需求沟通记录 2020-10-28 laolan
opResult = await this.needinfoSve2.queryExpertApplyCommunicationLogs(pobj, pobj.actionBody, req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -33,37 +33,37 @@ class IcAPI extends APIBase { ...@@ -33,37 +33,37 @@ class IcAPI extends APIBase {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "submitNeed"://提交需求 case "submitNeed"://提交需求
opResult = await this.needinfoSve2.submitNeed(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.submitNeed(pobj, pobj.actionBody, req);
break; break;
case "submitNeedH5"://工商H5提交需求 case "submitNeedH5"://工商H5提交需求
opResult = await this.needinfoSve2.submitNeedH5(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.submitNeedH5(pobj, pobj.actionBody, req);
break; break;
case "getItemByNeedNo"://获取需求详情 case "getItemByNeedNo"://获取需求详情
opResult = await this.needinfoSve2.getItemByNeedNo(pobj); opResult = await this.needinfoSve.getItemByNeedNo(pobj);
break; break;
case "getItemByChannelNeedNo"://获取需求详情 case "getItemByChannelNeedNo"://获取需求详情
opResult = await this.needinfoSve2.getItemByChannelNeedNo(pobj); opResult = await this.needinfoSve.getItemByChannelNeedNo(pobj);
break; break;
case "needClose"://需求关闭 case "needClose"://需求关闭
opResult = await this.needinfoSve2.needClose(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.needClose(pobj, pobj.actionBody, req);
break; break;
case "getItemByChannelSolutionNo"://渠道方案号获取需求详情 case "getItemByChannelSolutionNo"://渠道方案号获取需求详情
opResult = await this.needinfoSve2.getItemByChannelSolutionNo(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.getItemByChannelSolutionNo(pobj, pobj.actionBody, req);
break; break;
case "writeCommunicationLog"://渠道方案号获取需求详情 case "writeCommunicationLog"://渠道方案号获取需求详情
opResult = await this.needinfoSve2.writeCommunicationLog(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.writeCommunicationLog(pobj, pobj.actionBody, req);
break; break;
case "submitIcpIntention":// 2020 0827 lin 新增 4.1 提交需求 case "submitIcpIntention":// 2020 0827 lin 新增 4.1 提交需求
opResult = await this.needinfoSve2.submitIcpIntention(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.submitIcpIntention(pobj, pobj.actionBody, req);
break; break;
case "queryIntentionList":// 2020 0827 lin 新增 4.2 需求列表查询 case "queryIntentionList":// 2020 0827 lin 新增 4.2 需求列表查询
opResult = await this.needinfoSve2.queryIntentionList(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.queryIntentionList(pobj, pobj.actionBody, req);
break; break;
case "confirmIcpIntention":// 2020 0827 lin 新增 4.3 用户需求确认 case "confirmIcpIntention":// 2020 0827 lin 新增 4.3 用户需求确认
opResult = await this.needinfoSve2.confirmIcpIntention(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.confirmIcpIntention(pobj, pobj.actionBody, req);
break; break;
case "getUnCreated":// 获取需求列表 case "getUnCreated":// 获取需求列表
opResult = await this.needinfoSve2.getUnCreated(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.getUnCreated(pobj, pobj.actionBody, req);
break; break;
case "queryExpertApplyCommunicationLogs":// 查询需求沟通记录 2020-10-28 laolan case "queryExpertApplyCommunicationLogs":// 查询需求沟通记录 2020-10-28 laolan
......
...@@ -6,6 +6,8 @@ class QcAPI extends APIBase { ...@@ -6,6 +6,8 @@ class QcAPI extends APIBase {
super(); super();
this.aliyunqcSve = system.getObject("service.qcutils.aliyunqcSve"); this.aliyunqcSve = system.getObject("service.qcutils.aliyunqcSve");
this.baiduqcSve = system.getObject("service.qcutils.baiduqcSve"); this.baiduqcSve = system.getObject("service.qcutils.baiduqcSve");
this.baseqcSve = system.getObject("service.qcutils.baseqcSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
...@@ -36,7 +38,7 @@ class QcAPI extends APIBase { ...@@ -36,7 +38,7 @@ class QcAPI extends APIBase {
opResult = await this.aliyunqcSve.receiveProgrammeNo(pobj); opResult = await this.aliyunqcSve.receiveProgrammeNo(pobj);
break; break;
case "submitIcpProgramme"://icp方案提交 case "submitIcpProgramme"://icp方案提交
opResult = await this.aliyunqcSve.submitIcpProgramme(pobj); opResult = await this.baseqcSve.submitIcpProgramme(pobj);
break; break;
// case "submitIcpMaterial"://icp材料提交 // case "submitIcpMaterial"://icp材料提交
// opResult = await this.aliyunqcSve.submitIcpMaterial(pobj); // opResult = await this.aliyunqcSve.submitIcpMaterial(pobj);
...@@ -67,10 +69,10 @@ class QcAPI extends APIBase { ...@@ -67,10 +69,10 @@ class QcAPI extends APIBase {
break; break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息 case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.aliyunqcSve.serviceProviderSubmitMaterial(pobj); opResult = await this.baseqcSve.serviceProviderSubmitMaterial(pobj);
break; break;
case "serviceProviderNotification"://交付商通知状态变更 case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.aliyunqcSve.serviceProviderNotification(pobj); opResult = await this.baseqcSve.serviceProviderNotification(pobj);
break; break;
case "closeOrderDelivery"://交付商关闭交付单 case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.aliyunqcSve.closeOrderDelivery(pobj); opResult = await this.aliyunqcSve.closeOrderDelivery(pobj);
......
...@@ -453,16 +453,16 @@ class BaseQcService { ...@@ -453,16 +453,16 @@ class BaseQcService {
} }
} }
//获取需求信息 //获取需求信息
var needinfo = await this.needinfoDao.model.findOne({ // var needinfo = await this.needinfoDao.model.findOne({
where: { needNo: needsolutioninfo.needNo }, raw: true // where: { needNo: needsolutioninfo.needNo }, raw: true
}); // });
if (!needinfo || !needinfo.id) { // if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息"); // return system.getResultFail(-201, "未知需求信息");
} // }
// if (needinfo.status == "ycd" || needinfo.status == "ygb") { // // if (needinfo.status == "ycd" || needinfo.status == "ygb") {
if (needinfo.status == "ygb") { // if (needinfo.status == "ygb") {
return system.getResultFail(-202, "该方案需求状态为" + needinfo.statusName + ",不能执行此操作"); // return system.getResultFail(-202, "该方案需求状态为" + needinfo.statusName + ",不能执行此操作");
} // }
var material = ab.material; var material = ab.material;
if (!material.Domain) { if (!material.Domain) {
return system.getResultFail(-101, "备案域名不能为空"); return system.getResultFail(-101, "备案域名不能为空");
...@@ -495,19 +495,15 @@ class BaseQcService { ...@@ -495,19 +495,15 @@ class BaseQcService {
where: { id: needsolutioninfo.id }, raw: true where: { id: needsolutioninfo.id }, raw: true
}); });
//2020-10-27 laolan start //2020-10-27 laolan start
var needinfo = await self.needinfoDao.model.findOne({
where: { needNo: new_needsolutioninfo.needNo }, raw: true
});
if(needinfo){
var uappIds = needinfo.uapp_id
}
new_needsolutioninfo['uapp_id'] = uappIds;
var orderInfo = await self.orderinfoDao.model.findOne({ var orderInfo = await self.orderinfoDao.model.findOne({
where: {orderNo: ab.orderNo}, raw: true where: {orderNo: ab.orderNo}, raw: true
}) })
if(orderInfo){ if(orderInfo){
new_needsolutioninfo['orderChannelNo'] = orderInfo.channelOrderNo var uappIds = orderInfo.uapp_id;
new_needsolutioninfo['orderChannelNo'] = orderInfo.channelOrderNo;
new_needsolutioninfo['uapp_id'] = uappIds;
} }
console.log('new_needsolutioninfo+++',new_needsolutioninfo)
//2020-10-27 laolan end //2020-10-27 laolan end
return system.getResultSuccess(new_needsolutioninfo); return system.getResultSuccess(new_needsolutioninfo);
...@@ -544,9 +540,7 @@ class BaseQcService { ...@@ -544,9 +540,7 @@ class BaseQcService {
console.log('服务商通知状态变更pobj++++',pobj) console.log('服务商通知状态变更pobj++++',pobj)
var ab = pobj.actionBody; var ab = pobj.actionBody;
var user = pobj.userInfo; var user = pobj.userInfo;
if(pobj.appInfo && pobj.appInfo.uapp_id){
var uappId = pobj.appInfo.uapp_id;
}
if (!user || !user.id) { if (!user || !user.id) {
return system.getResultFail(-100, "未知用户"); return system.getResultFail(-100, "未知用户");
} }
...@@ -582,17 +576,26 @@ class BaseQcService { ...@@ -582,17 +576,26 @@ class BaseQcService {
return system.getResultFail(-405, "操作失败,该流程状态已提交,不能重复提交"); return system.getResultFail(-405, "操作失败,该流程状态已提交,不能重复提交");
} }
//获取需求信息 //获取需求信息
var needinfo = await this.needinfoDao.model.findOne({ // var needinfo = await this.needinfoDao.model.findOne({
where: { needNo: needsolutioninfo.needNo }, raw: true // where: { needNo: needsolutioninfo.needNo }, raw: true
}); // });
if (!needinfo || !needinfo.id) { // if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息"); // return system.getResultFail(-201, "未知需求信息");
} // }
// if (needinfo.status == "ycd" || needinfo.status == "ygb") { // // if (needinfo.status == "ycd" || needinfo.status == "ygb") {
if (needinfo.status == "ygb") { // if (needinfo.status == "ygb") {
return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作"); // return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作");
} // }
var solutionFlowList = solutionContent.solutionFlowList || []; var solutionFlowList = solutionContent.solutionFlowList || [];
var orderuappId = await this.orderinfoDao.model.findOne({
attributes:["uapp_id"],
where: {orderNo: ab.orderNo}, raw: true
})
console.log("orderuappId+++",orderuappId)
if(orderuappId){
var uappId = orderuappId.uapp_id;
}
if (ab.ApplicationStatus == 507) {//完成账户注册 if (ab.ApplicationStatus == 507) {//完成账户注册
if(uappId == '18'){ if(uappId == '18'){
if (solutionContent.status != "USER_CONFIRMED") { if (solutionContent.status != "USER_CONFIRMED") {
...@@ -692,8 +695,7 @@ class BaseQcService { ...@@ -692,8 +695,7 @@ class BaseQcService {
await self.needsolutionDao.update(needsolutioninfo, t); await self.needsolutionDao.update(needsolutioninfo, t);
statusObj["BizId"] = ab.BizId; statusObj["BizId"] = ab.BizId;
//2020-10-27 laolan start //2020-10-27 laolan start
var uappIds = needinfo.uapp_id statusObj['uapp_id'] = uappId;
statusObj['uapp_id'] = uappIds;
statusObj['channelOrderNo'] = channelOrderNo; statusObj['channelOrderNo'] = channelOrderNo;
console.log('statusObj++',statusObj) console.log('statusObj++',statusObj)
//2020-10-27 laolan start //2020-10-27 laolan start
......
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