@@ -40,10 +40,18 @@ public interface IExpertReviewService extends IService<ExpertReview> { | |||||
* 获取最终评审结果 | * 获取最终评审结果 | ||||
* | * | ||||
* @param meetingId 会议ID | * @param meetingId 会议ID | ||||
* @param projectId 项目ID | |||||
* @return {@link ExpertReview} | * @return {@link ExpertReview} | ||||
* @author WendyYang | * @author WendyYang | ||||
**/ | **/ | ||||
Map<Long, ExpertReview> listFinalReview(Long meetingId); | |||||
Map<Long, ExpertReview> listFinalReviewMap(Long meetingId); | |||||
/** | |||||
* 获取最终评审结果 | |||||
* | |||||
* @param meetingId 会议ID | |||||
* @return {@link ExpertReview} | |||||
* @author WendyYang | |||||
**/ | |||||
List<ExpertReview> listFinalReview(Long meetingId); | |||||
} | } |
@@ -44,11 +44,16 @@ public class ExpertReviewServiceImpl extends ServiceImpl<ExpertReviewMapper, Exp | |||||
} | } | ||||
@Override | @Override | ||||
public Map<Long, ExpertReview> listFinalReview(Long meetingId) { | |||||
public Map<Long, ExpertReview> listFinalReviewMap(Long meetingId) { | |||||
return CollUtils.listToMap(listFinalReview(meetingId), ExpertReview::getProjectId); | |||||
} | |||||
@Override | |||||
public List<ExpertReview> listFinalReview(Long meetingId) { | |||||
LambdaQueryWrapper<ExpertReview> query = Wrappers.lambdaQuery(ExpertReview.class); | LambdaQueryWrapper<ExpertReview> query = Wrappers.lambdaQuery(ExpertReview.class); | ||||
query.eq(ExpertReview::getMeetingId, meetingId); | query.eq(ExpertReview::getMeetingId, meetingId); | ||||
query.eq(ExpertReview::getIsFinal, Boolean.TRUE); | query.eq(ExpertReview::getIsFinal, Boolean.TRUE); | ||||
return CollUtils.listToMap(list(query), ExpertReview::getProjectId); | |||||
return list(query); | |||||
} | } | ||||
} | } |
@@ -763,7 +763,7 @@ public class MeetingManage { | |||||
List<MeetingInnerProject> projects = meetingInnerProjectService.listByMeetingId(meetingId); | List<MeetingInnerProject> projects = meetingInnerProjectService.listByMeetingId(meetingId); | ||||
List<Long> projectIdList = CollUtils.fieldList(projects, MeetingInnerProject::getProjectId); | List<Long> projectIdList = CollUtils.fieldList(projects, MeetingInnerProject::getProjectId); | ||||
List<Project> projectList = projectService.listByIds(projectIdList); | List<Project> projectList = projectService.listByIds(projectIdList); | ||||
Map<Long, ExpertReview> reviewMap = expertReviewService.listFinalReview(meetingId); | |||||
Map<Long, ExpertReview> reviewMap = expertReviewService.listFinalReviewMap(meetingId); | |||||
return CollUtils.convert(projectList, w -> { | return CollUtils.convert(projectList, w -> { | ||||
MeetingReviewProjectVO vo = buildProjectList(w); | MeetingReviewProjectVO vo = buildProjectList(w); | ||||
ExpertReview review = reviewMap.get(w.getId()); | ExpertReview review = reviewMap.get(w.getId()); | ||||