|
@@ -89,15 +89,18 @@ public class BpmProcessInstanceController {
|
|
|
convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId));
|
|
|
List<Task> tasksByProcessInstanceIds = taskService.getTasksByProcessInstanceIds(pageResult.getList().stream().map(HistoricProcessInstance::getId).collect(Collectors.toList()));
|
|
|
List<Long> collect = tasksByProcessInstanceIds.stream().map(task -> Long.valueOf(task.getAssignee())).collect(Collectors.toList());
|
|
|
- List<AdminUserRespDTO> userList = adminUserApi.getUserList(collect);
|
|
|
- Map<Long, AdminUserRespDTO> userMap = convertMap(userList, AdminUserRespDTO::getId);
|
|
|
+ // List<AdminUserRespDTO> userList = adminUserApi.getUserList(collect);
|
|
|
+ // Map<Long, AdminUserRespDTO> userMap = convertMap(userList, AdminUserRespDTO::getId);
|
|
|
+ List<EmployeeRespDTO> employeeList = employeeApi.getEmployeeListByIds(collect);
|
|
|
+ Map<Long, EmployeeRespDTO> employeeMap = convertMap(employeeList, EmployeeRespDTO::getId);
|
|
|
+
|
|
|
Map<String, BpmCategoryDO> categoryMap = categoryService.getCategoryMap(
|
|
|
convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory));
|
|
|
Map<String, BpmProcessDefinitionExtDO> bpmProcessDefinitionExtDOMap = processDefinitionService.getProcessDefinitionExtMap(
|
|
|
convertSet(pageResult.getList(), HistoricProcessInstance::getProcessDefinitionId)
|
|
|
);
|
|
|
return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult,
|
|
|
- processDefinitionMap, categoryMap, taskMap, userMap, null, bpmProcessDefinitionExtDOMap));
|
|
|
+ processDefinitionMap, categoryMap, taskMap, employeeMap, null, bpmProcessDefinitionExtDOMap));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/manager-page")
|
|
@@ -119,12 +122,15 @@ public class BpmProcessInstanceController {
|
|
|
Map<String, BpmCategoryDO> categoryMap = categoryService.getCategoryMap(
|
|
|
convertSet(processDefinitionMap.values(), ProcessDefinition::getCategory));
|
|
|
// 发起人信息
|
|
|
- Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
|
|
|
- convertSet(pageResult.getList(), processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
|
|
|
+ // Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
|
|
|
+ // convertSet(pageResult.getList(), processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
|
|
|
+ Map<Long, EmployeeRespDTO> employeeMap = employeeApi.getEmployeeMap(
|
|
|
+ convertSet(pageResult.getList(), processInstance -> NumberUtils.parseLong(processInstance.getStartUserId()))
|
|
|
+ );
|
|
|
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
|
|
|
- convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
|
|
|
+ convertSet(employeeMap.values(), EmployeeRespDTO::getDeptId));
|
|
|
return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstancePage(pageResult,
|
|
|
- processDefinitionMap, categoryMap, taskMap, userMap, deptMap, null));
|
|
|
+ processDefinitionMap, categoryMap, taskMap, employeeMap, deptMap, null));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/create")
|