|
@@ -272,6 +272,22 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
//操作记录
|
|
//操作记录
|
|
List<ActionLog> actionLogs = actionLogMapper.selectByInfoListCustom(custom.getId());
|
|
List<ActionLog> actionLogs = actionLogMapper.selectByInfoListCustom(custom.getId());
|
|
List<Task> tasks = taskMapper.selectList(new QueryWrapper<Task>().in("custom_id", custom1.getId()));
|
|
List<Task> tasks = taskMapper.selectList(new QueryWrapper<Task>().in("custom_id", custom1.getId()));
|
|
|
|
+ if (tasks.size()>0){
|
|
|
|
+ List<String> ids = tasks.stream()
|
|
|
|
+ .flatMap(task -> Arrays.stream(task.getExecutorId().split(",")))
|
|
|
|
+ .distinct()
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ List<User> users = userMapper.selectList(new QueryWrapper<User>().in("id", ids));
|
|
|
|
+ Map<String, String> map = users.stream().collect(Collectors.toMap(User::getId, User::getName));
|
|
|
|
+ for (Task task : tasks) {
|
|
|
|
+ List<String> executorNames = Arrays.stream(task.getExecutorId().split(","))
|
|
|
|
+ .map(map::get)
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ task.setExecutorNames(executorNames);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
custom1.setTasks(tasks);
|
|
custom1.setTasks(tasks);
|
|
custom1.setActionLogs(actionLogs);
|
|
custom1.setActionLogs(actionLogs);
|
|
//联系人
|
|
//联系人
|