Commit 62fa7389 by 庄冰

needinfo

parent 3e27921a
......@@ -81,6 +81,9 @@ class NeedsolutionService extends ServiceBase {
if(!needinfo || !needinfo.id){
return system.getResultFail(-201,"未知需求信息");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-202,"该方案需求状态为"+needinfo.statusName+",不能创建方案");
}
ab["channelNeedNo"] = needinfo.channelNeedNo;
var solutionNo = await this.getBusUid("ns");
ab["solutionNo"] = solutionNo;
......@@ -142,6 +145,15 @@ class NeedsolutionService extends ServiceBase {
if(!ns || !ns.id){
return system.getResultFail(-103,"未知方案");
}
var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ns.needNo},raw:true
});
if(!needinfo){
return system.getResultFail(-104,"未知方案需求");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-105,"该方案需求状态为"+needinfo.statusName+",不能执行此操作");
}
await this.dao.model.update({channelSolutionNo:ab.solutionBizId}, { where: { id: ns.id }});//修改方案信息
return system.getResultSuccess();
}
......@@ -285,6 +297,15 @@ class NeedsolutionService extends ServiceBase {
if(!ns || !ns.id){
return system.getResultFail(-103,"未知方案");
}
var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ns.needNo},raw:true
});
if(!needinfo){
return system.getResultFail(-104,"未知方案需求");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-105,"该方案需求状态为"+needinfo.statusName+",不能执行此操作");
}
var solutionContent = ns.solutionContent;
var status = "";
if(ab.operateType=="INVALID"){// INVALID:作废
......@@ -327,6 +348,15 @@ class NeedsolutionService extends ServiceBase {
if(!ns || !ns.id){
return system.getResultFail(-102,"未知方案");
}
var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ns.needNo},raw:true
});
if(!needinfo){
return system.getResultFail(-104,"未知方案需求");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-105,"该方案需求状态为"+needinfo.statusName+",不能执行此操作");
}
if(ns.status!="dqr"){
return system.getResultFail(-103,"方案状态错误,只能废弃待确认方案");
}
......@@ -354,6 +384,9 @@ class NeedsolutionService extends ServiceBase {
if(!needinfo || !needinfo.id){
return system.getResultFail(-201,"未知需求信息");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-202,"该方案需求状态为"+needinfo.statusName+",不能执行此操作");
}
//获取方案信息
var ns = await this.dao.model.findAll({
where:{needNo:needinfo.needNo},raw:true
......@@ -465,6 +498,15 @@ class NeedsolutionService extends ServiceBase {
if(!ns || !ns.id){
return system.getResultFail(-103,"未知方案");
}
var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ns.needNo},raw:true
});
if(!needinfo){
return system.getResultFail(-104,"未知方案需求");
}
if(needinfo.status=="ycd" || needinfo.status=="ygb"){
return system.getResultFail(-105,"该方案需求状态为"+needinfo.statusName+",不能执行此操作");
}
var status = "yzf";
var reqObj={
status:status,id:ns.id
......
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