Commit 9ddf34bc by 兰国旗

laolan

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