明树Git Lab

Commit 59d095e7 authored by zfp1's avatar zfp1

update

parent e74086fa
Pipeline #104141 passed with stage
in 3 seconds
...@@ -170,7 +170,6 @@ async function createProject(req, res, next) { ...@@ -170,7 +170,6 @@ async function createProject(req, res, next) {
async function xiangmulixianggengxin(body, projectLzType) { async function xiangmulixianggengxin(body, projectLzType) {
try { try {
// 1. 处理项目 // 1. 处理项目
// let project = body;
let projectInfo = _.omit(body, ['projectJsgms', 'projectGdxxs', 'projectXmtzzes', 'projectBjtjs', let projectInfo = _.omit(body, ['projectJsgms', 'projectGdxxs', 'projectXmtzzes', 'projectBjtjs',
'projectSpyjs', 'projectFxgls', 'projectTzzts', 'projectJczts', 'projectZqrzs', 'projectCwpjzbs', 'projectLcbjds', 'projectSpyjs', 'projectFxgls', 'projectTzzts', 'projectJczts', 'projectZqrzs', 'projectCwpjzbs', 'projectLcbjds',
'lxzl', 'lxpfwj', 'xgshcl']); 'lxzl', 'lxpfwj', 'xgshcl']);
...@@ -281,8 +280,7 @@ async function saveProjectPreLixiang(req, res, next) { ...@@ -281,8 +280,7 @@ async function saveProjectPreLixiang(req, res, next) {
*/ */
async function startLixiang(req, res, next) { async function startLixiang(req, res, next) {
try { try {
let body = req.body; if (!req.body.id) {
if (!body.id) {
return res.sendError(errorMessage.resourceNotFound) return res.sendError(errorMessage.resourceNotFound)
} }
...@@ -290,11 +288,11 @@ async function startLixiang(req, res, next) { ...@@ -290,11 +288,11 @@ async function startLixiang(req, res, next) {
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
actionName: '发起项目立项审批', actionName: '发起项目立项审批',
projectId: project.id, projectId: req.body.id,
}); });
//更新信息和状态 //更新信息和状态
let ret = await xiangmulixianggengxin(body, 3); //状态 3 -- 显示立项审批中 let ret = await xiangmulixianggengxin(req.body, 3); //状态 3 -- 显示立项审批中
return res.sendData(ret); return res.sendData(ret);
} catch (error) { } catch (error) {
...@@ -450,16 +448,15 @@ async function saveJuece(req, res, next) { ...@@ -450,16 +448,15 @@ async function saveJuece(req, res, next) {
async function startJuece(req, res, next) { async function startJuece(req, res, next) {
try { try {
let body = req.body; if (!req.body.id) {
if (!body.id) {
return res.sendError(errorMessage.resourceNotFound) return res.sendError(errorMessage.resourceNotFound)
} }
await DB.FlowRecord.create({ await DB.FlowRecord.create({
userId: req.user.id, userId: req.user.id,
actionName: '发起项目决策审批', actionName: '发起项目决策审批',
projectId: project.id, projectId: req.body.id,
}); });
let ret = await xiangmujuecegengxin(body, 7); let ret = await xiangmujuecegengxin(req.body, 7);
return ret; return ret;
} catch (error) { } catch (error) {
next(error); next(error);
......
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