From 350d089c390ba74539ef52b36b0ab2adb1a27b0b Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 11 Mar 2024 16:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskMedicalReviewService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 3f38e4f38..92ad7a234 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -169,6 +169,10 @@ namespace IRaCIS.Core.Application.Service if (index == -1 || data.CurrentPageData.Count == 1) { + if (data.CurrentPageData[0].Id == inDto.MedicalReviewId) + { + throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]); + } result = data.CurrentPageData[0]; } else @@ -200,11 +204,14 @@ namespace IRaCIS.Core.Application.Service var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id&&t.VisitTask.TrialReadingCriterionId==inQuery.TrialReadingCriterionId) .WhereIf(inQuery.IsGetNextMedicalReviewTask, - x=>( !x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned & + x=>( + !x.IsInvalid&& x.AuditState== MedicalReviewAuditState.Auditing & ( x.ReadingMedicalReviewDialogList.Count()!=0&& x.ReadingMedicalReviewDialogList.Count()>0&& x.ReadingMedicalReviewDialogList.OrderByDescending(x=>x.CreateTime).FirstOrDefault().UserTypeEnumInt==(int)UserTypeEnum.IndependentReviewer) - ) ||x.Id == inQuery.Id // 这里必须找传入id 因为要找到这条的索引 获取下一条 + ) // 审核中最新回复为IR的 + || (!x.IsInvalid&& x.AuditState==MedicalReviewAuditState.WaitAudit) + ||x.Id == inQuery.Id // 这里必须找传入id 因为要找到这条的索引 获取下一条 ) .WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId) .WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)