|
@@ -772,9 +772,18 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
if (!replace) {
|
|
if (!replace) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+ List<Task> taskList = taskService.createTaskQuery()
|
|
|
|
+ .processInstanceId(String.valueOf(tfCustomFlowEntity.getFlowId())).list();
|
|
|
|
+ String pendApproveIds = null;
|
|
|
|
+ if (!CollectionUtils.isEmpty(taskList) && taskList.size() > 1) {
|
|
|
|
+ List<String> list = taskList.stream().map(s -> s.getAssignee()).collect(Collectors.toList());
|
|
|
|
+ pendApproveIds = list.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",");
|
|
|
|
+ } else {
|
|
|
|
+ pendApproveIds = String.valueOf(userId);
|
|
|
|
+ }
|
|
TFFlowLog tfFlowLog = new TFFlowLog(sysUser.getOrgId(), Long.parseLong(oldUserId), sysUser.getId(),
|
|
TFFlowLog tfFlowLog = new TFFlowLog(sysUser.getOrgId(), Long.parseLong(oldUserId), sysUser.getId(),
|
|
currFlowTaskResult.getSetup(), Long.parseLong(task.getProcessInstanceId()),
|
|
currFlowTaskResult.getSetup(), Long.parseLong(task.getProcessInstanceId()),
|
|
- Long.parseLong(task.getId()), tfCustomFlowEntity.getId(), String.valueOf(userId));
|
|
|
|
|
|
+ Long.parseLong(task.getId()), tfCustomFlowEntity.getId(), pendApproveIds);
|
|
tfFlowLog.setApproveOperation(FlowApproveOperationEnum.EXCHANGE);
|
|
tfFlowLog.setApproveOperation(FlowApproveOperationEnum.EXCHANGE);
|
|
SysUser exchangeUser = sysUserService.getById(userId);
|
|
SysUser exchangeUser = sysUserService.getById(userId);
|
|
Optional.ofNullable(exchangeUser).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("转审人为空"));
|
|
Optional.ofNullable(exchangeUser).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("转审人为空"));
|