明树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
8264d2c3
Commit
8264d2c3
authored
May 14, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
37d30c98
Pipeline
#111312
passed with stage
in 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
projectController.js
controller/projectController.js
+16
-7
userController.js
controller/userController.js
+1
-1
No files found.
controller/projectController.js
View file @
8264d2c3
...
@@ -336,12 +336,12 @@ async function startLixiang(req, res, next) {
...
@@ -336,12 +336,12 @@ async function startLixiang(req, res, next) {
projectCode
:
req
.
body
.
projectCode
,
projectCode
:
req
.
body
.
projectCode
,
});
});
return
res
.
sendData
(
ret
);
return
res
.
sendData
(
ret
);
}
else
if
(
req
.
body
.
projectLxzsUser
)
{
}
else
if
(
req
.
body
.
projectLxzsUser
)
{
// 如果没有走初审、核准但是又有终审用户,则是终审退回
// 如果没有走初审、核准但是又有终审用户,则是终审退回
req
.
body
.
daibanUsers
=
[
req
.
body
.
projectLxzsUser
];
req
.
body
.
daibanUsers
=
[
req
.
body
.
projectLxzsUser
];
let
ret
=
await
xiangmulixianggengxin
(
req
.
body
,
"4"
);
//状态 2 -- 立项核准中
let
ret
=
await
xiangmulixianggengxin
(
req
.
body
,
"4"
);
//状态 2 -- 立项核准中
// 记录流程节点操作
// 记录流程节点操作
await
DB
.
FlowRecord
.
create
({
await
DB
.
FlowRecord
.
create
({
userId
:
req
.
user
.
id
,
userId
:
req
.
user
.
id
,
...
@@ -370,7 +370,7 @@ async function startLixiang(req, res, next) {
...
@@ -370,7 +370,7 @@ async function startLixiang(req, res, next) {
//更新信息和状态
//更新信息和状态
req
.
body
.
daibanUsers
=
approvers
.
map
(
o
=>
o
.
id
);
req
.
body
.
daibanUsers
=
approvers
.
map
(
o
=>
o
.
id
);
let
ret
;
let
ret
;
if
(
rett
.
type
==
1
)
{
if
(
rett
.
type
==
1
)
{
//投管
//投管
ret
=
await
xiangmulixianggengxin
(
req
.
body
,
"4"
);
//状态 2 -- 立项核准中
ret
=
await
xiangmulixianggengxin
(
req
.
body
,
"4"
);
//状态 2 -- 立项核准中
}
else
{
}
else
{
...
@@ -416,7 +416,7 @@ async function approvalLixiangByDepartHeader(req, res, next) {
...
@@ -416,7 +416,7 @@ async function approvalLixiangByDepartHeader(req, res, next) {
}
}
let
ret
;
let
ret
;
if
(
body
.
approvalResult
)
{
if
(
body
.
approvalResult
)
{
// 给投管部经办人发消息
// 给投管部经办人发消息
let
approvers
=
await
userModule
.
getTouGuanJbrProjectApprover
(
req
.
user
.
id
);
let
approvers
=
await
userModule
.
getTouGuanJbrProjectApprover
(
req
.
user
.
id
);
if
(
!
(
approvers
&&
approvers
.
length
>
0
))
{
if
(
!
(
approvers
&&
approvers
.
length
>
0
))
{
...
@@ -687,7 +687,7 @@ async function xiangmujuecegengxin(body, projectLzType) {
...
@@ -687,7 +687,7 @@ async function xiangmujuecegengxin(body, projectLzType) {
await
Promise
.
all
(
pns8
.
map
(
item
=>
{
DB
.
ProjectZqrz
.
update
(
item
,
{
where
:
{
id
:
item
.
id
}
})
}));
await
Promise
.
all
(
pns8
.
map
(
item
=>
{
DB
.
ProjectZqrz
.
update
(
item
,
{
where
:
{
id
:
item
.
id
}
})
}));
// 处理决策审批意见 ProjectSpyjjc
// 处理决策审批意见 ProjectSpyjjc
let
projectSpyjjcs
=
body
.
projectSpyjjcs
||
[];
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
});
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
.
destroy
({
where
:
{
projectId
:
projectInfo
.
id
,
id
:
{
[
Op
.
notIn
]:
pnids12
}
}
});
await
DB
.
ProjectSpyjjc
.
bulkCreate
(
newprojectSpyjjcs
);
await
DB
.
ProjectSpyjjc
.
bulkCreate
(
newprojectSpyjjcs
);
...
@@ -1221,7 +1221,7 @@ async function listProject(req, res, next) {
...
@@ -1221,7 +1221,7 @@ async function listProject(req, res, next) {
projectLzTypes
=
[
"1"
];
projectLzTypes
=
[
"1"
];
break
;
break
;
case
"xmlx"
:
case
"xmlx"
:
projectLzTypes
=
[
"2"
,
"3"
,
"4"
,
"5"
];
projectLzTypes
=
[
"2"
,
"3"
,
"4"
,
"5"
];
break
;
break
;
case
"xmjc"
:
case
"xmjc"
:
projectLzTypes
=
[
"8"
,
"9"
,
"13"
];
projectLzTypes
=
[
"8"
,
"9"
,
"13"
];
...
@@ -1422,7 +1422,16 @@ async function getProFlowRecord(req, res, next) {
...
@@ -1422,7 +1422,16 @@ async function getProFlowRecord(req, res, next) {
{
{
model
:
DB
.
User
,
model
:
DB
.
User
,
as
:
'creator'
,
as
:
'creator'
,
attributes
:
[
"id"
,
"name"
]
attributes
:
[
"id"
,
"name"
],
include
:
[
{
model
:
DB
.
Depart
,
as
:
'departs'
,
// where: { del: 0 }, 当刚注册的用户 没有分配角色、部门时加上条件会查不到
attributes
:
[
"id"
,
"name"
,
"parentIds"
,
"parentId"
],
through
:
{
attributes
:
[]
},
}
]
}
}
]
]
});
});
...
...
controller/userController.js
View file @
8264d2c3
...
@@ -51,7 +51,7 @@ async function login(req, res, next) {
...
@@ -51,7 +51,7 @@ async function login(req, res, next) {
model
:
DB
.
Depart
,
model
:
DB
.
Depart
,
as
:
'departs'
,
as
:
'departs'
,
// where: { del: 0 }, 当刚注册的用户 没有分配角色、部门时加上条件会查不到
// where: { del: 0 }, 当刚注册的用户 没有分配角色、部门时加上条件会查不到
attributes
:
[
"id"
,
"name"
],
attributes
:
[
"id"
,
"name"
,
"parentIds"
,
"parentId"
],
through
:
{
attributes
:
[]
},
through
:
{
attributes
:
[]
},
}
}
]
]
...
...
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