From 21090b998acc5bb696e8767b3ba4470d3391fb6d Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 4 Apr 2023 17:01:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E9=80=BB=E8=BE=91=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 11 ++++++----- .../java/com/ningdatech/pmapi/user/manage/UserInfoManage.java | 1 - .../pmapi/user/service/impl/UserInfoServiceImpl.java | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) 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 4dadbf6..4b9f976 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)){