Browse Source

八爪鱼增加对任务重启是否需要原因的控制
工时管家增加任务重启表
增加任务重启相关操作

yurk 2 years ago
parent
commit
d8a707d678

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -889,6 +889,13 @@ public class TaskController {
             branchDepartment= getBranchDepartment(deptId, departmentList);
         }
         List<Task> list = taskMapper.getTaskWithProjectName(queryWrapper, (pageIndex-1)*pageSize, pageSize,companyId,branchDepartment);
+        List<Integer> collect = list.stream().map(l -> l.getId()).distinct().collect(Collectors.toList());
+        collect.add(-1);
+        List<TaskExecutor> taskExecutorList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().in("task_id", collect));
+        list.forEach(l->{
+            List<TaskExecutor> executorList = taskExecutorList.stream().filter(tl -> tl.getTaskId().equals(l.getId())&&tl.getExecutorId()!=null).collect(Collectors.toList());
+            l.setExecutorList(executorList);
+        });
         int total = taskMapper.selectCount(queryWrapper);
         Map<String, Object> map = new HashMap<>();
         map.put("records", list);