|
|
@@ -527,16 +527,18 @@ public class MeetingManage { |
|
|
|
.build(); |
|
|
|
if (Boolean.TRUE.equals(meeting.getIsInnerProject())) { |
|
|
|
List<MeetingInnerProject> innerProjects = meetingInnerProjectService.listByMeetingId(meetingId); |
|
|
|
Map<Long, MeetingInnerProject> innerProjectMap = CollUtils.listToMap(innerProjects, MeetingInnerProject::getProjectId); |
|
|
|
List<Project> projects = projectService.listByIds(innerProjectMap.keySet()); |
|
|
|
List<MeetingReviewProjectDTO> 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<String, MeetingInnerProject> innerProjectMap = CollUtils.listToMap(innerProjects, MeetingInnerProject::getProjectCode); |
|
|
|
List<Project> projects = projectService.listNewestByProjectCodes(innerProjectMap.keySet()); |
|
|
|
List<MeetingReviewProjectDTO> 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<String> changeProjectCodes = new ArrayList<>(); |
|
|
|
changeProjectCodes.addAll(projectCodes); |
|
|
|
changeProjectCodes.addAll(deletedProjectCodes); |
|
|
@@ -1068,7 +1072,6 @@ public class MeetingManage { |
|
|
|
}); |
|
|
|
meetingInnerProjectService.saveBatch(mips); |
|
|
|
} |
|
|
|
// |
|
|
|
List<Project> delLinkedProjList = changeProjectMap.get(Boolean.FALSE); |
|
|
|
if (CollUtil.isNotEmpty(delLinkedProjList)) { |
|
|
|
meetingInnerProjectService.remove(Wrappers.lambdaQuery(MeetingInnerProject.class) |
|
|
|