Commit 52c4d8c8 by 宋毅

增加返回值

parent 95d2f395
...@@ -69,9 +69,6 @@ class QcAPI extends APIBase { ...@@ -69,9 +69,6 @@ class QcAPI extends APIBase {
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表 case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.aliyunqcSve.getProgrammeInfoByChannelNeedNo(pobj); opResult = await this.aliyunqcSve.getProgrammeInfoByChannelNeedNo(pobj);
break; break;
case "getServiceProviderSubmitMaterial"://获取交付商提交材料信息
opResult = await this.baseqcSve.getServiceProviderSubmitMaterial(pobj);
break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息 case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.baseqcSve.serviceProviderSubmitMaterial(pobj); opResult = await this.baseqcSve.serviceProviderSubmitMaterial(pobj);
break; break;
......
const system = require("../../../system"); const system = require("../../../system");
const moment = require('moment'); const moment = require('moment');
/** /**
* 阿里云增值电信相关接口(ICP、EDI) * 阿里云增值电信相关接口(ICP、EDI)
* created by zhuangbing * created by zhuangbing
...@@ -66,7 +67,7 @@ class BaseQcService { ...@@ -66,7 +67,7 @@ class BaseQcService {
//获取需求信息 //获取需求信息
var needinfo = await this.needinfoDao.model.findOne({ var needinfo = await this.needinfoDao.model.findOne({
attributes: ["id", "status", "statusName", "needNo", "uapp_id"],//2020-10-29 laolan xinzeng uapp_id attributes: ["id", "status", "statusName", "needNo", "uapp_id"],//2020-10-29 laolan xinzeng uapp_id
where: { channelNeedNo: ab.intentionBizId }, raw: true where: {channelNeedNo: ab.intentionBizId}, raw: true
}); });
var uappId = {}; var uappId = {};
if (!needinfo || !needinfo.id) { if (!needinfo || !needinfo.id) {
...@@ -80,7 +81,7 @@ class BaseQcService { ...@@ -80,7 +81,7 @@ class BaseQcService {
} }
//获取方案信息 //获取方案信息
var ns = await this.needsolutionDao.model.findOne({ var ns = await this.needsolutionDao.model.findOne({
where: { needNo: needinfo.needNo, isInvalid: 0 }, raw: true where: {needNo: needinfo.needNo, isInvalid: 0}, raw: true
}); });
if (ns && ns.id) { if (ns && ns.id) {
...@@ -101,7 +102,10 @@ class BaseQcService { ...@@ -101,7 +102,10 @@ class BaseQcService {
}; };
await self.needinfoDao.update(needObj, t);//关闭需求 await self.needinfoDao.update(needObj, t);//关闭需求
if (ns && ns.id) { if (ns && ns.id) {
await self.needsolutionDao.model.update({ status: "yzf", isInvalid: 1 }, { where: { id: ns.id }, transaction: t });//方案废弃 await self.needsolutionDao.model.update({status: "yzf", isInvalid: 1}, {
where: {id: ns.id},
transaction: t
});//方案废弃
// return system.getResultSuccess(ns.orderNo); // return system.getResultSuccess(ns.orderNo);
ns = ns ? ns : {}; ns = ns ? ns : {};
ns = Object.assign(ns, uappId) ns = Object.assign(ns, uappId)
...@@ -120,7 +124,6 @@ class BaseQcService { ...@@ -120,7 +124,6 @@ class BaseQcService {
} }
//提交方案 //提交方案
async submitIcpProgramme(pobj) { async submitIcpProgramme(pobj) {
console.log("pobj++++", pobj) console.log("pobj++++", pobj)
...@@ -138,7 +141,7 @@ class BaseQcService { ...@@ -138,7 +141,7 @@ class BaseQcService {
} }
//获取需求信息 //获取需求信息
var needinfo = await this.needinfoDao.model.findOne({ var needinfo = await this.needinfoDao.model.findOne({
where: { channelNeedNo: ab.needNo }, raw: true where: {channelNeedNo: ab.needNo}, raw: true
}); });
if (!needinfo || !needinfo.id) { if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息"); return system.getResultFail(-201, "未知需求信息");
...@@ -160,7 +163,7 @@ class BaseQcService { ...@@ -160,7 +163,7 @@ class BaseQcService {
ab.solutionContent.typeCode = needinfo.typeCode; ab.solutionContent.typeCode = needinfo.typeCode;
ab.solutionContent.typeName = needinfo.typeName; ab.solutionContent.typeName = needinfo.typeName;
var ns = await this.needsolutionDao.model.findAll({ var ns = await this.needsolutionDao.model.findAll({
where: { channelNeedNo: ab.needNo }, raw: true, order: [["id", 'asc']] where: {channelNeedNo: ab.needNo}, raw: true, order: [["id", 'asc']]
}); });
for (var i = 0; i < ns.length; i++) { for (var i = 0; i < ns.length; i++) {
var fa = ns[i]; var fa = ns[i];
...@@ -179,7 +182,7 @@ class BaseQcService { ...@@ -179,7 +182,7 @@ class BaseQcService {
return system.getResultFail(-103, "方案交付信息有误"); return system.getResultFail(-103, "方案交付信息有误");
} }
//判断属于渠道 18阿里,44百度,52易名 //判断属于渠道 18阿里,44百度,52易名
if(needinfo.uapp_id == 44 || needinfo.uapp_id == 18){ if (needinfo.uapp_id == 44 || needinfo.uapp_id == 18) {
if (needinfo.channelTypeCode == "7") {//edi if (needinfo.channelTypeCode == "7") {//edi
ab.solutionContent.solution.IcpType = 2; ab.solutionContent.solution.IcpType = 2;
} else if (needinfo.channelTypeCode == "5") {//icp } else if (needinfo.channelTypeCode == "5") {//icp
...@@ -188,7 +191,7 @@ class BaseQcService { ...@@ -188,7 +191,7 @@ class BaseQcService {
return system.getResultFail(-207, "需求业务类型有误"); return system.getResultFail(-207, "需求业务类型有误");
} }
} }
if(needinfo.uapp_id == 52){ if (needinfo.uapp_id == 52) {
if (needinfo.channelTypeCode == "7") {//edisq if (needinfo.channelTypeCode == "7") {//edisq
ab.solutionContent.solution.IcpType = 2; ab.solutionContent.solution.IcpType = 2;
} else if (needinfo.channelTypeCode == "5") {//icpsq } else if (needinfo.channelTypeCode == "5") {//icpsq
...@@ -197,7 +200,7 @@ class BaseQcService { ...@@ -197,7 +200,7 @@ class BaseQcService {
ab.solutionContent.solution.IcpType = 3; ab.solutionContent.solution.IcpType = 3;
} else if (needinfo.channelTypeCode == "EIDNB") {//EIDNB } else if (needinfo.channelTypeCode == "EIDNB") {//EIDNB
ab.solutionContent.solution.IcpType = 4; ab.solutionContent.solution.IcpType = 4;
}else if (needinfo.channelTypeCode == "ICPXQ") {//ICPXQ } else if (needinfo.channelTypeCode == "ICPXQ") {//ICPXQ
ab.solutionContent.solution.IcpType = 5; ab.solutionContent.solution.IcpType = 5;
} else if (needinfo.channelTypeCode == "EIDXQ") {//EIDXQ } else if (needinfo.channelTypeCode == "EIDXQ") {//EIDXQ
ab.solutionContent.solution.IcpType = 6; ab.solutionContent.solution.IcpType = 6;
...@@ -223,7 +226,9 @@ class BaseQcService { ...@@ -223,7 +226,9 @@ class BaseQcService {
} }
var solutionFlowList = ab.solutionContent.solutionFlowList || []; var solutionFlowList = ab.solutionContent.solutionFlowList || [];
solutionFlowList.push({ solutionFlowList.push({
status: "SOLUTION_SUBMIT", statusName: this.icpSolutionStatusReference.SOLUTION_SUBMIT, updated_at: new Date() status: "SOLUTION_SUBMIT",
statusName: this.icpSolutionStatusReference.SOLUTION_SUBMIT,
updated_at: new Date()
}); });
ab.solutionContent.status = "SOLUTION_SUBMIT"; ab.solutionContent.status = "SOLUTION_SUBMIT";
ab.solutionContent.statusName = this.icpSolutionStatusReference.SOLUTION_SUBMIT; ab.solutionContent.statusName = this.icpSolutionStatusReference.SOLUTION_SUBMIT;
...@@ -272,9 +277,9 @@ class BaseQcService { ...@@ -272,9 +277,9 @@ class BaseQcService {
} }
await self.needinfoDao.update(needObj, t); await self.needinfoDao.update(needObj, t);
needinfo = await self.needinfoDao.model.findOne({ needinfo = await self.needinfoDao.model.findOne({
where: { id: needinfo.id }, raw: true where: {id: needinfo.id}, raw: true
}); });
return system.getResultSuccess({ needinfo: needinfo, needsolution: od }); return system.getResultSuccess({needinfo: needinfo, needsolution: od});
} else { } else {
return system.getResultFail(-302, "提交方案失败"); return system.getResultFail(-302, "提交方案失败");
} }
...@@ -290,7 +295,7 @@ class BaseQcService { ...@@ -290,7 +295,7 @@ class BaseQcService {
return system.getResultFail(-101, "订单号不能为空"); return system.getResultFail(-101, "订单号不能为空");
} }
var ns = await this.needsolutionDao.model.findOne({ var ns = await this.needsolutionDao.model.findOne({
where: { orderNo: ab.orderNo }, raw: true where: {orderNo: ab.orderNo}, raw: true
}); });
if (!ns || !ns.id) { if (!ns || !ns.id) {
return system.getResultFail(-301, "未知方案"); return system.getResultFail(-301, "未知方案");
...@@ -299,6 +304,7 @@ class BaseQcService { ...@@ -299,6 +304,7 @@ class BaseQcService {
pobj.actionBody = ab; pobj.actionBody = ab;
return this.submitIcpMaterial(pobj); return this.submitIcpMaterial(pobj);
} }
//提交icp材料信息 //提交icp材料信息
async submitIcpMaterial(pobj) { async submitIcpMaterial(pobj) {
var ab = pobj.actionBody; var ab = pobj.actionBody;
...@@ -317,7 +323,7 @@ class BaseQcService { ...@@ -317,7 +323,7 @@ class BaseQcService {
//获取方案信息 //获取方案信息
var needsolutioninfo = await this.needsolutionDao.model.findOne({ var needsolutioninfo = await this.needsolutionDao.model.findOne({
attributes: ["id", "needNo", "orderNo", "solutionContent"], attributes: ["id", "needNo", "orderNo", "solutionContent"],
where: { channelSolutionNo: ab.BizId, isInvalid: 0 }, raw: true where: {channelSolutionNo: ab.BizId, isInvalid: 0}, raw: true
}); });
console.log('needsolutioninfo+++', needsolutioninfo) console.log('needsolutioninfo+++', needsolutioninfo)
if (!needsolutioninfo || !needsolutioninfo.id) { if (!needsolutioninfo || !needsolutioninfo.id) {
...@@ -387,7 +393,9 @@ class BaseQcService { ...@@ -387,7 +393,9 @@ class BaseQcService {
solutionContent.material = ab.material; solutionContent.material = ab.material;
var solutionFlowList = solutionContent.solutionFlowList || []; var solutionFlowList = solutionContent.solutionFlowList || [];
solutionFlowList.push({ solutionFlowList.push({
status: "MATERIAL_UNCONFIRM", statusName: this.icpSolutionStatusReference.MATERIAL_UNCONFIRM, updated_at: new Date() status: "MATERIAL_UNCONFIRM",
statusName: this.icpSolutionStatusReference.MATERIAL_UNCONFIRM,
updated_at: new Date()
}); });
solutionContent.status = "MATERIAL_UNCONFIRM"; solutionContent.status = "MATERIAL_UNCONFIRM";
solutionContent.statusName = this.icpSolutionStatusReference.MATERIAL_UNCONFIRM; solutionContent.statusName = this.icpSolutionStatusReference.MATERIAL_UNCONFIRM;
...@@ -396,11 +404,11 @@ class BaseQcService { ...@@ -396,11 +404,11 @@ class BaseQcService {
return await this.needsolutionDao.db.transaction(async function (t) { return await this.needsolutionDao.db.transaction(async function (t) {
await self.needsolutionDao.update(needsolutioninfo, t); await self.needsolutionDao.update(needsolutioninfo, t);
var new_needsolutioninfo = await self.needsolutionDao.model.findOne({ var new_needsolutioninfo = await self.needsolutionDao.model.findOne({
where: { id: needsolutioninfo.id }, raw: true where: {id: needsolutioninfo.id}, raw: true
}); });
//2020-10-27 laolan start //2020-10-27 laolan start
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) {
var uappIds = orderInfo.uapp_id; var uappIds = orderInfo.uapp_id;
...@@ -414,9 +422,16 @@ class BaseQcService { ...@@ -414,9 +422,16 @@ class BaseQcService {
}) })
} }
//交付商通知状态变更 //交付商通知状态变更
async serviceProviderNotification(pobj) { async serviceProviderNotification(pobj) {
var ab = pobj.actionBody; let ab = pobj.actionBody;
if (!pobj.userInfo || !pobj.userInfo.id) {
return system.getResultFail(-100, "未知用户");
}
if (!ab.ApplicationStatus) {
return system.getResultFail(-102, "通知状态不能为空");
}
if (!ab.orderNo) { if (!ab.orderNo) {
return system.getResultFail(-101, "订单号不能为空"); return system.getResultFail(-101, "订单号不能为空");
} }
...@@ -438,49 +453,29 @@ class BaseQcService { ...@@ -438,49 +453,29 @@ class BaseQcService {
if (ab.certificateEndTime) { if (ab.certificateEndTime) {
ab["CertificateEndTime"] = ab.certificateEndTime; ab["CertificateEndTime"] = ab.certificateEndTime;
} }
var ns = await this.needsolutionDao.model.findOne({
where: { orderNo: ab.orderNo }, raw: true
});
if (!ns || !ns.id) {
return system.getResultFail(-301, "未知方案");
}
ab["BizId"] = ns.channelSolutionNo;
ab["solutionNo"] = ns.solutionNo;
pobj.actionBody = ab; pobj.actionBody = ab;
return this.acceptIcpPartnerNotification(pobj); return this.acceptIcpPartnerNotification(pobj);
} }
//服务商通知状态变更 //服务商通知状态变更
async acceptIcpPartnerNotification(pobj) { async acceptIcpPartnerNotification(pobj) {
console.log('服务商通知状态变更pobj++++', pobj) let self = this;
var ab = pobj.actionBody; let ab = pobj.actionBody;
var user = pobj.userInfo; let needSolutionWhere = {};
if (ab.solutionNo) {
if (!user || !user.id) { needSolutionWhere = {solutionNo: ab.solutionNo};
return system.getResultFail(-100, "未知用户"); } else if (ab.orderNo) {
} needSolutionWhere = {orderNo: ab.orderNo};
// ab["createUserId"] = user.id;
// if (!ab.BizId) {
// return system.getResultFail(-101, "渠道方案编号不能为空");
// }
if (!ab.solutionNo) {
return system.getResultFail(-101, "方案编号不能为空");
}
if (!ab.ApplicationStatus) {
return system.getResultFail(-102, "通知状态不能为空");
} }
//获取方案信息 //获取方案信息
var needsolutioninfo = await this.needsolutionDao.model.findOne({ let needsolutioninfo = await this.needsolutionDao.model.findOne({
attributes: ["id", "status", "solutionContent", "needNo","channelNeedNo"], attributes: ["id", "status", "solutionContent", "needNo", "channelNeedNo"],
where: { solutionNo: ab.solutionNo }, raw: true where: needSolutionWhere, raw: true
}); });
if (!needsolutioninfo || !needsolutioninfo.id) { if (!needsolutioninfo || !needsolutioninfo.id) {
return system.getResultFail(-400, "未知方案"); return system.getResultFail(-400, "未知方案");
} }
// if (!needsolutioninfo.needNo) { let solutionContent = needsolutioninfo.solutionContent;
// return system.getResultFail(-401, "方案需求信息有误");
// }
var solutionContent = needsolutioninfo.solutionContent;
if (!solutionContent) { if (!solutionContent) {
return system.getResultFail(-402, "方案交付信息有误"); return system.getResultFail(-402, "方案交付信息有误");
} }
...@@ -490,43 +485,19 @@ class BaseQcService { ...@@ -490,43 +485,19 @@ class BaseQcService {
if (solutionContent.ApplicationStatus && solutionContent.ApplicationStatus == ab.ApplicationStatus) { if (solutionContent.ApplicationStatus && solutionContent.ApplicationStatus == ab.ApplicationStatus) {
return system.getResultFail(-405, "操作失败,该流程状态已提交,不能重复提交"); return system.getResultFail(-405, "操作失败,该流程状态已提交,不能重复提交");
} }
//获取需求信息 let solutionFlowList = solutionContent.solutionFlowList || [];
// var needinfo = await this.needinfoDao.model.findOne({ let orderInfo = await this.orderinfoDao.model.findOne({
// where: { needNo: needsolutioninfo.needNo }, raw: true attributes: ["uapp_id", "channelOrderNo"],
// }); where: {orderNo: ab.orderNo}, 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 (!orderInfo || !orderInfo.channelOrderNo) {
if (orderuappId) { return system.getResultFail(-406, "未知订单");
var uappId = orderuappId.uapp_id;
}
if (uappId != '50') {
// if (!needsolutioninfo.channelNeedNo) {
// return system.getResultFail(-401, "方案需求信息有误");
// }
// //获取需求信息
// var needinfo = await this.needinfoDao.model.findOne({
// where: { channelNeedNo: needsolutioninfo.channelNeedNo }, raw: true
// });
// if (!needinfo || !needinfo.id) {
// return system.getResultFail(-201, "未知需求信息");
// }
// if (needinfo.status == "ygb") {
// return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作");
// }
} }
let uapp_id = orderInfo.uapp_id;
let channelOrderNo = orderInfo.channelOrderNo
if (ab.ApplicationStatus == 507) {//完成账户注册 if (ab.ApplicationStatus == 507) {//完成账户注册
if (uappId == '18') { if (uapp_id == '18') {
if (solutionContent.status != "USER_CONFIRMED") { if (solutionContent.status != "USER_CONFIRMED") {
return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作"); return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作");
} }
...@@ -534,7 +505,9 @@ class BaseQcService { ...@@ -534,7 +505,9 @@ class BaseQcService {
solutionContent.ApplicationStatus = 507; solutionContent.ApplicationStatus = 507;
solutionFlowList.push({ solutionFlowList.push({
file: ab.OfficialFileURL || "", file: ab.OfficialFileURL || "",
status: "ACCOUNT_REGISTERED", statusName: this.icpSolutionStatusReference.ACCOUNT_REGISTERED, updated_at: new Date() status: "ACCOUNT_REGISTERED",
statusName: this.icpSolutionStatusReference.ACCOUNT_REGISTERED,
updated_at: new Date()
}); });
solutionContent.status = "ACCOUNT_REGISTERED"; solutionContent.status = "ACCOUNT_REGISTERED";
solutionContent.statusName = this.icpSolutionStatusReference.ACCOUNT_REGISTERED; solutionContent.statusName = this.icpSolutionStatusReference.ACCOUNT_REGISTERED;
...@@ -545,7 +518,9 @@ class BaseQcService { ...@@ -545,7 +518,9 @@ class BaseQcService {
} }
solutionFlowList.push({ solutionFlowList.push({
file: ab.OfficialFileURL || "", file: ab.OfficialFileURL || "",
status: "MATERIAL_SUBMITTED", statusName: this.icpSolutionStatusReference.MATERIAL_SUBMITTED, updated_at: new Date() status: "MATERIAL_SUBMITTED",
statusName: this.icpSolutionStatusReference.MATERIAL_SUBMITTED,
updated_at: new Date()
}); });
solutionContent.status = "MATERIAL_SUBMITTED"; solutionContent.status = "MATERIAL_SUBMITTED";
solutionContent.statusName = this.icpSolutionStatusReference.MATERIAL_SUBMITTED; solutionContent.statusName = this.icpSolutionStatusReference.MATERIAL_SUBMITTED;
...@@ -577,18 +552,20 @@ class BaseQcService { ...@@ -577,18 +552,20 @@ class BaseQcService {
if (solutionContent.status != "GXB_ACCEPT") { if (solutionContent.status != "GXB_ACCEPT") {
return system.getResultFail(-511, "交付流程错误,⼯信部已受理后才能执行此操作"); return system.getResultFail(-511, "交付流程错误,⼯信部已受理后才能执行此操作");
} }
if(uappId == "18"){ if (uapp_id == "18") {
solutionFlowList.push({ solutionFlowList.push({
file: ab.OfficialFileURL || "", status: "GXB_SUCCESS", file: ab.OfficialFileURL || "", status: "GXB_SUCCESS",
statusName: this.icpSolutionStatusReference.GXB_SUCCESS, updated_at: new Date(), statusName: this.icpSolutionStatusReference.GXB_SUCCESS, updated_at: new Date(),
CertificateNumber:ab.CertificateNumber, CertificateNumber: ab.CertificateNumber,
CertificateStartTime:ab.CertificateStartTime, CertificateStartTime: ab.CertificateStartTime,
CertificateEndTime:ab.CertificateEndTime CertificateEndTime: ab.CertificateEndTime
}); });
}else{ } else {
solutionFlowList.push({ solutionFlowList.push({
file: ab.OfficialFileURL || "", file: ab.OfficialFileURL || "",
status: "GXB_SUCCESS", statusName: this.icpSolutionStatusReference.GXB_SUCCESS, updated_at: new Date() status: "GXB_SUCCESS",
statusName: this.icpSolutionStatusReference.GXB_SUCCESS,
updated_at: new Date()
}); });
} }
needsolutioninfo.status = "ywc"; needsolutioninfo.status = "ywc";
...@@ -607,21 +584,25 @@ class BaseQcService { ...@@ -607,21 +584,25 @@ class BaseQcService {
needsolutioninfo.status = "ywc"; needsolutioninfo.status = "ywc";
solutionContent.statusName = this.icpSolutionStatusReference.GXB_FAIL; solutionContent.statusName = this.icpSolutionStatusReference.GXB_FAIL;
} }
solutionContent.solutionFlowList = solutionFlowList; solutionContent.solutionFlowList = solutionFlowList;
var applicationStatusList = solutionContent.applicationStatusList || []; //返回状态
if(uappId == "18"){ let statusObj = {};
var statusObj = { let applicationStatusList = solutionContent.applicationStatusList || [];
if (uapp_id == "18") {
statusObj = {
"OfficialFileURL": ab.OfficialFileURL || "", "OfficialFileURL": ab.OfficialFileURL || "",
"ApplicationStatus": ab.ApplicationStatus, "ApplicationStatus": ab.ApplicationStatus,
"ApplicationStatusName": this.icpApplicationStatusReference[ab.ApplicationStatus], "ApplicationStatusName": this.icpApplicationStatusReference[ab.ApplicationStatus],
"created_at": new Date(), "created_at": new Date(),
//2021-3-18 addNew //2021-3-18 addNew
"CertificateNumber":ab.CertificateNumber || "",//证书编号 "CertificateNumber": ab.CertificateNumber || "",//证书编号
"CertificateStartTime":ab.CertificateStartTime || "",//证书有效期 开始时间 "CertificateStartTime": ab.CertificateStartTime || "",//证书有效期 开始时间
"CertificateEndTime":ab.CertificateEndTime || ""//证书有效期 结束时间 "CertificateEndTime": ab.CertificateEndTime || ""//证书有效期 结束时间
}; };
}else{ } else {
var statusObj = { statusObj = {
"OfficialFileURL": ab.OfficialFileURL || "", "OfficialFileURL": ab.OfficialFileURL || "",
"ApplicationStatus": ab.ApplicationStatus, "ApplicationStatus": ab.ApplicationStatus,
"ApplicationStatusName": this.icpApplicationStatusReference[ab.ApplicationStatus], "ApplicationStatusName": this.icpApplicationStatusReference[ab.ApplicationStatus],
...@@ -633,24 +614,13 @@ class BaseQcService { ...@@ -633,24 +614,13 @@ class BaseQcService {
solutionContent.applicationStatus = ab.ApplicationStatus; solutionContent.applicationStatus = ab.ApplicationStatus;
needsolutioninfo.solutionContent = JSON.stringify(solutionContent); needsolutioninfo.solutionContent = JSON.stringify(solutionContent);
console.log("ab.orderNo+++", ab.orderNo)
var self = this;
var orderInfo = await self.orderinfoDao.model.findOne({
attributes: ["channelOrderNo"],
where: { orderNo: ab.orderNo }, raw: true
})
console.log("orderInfo+++", orderInfo)
if (orderInfo) {
var channelOrderNo = orderInfo.channelOrderNo
}
return await this.needsolutionDao.db.transaction(async function (t) { return await this.needsolutionDao.db.transaction(async function (t) {
await self.needsolutionDao.update(needsolutioninfo, t); await self.needsolutionDao.update(needsolutioninfo, t);
statusObj["BizId"] = ab.BizId; statusObj["BizId"] = needsolutioninfo.channelSolutionNo;
//2020-10-27 laolan start statusObj["solutionNo"] = needsolutioninfo.solutionNo;
statusObj['uapp_id'] = uappId; statusObj["material"] = solutionContent;
statusObj["uapp_id"] = uapp_id;
statusObj['channelOrderNo'] = channelOrderNo; statusObj['channelOrderNo'] = channelOrderNo;
console.log('statusObj++', statusObj)
//2020-10-27 laolan start
return system.getResultSuccess(statusObj); return system.getResultSuccess(statusObj);
}) })
} }
...@@ -673,6 +643,7 @@ class BaseQcService { ...@@ -673,6 +643,7 @@ class BaseQcService {
var timStr = moment().format("YYYYMMDDHHmm"); var timStr = moment().format("YYYYMMDDHHmm");
return prefix + timStr + uidStr; return prefix + timStr + uidStr;
} }
/* /*
len:返回长度 len:返回长度
radix:参与计算的长度,最大为62 radix:参与计算的长度,最大为62
...@@ -699,4 +670,5 @@ class BaseQcService { ...@@ -699,4 +670,5 @@ class BaseQcService {
} }
module.exports = BaseQcService; module.exports = BaseQcService;
\ No newline at end of file
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