Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
6513192c
Commit
6513192c
authored
Sep 26, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交对于任务权限校验的方法
parent
f23b1ba8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
6 deletions
+38
-6
WorkflowExcuteServiceImpl.java
...ot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
+27
-4
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+11
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
View file @
6513192c
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
service
.
impl
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -18,8 +19,6 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
ch.qos.logback.core.joran.conditional.IfAction
;
@Service
public
class
WorkflowExcuteServiceImpl
implements
IWorkflowExcuteService
{
...
...
@@ -64,7 +63,11 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
for
(
Object
obj
:
taskDetailArray
)
{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
if
(
"制定计划+内容"
.
equals
(
detail
.
getString
(
"name"
))
||
"现场确认"
.
equals
(
detail
.
getString
(
"name"
))
)
{
if
(
"制定计划+内容"
.
equals
(
detail
.
getString
(
"name"
))
||
"现场确认"
.
equals
(
detail
.
getString
(
"name"
)))
{
String
groupName
=
getFristFlowDetail
(
processInstanceId
);
if
(
StringUtils
.
isBlank
(
groupName
))
{
return
map
;
}
map
.
put
(
"taskId"
,
detail
.
getString
(
"id"
));
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"name"
,
detail
.
getString
(
"name"
));
...
...
@@ -86,7 +89,7 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"name"
,
detail
.
getString
(
"name"
));
map
.
put
(
"assign"
,
assignUser
);
return
map
;
return
map
;
}
continue
;
}
...
...
@@ -167,4 +170,24 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
}
return
newDate
+
result
;
}
/**
* 描述: 获取在流程启动时,直接完成的特定任务的执行角色信息。
* 作用:用来判断当前登录用户在任务回退到启动并完成的哪一步任务的执行权限,以及获取当前登录用户所属角色能够处理的当前任务的列表数据
* @param processInstanceId
* @return
*/
public
String
getFristFlowDetail
(
String
processInstanceId
)
{
try
{
JSONObject
detail
=
workflowFeignService
.
getHistoricIdentityLinksForProcessInstance
(
processInstanceId
);
if
(
ObjectUtils
.
isNotEmpty
(
detail
.
getJSONArray
(
"data"
)))
{
JSONObject
json
=
detail
.
getJSONArray
(
"data"
).
getJSONObject
(
1
);
if
(
json
.
getBooleanValue
(
"group"
))
{
return
json
.
getString
(
"groupId"
);
}
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
6513192c
...
...
@@ -182,6 +182,15 @@ public interface WorkflowFeignService {
* @return
* @throws ParseException
*/
@RequestMapping
(
value
=
"/activitiHistory/processes/queryCurrentUserHistoryTasks/list/{processDefinitionKey}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryCurrentUserHistoryTasks
(
@PathVariable
String
processDefinitionKey
)
throws
ParseException
;
@RequestMapping
(
value
=
"/activitiHistory/historytasks/{processDefinitionKey}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryHistoryTasks
(
@PathVariable
String
processDefinitionKey
)
throws
ParseException
;
/**
* 获取历史流程中带有执行角色组的流程信息
* @param processInstanceId
* @return
* @throws ParseException
*/
@RequestMapping
(
value
=
"/activitiHistory/processes/historytasks/getGroupNamelist/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
getHistoricIdentityLinksForProcessInstance
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
)
throws
ParseException
;
}
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