Commit 9ddf34bc by 兰国旗

laolan

parent 20a8e468
...@@ -73,7 +73,7 @@ class BaseQcService { ...@@ -73,7 +73,7 @@ class BaseQcService {
//根据需求关闭ICP方案(关闭需求后调用) //根据需求关闭ICP方案(关闭需求后调用)
async abolishIcpProgrammeByNeed(pobj) { async abolishIcpProgrammeByNeed(pobj) {
console.log("abolishIcpProgrammeByNeed+++",pobj) console.log("abolishIcpProgrammeByNeed+++", pobj)
var ab = pobj.actionBody; var ab = pobj.actionBody;
var app = pobj.appInfo; var app = pobj.appInfo;
if (!app || !app.uapp_id) { if (!app || !app.uapp_id) {
...@@ -90,7 +90,7 @@ class BaseQcService { ...@@ -90,7 +90,7 @@ class BaseQcService {
var uappId = {}; var uappId = {};
if (!needinfo || !needinfo.id) { if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息"); return system.getResultFail(-201, "未知需求信息");
}else{ } else {
//2020-12-11 laolan xiugai //2020-12-11 laolan xiugai
uappId['uapp_id'] = needinfo.uapp_id; uappId['uapp_id'] = needinfo.uapp_id;
} }
...@@ -107,11 +107,8 @@ class BaseQcService { ...@@ -107,11 +107,8 @@ class BaseQcService {
return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案"); return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案");
} }
var flowStatus = ns.solutionContent && ns.solutionContent.status ? ns.solutionContent.status : ""; var flowStatus = ns.solutionContent && ns.solutionContent.status ? ns.solutionContent.status : "";
if (flowStatus && ["GXB_REFUSE", "CLOSE"].indexOf(flowStatus) < 0) { if (flowStatus && ["SOLUTION_SUBMIT", "USER_CONFIRM_PRODUCE"].indexOf(flowStatus) >= 0) {
return system.getResultFail(-104, "⽅案状态为关闭或不予受理才可关闭需求");
}
var self = this; var self = this;
return await this.needsolutionDao.db.transaction(async function (t) { return await this.needsolutionDao.db.transaction(async function (t) {
var needObj = { var needObj = {
id: needinfo.id, status: "ygb", notes: ab.note id: needinfo.id, status: "ygb", notes: ab.note
...@@ -121,12 +118,17 @@ class BaseQcService { ...@@ -121,12 +118,17 @@ class BaseQcService {
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)
console.log('guanbi ns +++',ns) console.log('guanbi ns +++', ns)
return system.getResultSuccess(ns); return system.getResultSuccess(ns);
} }
}) })
}else{ } else {
if (flowStatus && ["GXB_REFUSE", "CLOSE"].indexOf(flowStatus) < 0) {
return system.getResultFail(-104, "⽅案状态为关闭或不予受理才可关闭需求");
}
}
} else {
return system.getResultSuccess(uappId); return system.getResultSuccess(uappId);
} }
} }
...@@ -194,7 +196,7 @@ class BaseQcService { ...@@ -194,7 +196,7 @@ class BaseQcService {
//提交方案 //提交方案
async submitIcpProgramme(pobj) { async submitIcpProgramme(pobj) {
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 (!user || !user.id) { if (!user || !user.id) {
...@@ -404,7 +406,7 @@ class BaseQcService { ...@@ -404,7 +406,7 @@ class BaseQcService {
//交付商提交材料信息 //交付商提交材料信息
async serviceProviderSubmitMaterial(pobj) { async serviceProviderSubmitMaterial(pobj) {
var ab = pobj.actionBody; var ab = pobj.actionBody;
console.log('ab++',ab) console.log('ab++', ab)
if (!ab.orderNo) { if (!ab.orderNo) {
return system.getResultFail(-101, "订单号不能为空"); return system.getResultFail(-101, "订单号不能为空");
} }
...@@ -421,7 +423,7 @@ class BaseQcService { ...@@ -421,7 +423,7 @@ class BaseQcService {
//提交icp材料信息 //提交icp材料信息
async submitIcpMaterial(pobj) { async submitIcpMaterial(pobj) {
var ab = pobj.actionBody; var ab = pobj.actionBody;
console.log('ababab++',ab) console.log('ababab++', ab)
var user = pobj.userInfo; var user = pobj.userInfo;
if (!user || !user.id) { if (!user || !user.id) {
return system.getResultFail(-100, "未知用户"); return system.getResultFail(-100, "未知用户");
...@@ -438,7 +440,7 @@ class BaseQcService { ...@@ -438,7 +440,7 @@ class BaseQcService {
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) {
return system.getResultFail(-400, "未知方案"); return system.getResultFail(-400, "未知方案");
} }
...@@ -451,7 +453,7 @@ class BaseQcService { ...@@ -451,7 +453,7 @@ class BaseQcService {
} }
//---- //----
var productType = solutionContent.solution; var productType = solutionContent.solution;
if(productType && productType.IcpType){ if (productType && productType.IcpType) {
productType = productType.IcpType productType = productType.IcpType
switch (productType) { switch (productType) {
case "5": case "5":
...@@ -519,15 +521,15 @@ class BaseQcService { ...@@ -519,15 +521,15 @@ class BaseQcService {
}); });
//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;
new_needsolutioninfo['orderChannelNo'] = orderInfo.channelOrderNo; new_needsolutioninfo['orderChannelNo'] = orderInfo.channelOrderNo;
new_needsolutioninfo['uapp_id'] = uappIds; new_needsolutioninfo['uapp_id'] = uappIds;
new_needsolutioninfo['productType'] = productType; new_needsolutioninfo['productType'] = productType;
} }
console.log('new_needsolutioninfo+++',new_needsolutioninfo) 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);
...@@ -561,7 +563,7 @@ class BaseQcService { ...@@ -561,7 +563,7 @@ class BaseQcService {
} }
//服务商通知状态变更 //服务商通知状态变更
async acceptIcpPartnerNotification(pobj) { async acceptIcpPartnerNotification(pobj) {
console.log('服务商通知状态变更pobj++++',pobj) console.log('服务商通知状态变更pobj++++', pobj)
var ab = pobj.actionBody; var ab = pobj.actionBody;
var user = pobj.userInfo; var user = pobj.userInfo;
...@@ -612,14 +614,14 @@ class BaseQcService { ...@@ -612,14 +614,14 @@ class BaseQcService {
// } // }
var solutionFlowList = solutionContent.solutionFlowList || []; var solutionFlowList = solutionContent.solutionFlowList || [];
var orderuappId = await this.orderinfoDao.model.findOne({ var orderuappId = await this.orderinfoDao.model.findOne({
attributes:["uapp_id"], attributes: ["uapp_id"],
where: {orderNo: ab.orderNo}, raw: true where: { orderNo: ab.orderNo }, raw: true
}) })
console.log("orderuappId+++",orderuappId) console.log("orderuappId+++", orderuappId)
if(orderuappId){ if (orderuappId) {
var uappId = orderuappId.uapp_id; var uappId = orderuappId.uapp_id;
} }
if(uappId != '50'){ if (uappId != '50') {
if (!needsolutioninfo.needNo) { if (!needsolutioninfo.needNo) {
return system.getResultFail(-401, "方案需求信息有误"); return system.getResultFail(-401, "方案需求信息有误");
} }
...@@ -635,7 +637,7 @@ class BaseQcService { ...@@ -635,7 +637,7 @@ class BaseQcService {
} }
} }
if (ab.ApplicationStatus == 507) {//完成账户注册 if (ab.ApplicationStatus == 507) {//完成账户注册
if(uappId != '50'){ if (uappId != '50') {
if (solutionContent.status != "USER_CONFIRMED") { if (solutionContent.status != "USER_CONFIRMED") {
return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作"); return system.getResultFail(-508, "交付流程错误,用户确认递交⽂件后才能执行此操作");
} }
...@@ -719,14 +721,14 @@ class BaseQcService { ...@@ -719,14 +721,14 @@ 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) console.log("ab.orderNo+++", ab.orderNo)
var self = this; var self = this;
var orderInfo = await self.orderinfoDao.model.findOne({ var orderInfo = await self.orderinfoDao.model.findOne({
attributes:["channelOrderNo"], attributes: ["channelOrderNo"],
where: {orderNo: ab.orderNo}, raw: true where: { orderNo: ab.orderNo }, raw: true
}) })
console.log("orderInfo+++",orderInfo) console.log("orderInfo+++", orderInfo)
if(orderInfo){ if (orderInfo) {
var channelOrderNo = orderInfo.channelOrderNo var channelOrderNo = orderInfo.channelOrderNo
} }
return await this.needsolutionDao.db.transaction(async function (t) { return await this.needsolutionDao.db.transaction(async function (t) {
...@@ -735,7 +737,7 @@ class BaseQcService { ...@@ -735,7 +737,7 @@ class BaseQcService {
//2020-10-27 laolan start //2020-10-27 laolan start
statusObj['uapp_id'] = uappId; statusObj['uapp_id'] = uappId;
statusObj['channelOrderNo'] = channelOrderNo; statusObj['channelOrderNo'] = channelOrderNo;
console.log('statusObj++',statusObj) console.log('statusObj++', statusObj)
//2020-10-27 laolan start //2020-10-27 laolan start
return system.getResultSuccess(statusObj); return system.getResultSuccess(statusObj);
}) })
...@@ -781,11 +783,11 @@ class BaseQcService { ...@@ -781,11 +783,11 @@ class BaseQcService {
//方案流程列表 //方案流程列表
var solutionFlowList = solutionContent.solutionFlowList || []; var solutionFlowList = solutionContent.solutionFlowList || [];
if (ab.status == "1") {//⽤户已支付 if (ab.status == "1") {//⽤户已支付
var afterStatusList=[//用户支付后的流程状态 var afterStatusList = [//用户支付后的流程状态
"USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "ACCOUNT_REGISTERED", "USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "ACCOUNT_REGISTERED",
"MATERIAL_SUBMITTED","GXB_ACCEPT","GXB_REFUSE","GXB_FAIL","GXB_SUCCESS","CLOSE" "MATERIAL_SUBMITTED", "GXB_ACCEPT", "GXB_REFUSE", "GXB_FAIL", "GXB_SUCCESS", "CLOSE"
]; ];
if(!solutionContent.status || afterStatusList.indexOf(solutionContent.status)<0){ if (!solutionContent.status || afterStatusList.indexOf(solutionContent.status) < 0) {
solutionFlowList.push({ solutionFlowList.push({
status: "PAID", statusName: this.icpSolutionStatusReference.PAID, updated_at: new Date() status: "PAID", statusName: this.icpSolutionStatusReference.PAID, updated_at: new Date()
}); });
...@@ -1105,7 +1107,7 @@ class BaseQcService { ...@@ -1105,7 +1107,7 @@ class BaseQcService {
// 退回修改理由 // 退回修改理由
var extInfoJson = JSON.parse(ab.extInfo); var extInfoJson = JSON.parse(ab.extInfo);
// var extInfoJson = ab.extInfo // var extInfoJson = ab.extInfo
if(extInfoJson.rejectReason) { if (extInfoJson.rejectReason) {
ab.rejectReason = extInfoJson.rejectReason, ab.rejectReason = extInfoJson.rejectReason,
solutionContent.rejectReason = extInfoJson.rejectReason solutionContent.rejectReason = extInfoJson.rejectReason
} }
...@@ -1120,7 +1122,7 @@ class BaseQcService { ...@@ -1120,7 +1122,7 @@ class BaseQcService {
solutionContent: solutionContent, solutionContent: solutionContent,
}; };
// 这里修改进去了 // 这里修改进去了
if(ab.bizId != ns.channelDeliverId) { if (ab.bizId != ns.channelDeliverId) {
updateObj.channelDeliverId = ab.bizId updateObj.channelDeliverId = ab.bizId
} }
if (ab.operationType == "ABC_CLOSE_PRODUCE") {//⽅案已关闭 if (ab.operationType == "ABC_CLOSE_PRODUCE") {//⽅案已关闭
...@@ -1132,9 +1134,9 @@ class BaseQcService { ...@@ -1132,9 +1134,9 @@ class BaseQcService {
where: { id: ns.id }, raw: true where: { id: ns.id }, raw: true
}); });
var orderInfo = await this.orderinfoDao.model.findOne({ var orderInfo = await this.orderinfoDao.model.findOne({
where: {orderNo: new_ns.orderNo}, raw: true where: { orderNo: new_ns.orderNo }, raw: true
}) })
if(orderInfo) { if (orderInfo) {
new_ns.channelOrderNo = orderInfo.channelOrderNo new_ns.channelOrderNo = orderInfo.channelOrderNo
} }
return system.getResultSuccess(new_ns); return system.getResultSuccess(new_ns);
......
...@@ -21,7 +21,6 @@ class RegCenterOrderService{ ...@@ -21,7 +21,6 @@ class RegCenterOrderService{
}; };
//工商注册状态 //工商注册状态
this.regStatus = { this.regStatus = {
'RECEIVED': 701, //已接单 'RECEIVED': 701, //已接单
'COLLECTING': 702, //材料收集环节 'COLLECTING': 702, //材料收集环节
...@@ -657,7 +656,7 @@ class RegCenterOrderService{ ...@@ -657,7 +656,7 @@ class RegCenterOrderService{
if (needinfo.status == "ycd" || needinfo.status == "ygb") { if (needinfo.status == "ycd" || needinfo.status == "ygb") {
return system.getResultFail(-202, "该方案需求状态为" + needinfo.statusName + ",不能创建方案"); return system.getResultFail(-202, "该方案需求状态为" + needinfo.statusName + ",不能创建方案");
} }
var bizType = needinfo.typeCode;//ab.solutionContent.bizType;//业务类型 var bizType = needinfo.typeCode;//业务类型
if (!bizType) { if (!bizType) {
return system.getResultFail(-205, "方案类型错误"); return system.getResultFail(-205, "方案类型错误");
} }
...@@ -701,7 +700,6 @@ class RegCenterOrderService{ ...@@ -701,7 +700,6 @@ class RegCenterOrderService{
ab.solutionList[j].channelSolutionNo = ""; ab.solutionList[j].channelSolutionNo = "";
} }
} }
// var solution = ab.solutionList[j].solutionContent.solution;
var solutionFlowList = ab.solutionList[j].solutionContent.solutionFlowList || []; var solutionFlowList = ab.solutionList[j].solutionContent.solutionFlowList || [];
solutionFlowList.push({ solutionFlowList.push({
...@@ -711,7 +709,6 @@ class RegCenterOrderService{ ...@@ -711,7 +709,6 @@ class RegCenterOrderService{
ab.solutionList[j].solutionContent.statusName = this.regSolutionStatus.RECEIVED; ab.solutionList[j].solutionContent.statusName = this.regSolutionStatus.RECEIVED;
ab.solutionList[j].solutionContent.solutionFlowList = solutionFlowList; ab.solutionList[j].solutionContent.solutionFlowList = solutionFlowList;
ab.solutionList[j]["channelNeedNo"] = needinfo.channelNeedNo; ab.solutionList[j]["channelNeedNo"] = needinfo.channelNeedNo;
// var solutionNo = await this.getBusUid("ns");//chuangjian
var solutionNo = [];//chuangjian var solutionNo = [];//chuangjian
solutionNo[j] = await this.getBusUid("ns") solutionNo[j] = await this.getBusUid("ns")
console.log('solutionNo[j]----', solutionNo[j]) console.log('solutionNo[j]----', solutionNo[j])
...@@ -761,13 +758,9 @@ class RegCenterOrderService{ ...@@ -761,13 +758,9 @@ class RegCenterOrderService{
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 });
needsolutions.push(od.dataValues) needsolutions.push(od.dataValues)
console.log('needsolutions-------', needsolutions) console.log('needsolutions-------', needsolutions)
} }
// else {
// return system.getResultFail(-302, "提交方案失败");
// }
}) })
} }
} }
......
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