Browse Source

增加专家评审查询方法

master
WendyYang 1 year ago
parent
commit
820d6311a2
3 changed files with 18 additions and 5 deletions
  1. +10
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java
  2. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 10
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java View File

@@ -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);


} }

+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java View File

@@ -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);
} }


} }

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -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());


Loading…
Cancel
Save