diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java index 176dc26..ac8ce50 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java @@ -38,14 +38,16 @@ public class ExpertReviewController { expertReviewManage.expertReview(req); } - @GetMapping("/detail/{projectId}/{userId}") + @GetMapping("/detail/{meetingId}/{projectId}/{userId}") @ApiOperation("获取专家评审详情") @ApiImplicitParams({ @ApiImplicitParam(name = "userId", value = "专家ID"), @ApiImplicitParam(name = "projectId", value = "项目ID") }) - public ExpertReviewDetailVO getExpertReviewDetail(@PathVariable Long userId, @PathVariable Long projectId) { - return expertReviewManage.getExpertReviewDetail(userId, projectId); + public ExpertReviewDetailVO getExpertReviewDetail(@PathVariable Long userId, + @PathVariable Long projectId, + @PathVariable Long meetingId) { + return expertReviewManage.getExpertReviewDetail(userId, projectId, meetingId); } @GetMapping("/listForGroupLeader/{projectId}/{meetingId}") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java index c6f6b81..c92e278 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java @@ -65,12 +65,13 @@ public class ExpertReviewManage { public void expertReview(ExpertReviewDetailReq req) { Long userId = LoginUserUtil.getUserId(); Long projectId = req.getProjectId(); + Long meetingId = req.getMeetingId(); String expertReviewKey = buildExpertReviewKey(projectId, userId); if (!distributedLock.lock(expertReviewKey)) { throw BizException.wrap("保存评审意见失败,请重试"); } try { - List reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId); + List reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId, meetingId); if (req.getIsFinal()) { if (reviews.isEmpty()) { throw BizException.wrap("请先填写个人评审意见"); @@ -109,8 +110,8 @@ public class ExpertReviewManage { } } - public ExpertReviewDetailVO getExpertReviewDetail(Long projectId, Long userId) { - List reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId); + public ExpertReviewDetailVO getExpertReviewDetail(Long projectId, Long userId, Long meetingId) { + List reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId, meetingId); reviews.removeIf(ExpertReview::getIsFinal); if (reviews.isEmpty()) { throw BizException.wrap("评审记录不存在"); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java index 91074c2..05bbbc0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertReviewService.java @@ -21,10 +21,11 @@ public interface IExpertReviewService extends IService { * * @param projectId 项目ID * @param expertId 专家ID + * @param meetingId 会议ID * @return 评审记录 * @author WendyYang **/ - List listByProjectIdAndExpertId(Long projectId, Long expertId); + List listByProjectIdAndExpertId(Long projectId, Long expertId, Long meetingId); /** * 获取最终评审结果 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java index e07a0e3..7b4810a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertReviewServiceImpl.java @@ -25,10 +25,11 @@ import java.util.Map; public class ExpertReviewServiceImpl extends ServiceImpl implements IExpertReviewService { @Override - public List listByProjectIdAndExpertId(Long projectId, Long expertId) { + public List listByProjectIdAndExpertId(Long projectId, Long expertId, Long meetingId) { LambdaQueryWrapper query = Wrappers.lambdaQuery(ExpertReview.class); query.eq(ExpertReview::getProjectId, projectId); query.eq(ExpertReview::getCreateBy, expertId); + query.eq(ExpertReview::getMeetingId, meetingId); query.orderByAsc(ExpertReview::getCreateOn); return list(query); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java index b5ed097..7b5d798 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java @@ -36,6 +36,8 @@ public class MeetingDetailBasicVO { @ApiModelProperty("会议类型名称") private String typeName; + private String regionCode; + @ApiModelProperty("会议类型代码") private String meetingType; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java index ecc4a51..e5f881b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java @@ -410,6 +410,7 @@ public class MeetingManage { Assert.notNull(meeting, "会议不存在"); MeetingDetailBasicVO detail = MeetingDetailBasicVO.builder() .meetingId(meeting.getId()) + .regionCode(meeting.getRegionCode()) .meetingName(meeting.getName()) .meetingType(meeting.getType()) .meetingAddress(meeting.getMeetingAddress())