Commit d7133a56 by 兰国旗

wancheng

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