Commit 90c0e541 by 庄冰

solution

parent 59b1c382
......@@ -89,6 +89,7 @@ class NeedsolutionService extends ServiceBase {
ab.solutionContent = JSON.stringify(ab.solutionContent);
var self = this;
return await this.db.transaction(async function (t) {
ab["needNo"] = needinfo.needNo;
var od = await self.dao.create(ab,t);
if(od && od.id){
var pushflag = 0;//推送标志 值为1推送小记
......@@ -164,14 +165,14 @@ class NeedsolutionService extends ServiceBase {
// }
//获取需求信息
var needinfo = await this.needinfoDao.model.findOne({
where:{channelNeedNo:ab.needNo},raw:true
where:{needNo:ab.needNo},raw:true
});
if(!needinfo || !needinfo.id){
return system.getResultFail(-102,"未知需求信息");
}
var ns = await this.dao.model.findAll({
where:{needNo:needinfo.needNo,createUserId:user.id},raw:true,
attributes:["needNo","solutionNo","orderNo","solutionContent","status","statusName"]
attributes:["needNo","solutionNo","channelSolutionNo","orderNo","solutionContent","status","statusName"]
});
return system.getResultSuccess(ns);
}
......@@ -329,7 +330,11 @@ class NeedsolutionService extends ServiceBase {
return system.getResultFail(-103,"方案状态错误,只能废弃待确认方案");
}
await this.dao.update({id:ns.id,status:"yzf"});//方案废弃
return system.getResultSuccess();
//获取方案信息
ns = await this.dao.model.findOne({
where:{solutionNo:ab.solutionNo,createUserId:user.id},raw:true
});
return system.getResultSuccess(ns);
}
//根据需求关闭方案(关闭需求后调用)
async abolishProgrammeByNeed(pobj){
......
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