gssong
2024-03-12 9f09083247ea96d01fd522aff30a2d0735d790bc
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/WorkflowUtils.java
@@ -155,17 +155,24 @@
                }
            } else {
                List<HistoricIdentityLink> candidateList = StreamUtils.filter(linksForTask, e -> FlowConstant.CANDIDATE.equals(e.getType()));
                List<Long> userIdList = StreamUtils.toList(linksForTask, e -> Long.valueOf(e.getUserId()));
                List<Long> userIdList = new ArrayList<>();
                for (HistoricIdentityLink historicIdentityLink : linksForTask) {
                    try {
                        userIdList.add(Long.valueOf(historicIdentityLink.getUserId()));
                    } catch (NumberFormatException ignored) {
                    }
                }
                List<SysUserVo> sysUsers = WORKFLOW_USER_SERVICE.getUserListByIds(userIdList);
                if (CollUtil.isNotEmpty(sysUsers)) {
                    List<Long> userIds = StreamUtils.toList(sysUsers, SysUserVo::getUserId);
                    List<String> nickNames = StreamUtils.toList(sysUsers, SysUserVo::getNickName);
                    participantVo.setCandidate(userIds);
                    participantVo.setCandidateName(nickNames);
                    if (StringUtils.isBlank(task.getAssignee()) && CollUtil.isNotEmpty(candidateList)) {
                    if (StringUtils.isBlank(task.getAssignee()) && CollUtil.isNotEmpty(candidateList) && candidateList.size() > 1) {
                        participantVo.setClaim(false);
                    }
                    if (!StringUtils.isBlank(task.getAssignee()) && CollUtil.isNotEmpty(candidateList)) {
                    if (!StringUtils.isBlank(task.getAssignee()) && CollUtil.isNotEmpty(candidateList) && candidateList.size() > 1) {
                        participantVo.setClaim(true);
                    }
                }