diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 56a857b9e..4de34635b 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1250,7 +1250,8 @@ namespace IRaCIS.Core.Application.Image.QA - var currentActionList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.CurrentActionUserId == _userInfo.UserRoleId).OrderByDescending(x => x.IsUrgent) + var currentActionList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.CurrentActionUserId == _userInfo.UserRoleId) + .Where(t => t.SecondReviewState == SecondReviewState.None).OrderByDescending(x => x.IsUrgent) .ThenBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).ToListAsync(); if (currentActionList.Count() > 0) @@ -1273,8 +1274,9 @@ namespace IRaCIS.Core.Application.Image.QA break; case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository + .Where(t=> t.SecondReviewState == SecondReviewState.None) .Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)) - .Where(x => x.SubmitState == SubmitStateEnum.Submitted + .Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.SecondReviewState == SecondReviewState.None && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) .Include(x => x.Subject).ToListAsync(); @@ -1309,6 +1311,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.DoubleAudit: visitList = await _subjectVisitRepository + .Where(t => t.SecondReviewState == SecondReviewState.None) .Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)) .Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.UserRoleId) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.UserRoleId)))