Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
b6548690
Commit
b6548690
authored
Feb 05, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批时判断角色是否有权限
parent
b6a2d412
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
+34
-0
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
View file @
b6548690
...
@@ -202,6 +202,40 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
...
@@ -202,6 +202,40 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
Long
hiringBasicInfoId
=
requestVO
.
getHiringBasicInfoId
();
Long
hiringBasicInfoId
=
requestVO
.
getHiringBasicInfoId
();
//查询审批流程
//查询审批流程
List
<
MdPractitionerHiringApproveSteps
>
hiringApproveStepsList
=
systemConfigService
.
findHiringApproveStepsAll
();
List
<
MdPractitionerHiringApproveSteps
>
hiringApproveStepsList
=
systemConfigService
.
findHiringApproveStepsAll
();
//判断当前操作人是否具有当前流程的审批权限
Integer
currentStepSeq
=
requestVO
.
getHiringApproveStepsSeq
();
if
(
currentStepSeq
==
null
)
{
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
"审批已结束"
));
return
;
}
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"stepSeq"
,
currentStepSeq
);
List
<
MdPractitionerHiringApproveSteps
>
steps
=
(
List
<
MdPractitionerHiringApproveSteps
>)
CollectionUtils
.
select
(
hiringApproveStepsList
,
predicate
);
MdPractitionerHiringApproveSteps
step
=
steps
.
get
(
0
);
if
(
StringUtils
.
isNotEmpty
(
step
.
getAppointedApprovePractitioners
()))
{
//团队长之后的环节
String
[]
appointedMobileNos
=
step
.
getAppointedApprovePractitioners
().
split
(
","
);
if
(!
Arrays
.
asList
(
appointedMobileNos
).
contains
(
mobileNo
))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
"无此流程的审批权限"
));
return
;
}
}
else
{
//辅导人或团队长
String
approveRole
=
step
.
getApproveRole
();
AclPractitionerHiringMembership
membership
=
membershipMapper
.
selectByHiringBasicInfoId
(
hiringBasicInfoId
);
if
(
"subsystemOwner"
.
equals
(
approveRole
))
{
if
(!
practitionerId
.
equals
(
membership
.
getSubsystemOwnerId
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
"无此流程的审批权限"
));
return
;
}
}
else
{
if
(!
practitionerId
.
equals
(
membership
.
getMentorPractitionerId
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
"无此流程的审批权限"
));
return
;
}
}
}
//保存审批结果
//保存审批结果
saveRecords
(
practitionerId
,
mobileNo
,
hiringApproveStepsList
,
requestVO
,
responseVO
);
saveRecords
(
practitionerId
,
mobileNo
,
hiringApproveStepsList
,
requestVO
,
responseVO
);
...
...
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