diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 5cb8e14..63d65cd 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -6,6 +6,7 @@ import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; import javax.servlet.http.HttpServletResponse; @@ -181,15 +182,15 @@ public class TodoCenterManage { List todoList = processTaskService.getUserTodoList(req); //有退回待办的 List backList = processTaskService.getBackTodoList(req); - todoList.addAll(backList); - todoList.stream().sorted(Comparator.comparing(ProcessTaskVo::getTaskCreateTime).reversed()); - if (CollUtil.isEmpty(todoList)) { + List list = Stream.concat(todoList.stream(),backList.stream()).collect(Collectors.toList()); + list.stream().filter(Objects::nonNull).sorted(Comparator.comparing(ProcessTaskVo::getTaskCreateTime).reversed()); + + if (CollUtil.isEmpty(list)) { return PageVo.empty(); } - todoList = todoList.stream().filter(Objects::nonNull).collect(Collectors.toList()); - List userTodoList = todoList.stream() + List userTodoList = list.stream() .skip((long) (pageNumber - 1) * pageSize) .limit(pageSize) .collect(Collectors.toList()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 7d65e3f..602973e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -408,5 +408,4 @@ public class UserInfoManage { } return resUserDetailVO; } - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java index 915d087..cee1f45 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java @@ -65,6 +65,9 @@ public class UserInfoServiceImpl extends ServiceImpl @Override public Map getUserMapByEmployeeCode(Set staterUsers) { + if(CollUtil.isEmpty(staterUsers)){ + return Collections.emptyMap(); + } List userInfos = userInfoMapper.selectList(Wrappers.lambdaQuery(UserInfo.class) .in(UserInfo::getEmployeeCode,staterUsers)); if(CollUtil.isEmpty(userInfos)){