|
|
|
@ -391,13 +391,18 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic
|
|
|
|
|
project.setPerm(Constants.DEFAULT_ADMIN_PERMISSION); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (CollectionUtils.isEmpty(projectList)) { |
|
|
|
|
result.setData(pageInfo); |
|
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
List<User> userList = userMapper.selectByIds(projectList.stream() |
|
|
|
|
.map(Project::getUserId).distinct().collect(Collectors.toList())); |
|
|
|
|
Map<Integer, String> userMap = userList.stream().collect(Collectors.toMap(User::getId, User::getUserName)); |
|
|
|
|
List<ProjectWorkflowDefinitionCount> projectWorkflowDefinitionCountList = |
|
|
|
|
workflowDefinitionMapper.queryProjectWorkflowDefinitionCountByProjectCodes( |
|
|
|
|
projectList.stream().map(Project::getCode).distinct().collect(Collectors.toList())); |
|
|
|
|
Map<Long, Integer> projectWorkflowDefinitionCountMap = projectWorkflowDefinitionCountList.stream() |
|
|
|
|
List<Long> projectCodes = projectList.stream().map(Project::getCode).distinct().collect(Collectors.toList()); |
|
|
|
|
Map<Long, Integer> projectWorkflowDefinitionCountMap = workflowDefinitionMapper |
|
|
|
|
.queryProjectWorkflowDefinitionCountByProjectCodes(projectCodes) |
|
|
|
|
.stream() |
|
|
|
|
.collect(Collectors.toMap(ProjectWorkflowDefinitionCount::getProjectCode, |
|
|
|
|
ProjectWorkflowDefinitionCount::getCount)); |
|
|
|
|
for (Project project : projectList) { |
|
|
|
|