From 1eb17dcaaac2ece7536dc4ec23b2b54a1cfd8e69 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 19 Apr 2023 13:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=93=E5=AE=B6=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/expert/controller/ExpertReviewController.java | 8 +++++--- .../com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java | 7 ++++--- .../com/ningdatech/pmapi/expert/service/IExpertReviewService.java | 3 ++- .../pmapi/expert/service/impl/ExpertReviewServiceImpl.java | 3 ++- .../ningdatech/pmapi/meeting/entity/vo/MeetingDetailBasicVO.java | 2 ++ .../java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java | 1 + 6 files changed, 16 insertions(+), 8 deletions(-) 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())