Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
Project
Project
Details
Activity
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
耿迪迪
huaxin-rq
Commits
574c9f24
Commit
574c9f24
authored
Jul 30, 2026
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患审核查询权限
parent
0429003f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
TDangerServiceImpl.java
...va/com/zehong/system/service/impl/TDangerServiceImpl.java
+27
-16
No files found.
huaxin-system/src/main/java/com/zehong/system/service/impl/TDangerServiceImpl.java
View file @
574c9f24
...
@@ -68,7 +68,7 @@ public class TDangerServiceImpl implements ITDangerService
...
@@ -68,7 +68,7 @@ public class TDangerServiceImpl implements ITDangerService
* 1.班长审核 2.部门经理审核 3.安全部审核 4.安全总监审核 5.常务副总审核 6.总经理审核结束
* 1.班长审核 2.部门经理审核 3.安全部审核 4.安全总监审核 5.常务副总审核 6.总经理审核结束
*/
*/
private
final
Map
<
String
,
String
>
approvalPermission
=
new
HashMap
<
String
,
String
>(){{
private
final
Map
<
String
,
String
>
approvalPermission
=
new
HashMap
<
String
,
String
>(){{
put
(
"
minister
"
,
"2"
);
put
(
"
shengchanjingli
"
,
"2"
);
put
(
"se"
,
"4"
);
put
(
"se"
,
"4"
);
put
(
"fuzong"
,
"5"
);
put
(
"fuzong"
,
"5"
);
put
(
"manager"
,
"6"
);
put
(
"manager"
,
"6"
);
...
@@ -331,22 +331,32 @@ public class TDangerServiceImpl implements ITDangerService
...
@@ -331,22 +331,32 @@ public class TDangerServiceImpl implements ITDangerService
// 1. 管理员条件
// 1. 管理员条件
TRectifyGroupMemberInfo
queryParam
=
new
TRectifyGroupMemberInfo
();
TRectifyGroupMemberInfo
queryParam
=
new
TRectifyGroupMemberInfo
();
queryParam
.
setUserId
(
Long
.
valueOf
(
userInfo
.
getUserId
()));
queryParam
.
setUserId
(
Long
.
valueOf
(
userInfo
.
getUserId
()));
List
<
TRectifyGroupMemberInfo
>
memberInfoList
=
tRectifyGroupMemberInfoMapper
.
selectTRectifyGroupMemberInfoList
(
queryParam
);
List
<
TRectifyGroupMemberInfo
>
userInfoList
=
tRectifyGroupMemberInfoMapper
.
selectTRectifyGroupMemberInfoList
(
queryParam
);
if
(!
CollectionUtils
.
isEmpty
(
memberInfoList
))
{
if
(!
CollectionUtils
.
isEmpty
(
userInfoList
))
{
boolean
isAdmin
=
memberInfoList
.
stream
().
anyMatch
(
item
->
"1"
.
equals
(
item
.
getPost
()));
List
<
Long
>
userIdList
=
new
ArrayList
<>();
if
(
isAdmin
)
{
for
(
TRectifyGroupMemberInfo
user
:
userInfoList
){
List
<
Long
>
userIdList
=
memberInfoList
.
stream
()
if
(
"1"
.
equals
(
user
.
getPost
())
&&
null
!=
user
.
getGroupId
()){
.
map
(
TRectifyGroupMemberInfo:
:
getUserId
)
//查询组员信息
.
filter
(
Objects:
:
nonNull
)
TRectifyGroupMemberInfo
teamQuery
=
new
TRectifyGroupMemberInfo
();
.
distinct
()
teamQuery
.
setGroupId
(
user
.
getGroupId
());
.
collect
(
Collectors
.
toList
());
teamQuery
.
setPost
(
"2"
);
List
<
TRectifyGroupMemberInfo
>
teamInfoList
=
tRectifyGroupMemberInfoMapper
.
selectTRectifyGroupMemberInfoList
(
teamQuery
);
if
(!
CollectionUtils
.
isEmpty
(
userIdList
))
{
//查询组员信息
String
userIds
=
userIdList
.
stream
()
List
<
Long
>
teamUserIdList
=
teamInfoList
.
stream
()
.
map
(
String:
:
valueOf
)
.
map
(
TRectifyGroupMemberInfo:
:
getUserId
)
.
collect
(
Collectors
.
joining
(
","
));
.
filter
(
Objects:
:
nonNull
)
conditions
.
add
(
"(danger.admin_id IN ("
+
userIds
+
") AND danger.approval_status = '1')"
);
.
distinct
()
.
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
teamUserIdList
))
userIdList
.
addAll
(
teamUserIdList
);
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
userIdList
))
{
String
userIds
=
userIdList
.
stream
()
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
joining
(
","
));
conditions
.
add
(
"(danger.admin_id IN ("
+
userIds
+
") AND danger.approval_status = '1')"
);
}
}
}
}
...
@@ -378,6 +388,7 @@ public class TDangerServiceImpl implements ITDangerService
...
@@ -378,6 +388,7 @@ public class TDangerServiceImpl implements ITDangerService
if
(
conditions
.
isEmpty
())
{
if
(
conditions
.
isEmpty
())
{
return
""
;
return
""
;
}
}
if
(
conditions
.
size
()
==
1
)
return
" AND "
+
conditions
.
get
(
0
);
return
" AND ("
+
String
.
join
(
" OR "
,
conditions
)
+
")"
;
return
" AND ("
+
String
.
join
(
" OR "
,
conditions
)
+
")"
;
}
}
}
}
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