소스 검색

增加专家评审查询方法

tags/24080901
WendyYang 1 년 전
부모
커밋
820d6311a2
3개의 변경된 파일18개의 추가작업 그리고 5개의 파일을 삭제
  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 파일 보기

@@ -40,10 +40,18 @@ public interface IExpertReviewService extends IService<ExpertReview> {
* 获取最终评审结果
*
* @param meetingId 会议ID
* @param projectId 项目ID
* @return {@link ExpertReview}
* @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 파일 보기

@@ -44,11 +44,16 @@ public class ExpertReviewServiceImpl extends ServiceImpl<ExpertReviewMapper, Exp
}

@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);
query.eq(ExpertReview::getMeetingId, meetingId);
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 파일 보기

@@ -763,7 +763,7 @@ public class MeetingManage {
List<MeetingInnerProject> projects = meetingInnerProjectService.listByMeetingId(meetingId);
List<Long> projectIdList = CollUtils.fieldList(projects, MeetingInnerProject::getProjectId);
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 -> {
MeetingReviewProjectVO vo = buildProjectList(w);
ExpertReview review = reviewMap.get(w.getId());


불러오는 중...
취소
저장