From 81db6c59b18617fc3ee4cfada3efc8c33d789778 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 6 Dec 2024 16:38:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.=20=E4=BC=9A=E8=AE=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=9F=A5=E8=AF=A2=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=EF=BC=9B=202.=20=E5=85=B3?= =?UTF-8?q?=E8=81=94=E9=A1=B9=E7=9B=AE=E6=9C=AA=E5=8F=98=E6=9B=B4=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=94=E5=9B=9E=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hz/pm/api/meeting/manage/MeetingManage.java | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java index 6d0804d..6b9620e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java @@ -527,16 +527,18 @@ public class MeetingManage { .build(); if (Boolean.TRUE.equals(meeting.getIsInnerProject())) { List innerProjects = meetingInnerProjectService.listByMeetingId(meetingId); - Map innerProjectMap = CollUtils.listToMap(innerProjects, MeetingInnerProject::getProjectId); - List projects = projectService.listByIds(innerProjectMap.keySet()); - List convert = CollUtils.convert(projects, w -> { - MeetingReviewProjectDTO mrp = MeetingReviewProjectBuilder.convert(w); - MeetingInnerProject mip = innerProjectMap.get(mrp.getProjectId()); - mrp.setMeetingProjectId(mip.getId()); - mrp.setReviewResultDetail(ProjectReviewResultBuilder.convert(mip)); - return mrp; - }); - detail.setProjects(convert); + if (!innerProjects.isEmpty()) { + Map innerProjectMap = CollUtils.listToMap(innerProjects, MeetingInnerProject::getProjectCode); + List projects = projectService.listNewestByProjectCodes(innerProjectMap.keySet()); + List convert = CollUtils.convert(projects, w -> { + MeetingReviewProjectDTO mrp = MeetingReviewProjectBuilder.convert(w); + MeetingInnerProject mip = innerProjectMap.get(mrp.getProjectCode()); + mrp.setMeetingProjectId(mip.getId()); + mrp.setReviewResultDetail(ProjectReviewResultBuilder.convert(mip)); + return mrp; + }); + detail.setProjects(convert); + } } detail.setInviteRule(inviteRuleDetail(meetingId)); return detail; @@ -1037,7 +1039,9 @@ public class MeetingManage { } return deleted; }).map(MeetingInnerProject::getProjectCode).collect(Collectors.toList()); - + if (deletedProjectCodes.isEmpty() && projectCodes.isEmpty()) { + return; + } List changeProjectCodes = new ArrayList<>(); changeProjectCodes.addAll(projectCodes); changeProjectCodes.addAll(deletedProjectCodes); @@ -1068,7 +1072,6 @@ public class MeetingManage { }); meetingInnerProjectService.saveBatch(mips); } - // List delLinkedProjList = changeProjectMap.get(Boolean.FALSE); if (CollUtil.isNotEmpty(delLinkedProjList)) { meetingInnerProjectService.remove(Wrappers.lambdaQuery(MeetingInnerProject.class)