|
|
@@ -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<ExpertReview> reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId); |
|
|
|
List<ExpertReview> 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<ExpertReview> reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId); |
|
|
|
public ExpertReviewDetailVO getExpertReviewDetail(Long projectId, Long userId, Long meetingId) { |
|
|
|
List<ExpertReview> reviews = expertReviewService.listByProjectIdAndExpertId(projectId, userId, meetingId); |
|
|
|
reviews.removeIf(ExpertReview::getIsFinal); |
|
|
|
if (reviews.isEmpty()) { |
|
|
|
throw BizException.wrap("评审记录不存在"); |
|
|
|