Commit 5eb45076 by 宋毅

Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order

parents 50b57699 a7de9b61
......@@ -96,6 +96,9 @@ class AliyunQcService {
where: { needNo: needinfo.needNo, isInvalid: 0 }, raw: true
});
if (ns && ns.id) {
if (ns.orderNo) {
return system.getResultFail(-102, "该需求已生成订单,不能关闭!");
}
if (ns.status == "ywc") {
return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案-3");
}
......
......@@ -84,13 +84,16 @@ class BaseQcService {
});
if (ns && ns.id) {
if (ns.orderNo) {
return system.getResultFail(-102, "该需求已生成订单,不能关闭!");
}
if (ns.status == "ywc") {
return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案-2");
}
var flowStatus = ns.solutionContent && ns.solutionContent.status ? ns.solutionContent.status : "";
if (flowStatus && [
"SOLUTION_SUBMIT", "PAID", "USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "GXB_REFUSE", "CLOSE"
].indexOf(flowStatus) >= 0) {
var flowStatus = ns.solutionContent && ns.solutionContent.status ? ns.solutionContent.status : "";
if (flowStatus && [
"SOLUTION_SUBMIT", "PAID", "USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "GXB_REFUSE", "CLOSE"
].indexOf(flowStatus) >= 0) {
var self = this;
return await this.needsolutionDao.db.transaction(async function (t) {
var needObj = {
......
......@@ -575,6 +575,9 @@ class NcService {
});
// var newFlowStatus = [];
if (ns && ns.id) {
if (ns.orderNo) {
return system.getResultFail(-102, "该需求已生成订单,不能关闭!");
}
if (ns.status == "ywc") {
return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案-4");
}
......
......@@ -963,6 +963,9 @@ class RegCenterOrderService{
var nsLength = ns.rows.length
if (nsLength > 0) {
for (i = 0; i < nsLength; i++) {
if (ns.rows[i].orderNo) {
return system.getResultFail(-102, "该需求已生成订单,不能关闭!");
}
if (ns.rows[i].id) {
ns.rows[i]['uapp_id'] = uappId;
if (ns.rows[i].status == "ywc") {
......@@ -983,7 +986,6 @@ class RegCenterOrderService{
status: "ygb", notes: ab.note
};
await self.needinfoDao.updateByWhere(needObj, { where :{id: needinfo.id }, t });//关闭需求
// await self.needsolutionDao.update({ status: "yzf", isInvalid: 1 }, { where: { id: ns.rows[i].id }, transaction: t });//方案废弃
var a= await self.needsolutionDao.updateByWhere(updateSolution, { where: { id: ns.rows[i].id }, t });//方案废弃
console.log("aaaa---",a)
})
......
......@@ -574,6 +574,9 @@ class RtService {
where: { needNo: needinfo.needNo, isInvalid: 0 }, raw: true
});
if (ns && ns.id) {
if (ns.orderNo) {
return system.getResultFail(-102, "该需求已生成订单,不能关闭!");
}
if (ns.status == "ywc") {
return system.getResultFail(-103, "方案状态错误,不能废弃已完成方案");
}
......
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