Kaynağa Gözat

增加专家评审查询方法

tags/24080901
WendyYang 1 yıl önce
ebeveyn
işleme
820d6311a2
3 değiştirilmiş dosya ile 18 ekleme ve 5 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet