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
273d952e
Commit
273d952e
authored
Jan 10, 2024
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提取工作流返回数据 公共方法
parent
1377429b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
14 deletions
+50
-14
WorkflowResultDto.java
...eejoin/amos/boot/module/jg/api/dto/WorkflowResultDto.java
+18
-10
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+32
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/WorkflowResultDto.java
View file @
273d952e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
WorkflowResultDto
{
/**
* WORKFLOW实例ids
* */
String
instanceId
;
/**
* 执行人角色
* */
String
executorRoleIds
;
String
startUserId
;
String
startUserName
;
String
executorId
;
String
executorName
;
/**
* 下一步执行人角色
* */
...
...
@@ -17,10 +34,7 @@ public class WorkflowResultDto {
* 下一步执行人用户id 待办用
* */
String
nextExecutorUserIds
;
/**
* 当前执行人
* */
String
curExecutorId
;
/**
* 当前节点任务名称
* */
...
...
@@ -32,12 +46,6 @@ public class WorkflowResultDto {
String
nextTaskName
;
/**
* 任务发起时间
*
*/
String
startTime
;
/**
*
* 下一节点code
*/
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
273d952e
...
...
@@ -11,10 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import
com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
...
...
@@ -35,6 +32,8 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -733,4 +732,32 @@ public class CommonServiceImpl implements ICommonService {
}
return
null
;
}
public
List
<
WorkflowResultDto
>
buildWorkFlowInfo
(
List
<
ProcessTaskDTO
>
processTaskDTOS
)
{
List
<
WorkflowResultDto
>
workflowResultDtoList
=
new
ArrayList
<>();
processTaskDTOS
.
forEach
(
item
->
{
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
workflowResultDto
.
setInstanceId
(
item
.
getProcessInstance
().
getId
());
workflowResultDto
.
setTaskName
(
item
.
getTask
().
getName
());
workflowResultDto
.
setExecutorRoleIds
(
String
.
join
(
","
,
item
.
getCandidateGroups
()));
workflowResultDto
.
setStartUserId
(
item
.
getStartUser
().
getUserId
());
workflowResultDto
.
setStartUserName
(
item
.
getStartUser
().
getRealName
());
workflowResultDto
.
setExecutorId
(
item
.
getExecutor
().
getUserId
());
workflowResultDto
.
setExecutorName
(
item
.
getExecutor
().
getRealName
());
if
(!
CollectionUtils
.
isEmpty
(
item
.
getNextTask
()))
{
ActTaskDTO
actTaskDTO
=
item
.
getNextTask
().
get
(
0
);
workflowResultDto
.
setNextTaskId
(
actTaskDTO
.
getId
());
// workflowResultDto.setNextTaskCode(actTaskDTO.getKey()); // 工作流字段还未添加
workflowResultDto
.
setNextTaskName
(
actTaskDTO
.
getName
());
List
<
String
>
nextGroups
=
item
.
getNextCandidateGroups
().
get
(
actTaskDTO
.
getId
());
String
join
=
String
.
join
(
","
,
nextGroups
);
workflowResultDto
.
setNextExecutorRoleIds
(
join
);
List
<
String
>
nextUserIds
=
item
.
getNextTaskExecutor
().
get
(
actTaskDTO
.
getId
()).
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
String
nextUserIdsString
=
String
.
join
(
","
,
nextUserIds
);
workflowResultDto
.
setNextExecutorUserIds
(
nextUserIdsString
);
}
workflowResultDtoList
.
add
(
workflowResultDto
);
});
return
workflowResultDtoList
;
}
}
\ No newline at end of file
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