明树Git Lab

Commit 8264d2c3 authored by zfp1's avatar zfp1

update

parent 37d30c98
Pipeline #111312 passed with stage
in 3 seconds
......@@ -336,7 +336,7 @@ async function startLixiang(req, res, next) {
projectCode: req.body.projectCode,
});
return res.sendData(ret);
} else if(req.body.projectLxzsUser) {
} else if (req.body.projectLxzsUser) {
// 如果没有走初审、核准但是又有终审用户,则是终审退回
req.body.daibanUsers = [req.body.projectLxzsUser];
......@@ -370,7 +370,7 @@ async function startLixiang(req, res, next) {
//更新信息和状态
req.body.daibanUsers = approvers.map(o => o.id);
let ret;
if(rett.type == 1) {
if (rett.type == 1) {
//投管
ret = await xiangmulixianggengxin(req.body, "4"); //状态 2 -- 立项核准中
} else {
......@@ -687,7 +687,7 @@ async function xiangmujuecegengxin(body, projectLzType) {
await Promise.all(pns8.map(item => { DB.ProjectZqrz.update(item, { where: { id: item.id } }) }));
// 处理决策审批意见 ProjectSpyjjc
let projectSpyjjcs = body.projectSpyjjcs || [];
let pnids12 = [],pns12 =[], newprojectSpyjjcs = [];
let pnids12 = [], pns12 = [], newprojectSpyjjcs = [];
projectSpyjjcs.map(o => { if (!o.id) { if (!_.isEmpty(o)) { o.projectId = projectInfo.id; newprojectSpyjjcs.push(o); } } else { pnids12.push(o.id); pns12.push(o); } return o });
await DB.ProjectSpyjjc.destroy({ where: { projectId: projectInfo.id, id: { [Op.notIn]: pnids12 } } });
await DB.ProjectSpyjjc.bulkCreate(newprojectSpyjjcs);
......@@ -1221,7 +1221,7 @@ async function listProject(req, res, next) {
projectLzTypes = ["1"];
break;
case "xmlx":
projectLzTypes = ["2","3", "4", "5"];
projectLzTypes = ["2", "3", "4", "5"];
break;
case "xmjc":
projectLzTypes = ["8", "9", "13"];
......@@ -1422,7 +1422,16 @@ async function getProFlowRecord(req, res, next) {
{
model: DB.User,
as: 'creator',
attributes: ["id", "name"]
attributes: ["id", "name"],
include: [
{
model: DB.Depart,
as: 'departs',
// where: { del: 0 }, 当刚注册的用户 没有分配角色、部门时加上条件会查不到
attributes: ["id", "name", "parentIds", "parentId"],
through: { attributes: [] },
}
]
}
]
});
......
......@@ -51,7 +51,7 @@ async function login(req, res, next) {
model: DB.Depart,
as: 'departs',
// where: { del: 0 }, 当刚注册的用户 没有分配角色、部门时加上条件会查不到
attributes: ["id", "name"],
attributes: ["id", "name", "parentIds", "parentId"],
through: { attributes: [] },
}
]
......
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