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)