明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
jt_backend
Commits
348901f2
Commit
348901f2
authored
Mar 09, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ac597227
Pipeline
#108127
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
projectController.js
controller/projectController.js
+13
-13
No files found.
controller/projectController.js
View file @
348901f2
...
...
@@ -68,7 +68,7 @@ async function createProject(req, res, next) {
'lxzl'
,
'lxpfwj'
,
'xgshcl'
]);
projectInfo
.
projectCreator
=
req
.
user
.
id
;
projectInfo
.
projectLzType
=
1
;
// 草稿状态
projectInfo
.
projectLzType
=
"1"
;
// 草稿状态
let
project
=
await
DB
.
Project
.
create
(
projectInfo
);
project
=
project
.
toJSON
();
...
...
@@ -156,7 +156,7 @@ async function createProject(req, res, next) {
// // title: `项目【${project.name}】已发起,请尽快处理!`,
// // content: `项目【${project.name}】已发起,请尽快处理!`
// // });
// await DB.Project.update({ projectLzType:
3
}, { where: { id: project.id } });
// await DB.Project.update({ projectLzType:
"3"
}, { where: { id: project.id } });
// }
return
res
.
sendData
(
project
);
}
catch
(
error
)
{
...
...
@@ -330,9 +330,9 @@ async function queryLixiangResult(req, res, next) {
if
(
result
.
success
)
{
let
proInfo
=
await
projectModule
.
getProjectInfoByLixiang
(
req
.
body
);
//1. 更新项目状态
await
DB
.
Project
.
update
({
projectLzType
:
5
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"5"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo
.
projectLzType
=
5
;
proInfo
.
projectLzType
=
"5"
;
// await DB.ProjectLixiang.create({ lixiang: proInfo, type: 1, projectId: proInfo.id });
return
res
.
sendData
(
proInfo
);
}
else
{
...
...
@@ -354,9 +354,9 @@ async function approvalLixiang(req, res, next) {
let
proInfo
=
await
projectModule
.
getProjectInfoByLixiang
(
req
.
body
);
if
(
req
.
body
.
approvalResult
)
{
//1. 更新项目状态--已立项
await
DB
.
Project
.
update
({
projectLzType
:
5
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"5"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo
.
projectLzType
=
5
;
proInfo
.
projectLzType
=
"5"
;
await
DB
.
ProjectLixiang
.
create
({
lixiang
:
proInfo
,
type
:
1
,
projectId
:
proInfo
.
id
});
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
...
...
@@ -366,7 +366,7 @@ async function approvalLixiang(req, res, next) {
});
}
else
{
//待立项
await
DB
.
Project
.
update
({
projectLzType
:
1
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"1"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
actionName
:
'立项审批未通过'
,
...
...
@@ -586,7 +586,7 @@ async function queryJueceResult(req, res, next) {
//成功
if
(
result
.
success
)
{
//1. 更新项目状态
await
DB
.
Project
.
update
({
projectLzType
:
9
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//已经决策成功
await
DB
.
Project
.
update
({
projectLzType
:
"9"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//已经决策成功
return
res
.
sendData
();
}
else
{
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
//暂时
...
...
@@ -605,9 +605,9 @@ async function approvalJuece(req, res, next) {
let
proInfo
=
await
projectModule
.
getProjectInfo
(
req
.
body
);
if
(
req
.
body
.
approvalResult
)
{
//1. 更新项目状态--已决策
await
DB
.
Project
.
update
({
projectLzType
:
9
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"9"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo
.
projectLzType
=
9
;
proInfo
.
projectLzType
=
"9"
;
await
DB
.
ProjectLixiang
.
create
({
juece
:
proInfo
,
type
:
2
,
projectId
:
proInfo
.
id
});
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
...
...
@@ -617,7 +617,7 @@ async function approvalJuece(req, res, next) {
});
}
else
{
//回到 已立项
await
DB
.
Project
.
update
({
projectLzType
:
5
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"5"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
actionName
:
'决策审批未通过'
,
...
...
@@ -1224,9 +1224,9 @@ async function approvalZaiJuece(req, res, next) {
let
proInfo
=
await
projectModule
.
getProjectInfo
(
req
.
body
);
if
(
req
.
body
.
approvalResult
)
{
//1. 更新项目状态--已决策
await
DB
.
Project
.
update
({
projectLzType
:
13
},
{
where
:
{
id
:
req
.
body
.
id
}
});
await
DB
.
Project
.
update
({
projectLzType
:
"13"
},
{
where
:
{
id
:
req
.
body
.
id
}
});
//2. 存储快照 关联关系太多 全部建立快照表工程过大,暂时存储形式
proInfo
.
projectLzType
=
13
;
proInfo
.
projectLzType
=
"13"
;
await
DB
.
ProjectLixiang
.
create
({
zaijuece
:
proInfo
,
type
:
3
,
projectId
:
proInfo
.
id
});
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment