Commit b0d4e29f by 兰国旗

laolan

parent 03695764
...@@ -128,6 +128,7 @@ class RegCenterOrderService{ ...@@ -128,6 +128,7 @@ class RegCenterOrderService{
var needinfo = await this.needinfoDao.model.findOne({ var needinfo = await this.needinfoDao.model.findOne({
where: { channelNeedNo: ab.intentionBizId }, raw: true where: { channelNeedNo: ab.intentionBizId }, raw: true
}); });
console.log('needinfo-----reg---',needinfo)
if (!needinfo) { if (!needinfo) {
return system.getResultFail(-104, "未知方案需求"); return system.getResultFail(-104, "未知方案需求");
} }
...@@ -145,15 +146,17 @@ class RegCenterOrderService{ ...@@ -145,15 +146,17 @@ class RegCenterOrderService{
var i; var i;
var nsLength var nsLength
var needData = {id: needinfo.id}; var needData = {id: needinfo.id};
if (!ns) {
//如果没有方案直接关闭需求,更新需求状态
if(ab.intentionStatus){ if(ab.intentionStatus){
if(ab.intentionStatus == 5){ if(ab.intentionStatus == 5){
needData['status'] = 'ygb' needData['status'] = 'ygb'
needData['statusName'] = '已关闭'
} }
if(ab.intentionStatus == 1){ if(ab.intentionStatus == 1){
needData["status"] = "ygb"; needData["status"] = "ygb";
needData['statusName'] = '已关闭'
} }
if (ns.length < 1) {
//如果没有方案直接关闭需求,更新需求状态
await this.needinfoDao.update(needData);//更新状态修改 await this.needinfoDao.update(needData);//更新状态修改
} }
}else{ }else{
...@@ -165,11 +168,9 @@ class RegCenterOrderService{ ...@@ -165,11 +168,9 @@ class RegCenterOrderService{
solutionContent = ns[i].solutionContent; solutionContent = ns[i].solutionContent;
solutionContent.customerRemark = ab.description; solutionContent.customerRemark = ab.description;
solutionContent.needStatus = ab.intentionStatus; solutionContent.needStatus = ab.intentionStatus;
if (ab.intentionStatus == 1) { if (ab.intentionStatus == 1) {
updateObj["status"] = "ybh"; updateObj["status"] = "ybh";
updateObj["isInvalid"] = 1; updateObj["isInvalid"] = 1;
} else if (ab.intentionStatus == 2) { } else if (ab.intentionStatus == 2) {
updateObj["status"] = "dqr"; updateObj["status"] = "dqr";
} else if (ab.intentionStatus == 3) { } else if (ab.intentionStatus == 3) {
...@@ -186,6 +187,7 @@ class RegCenterOrderService{ ...@@ -186,6 +187,7 @@ class RegCenterOrderService{
solutionContent = JSON.stringify(solutionContent); solutionContent = JSON.stringify(solutionContent);
updateObj["solutionContent"] = solutionContent; updateObj["solutionContent"] = solutionContent;
await this.needsolutionDao.update(updateObj);//方案状态修改 await this.needsolutionDao.update(updateObj);//方案状态修改
await this.needinfoDao.update(needData);//更新状态修改
} }
} }
return system.getResultSuccess(); return system.getResultSuccess();
......
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