diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index f8e77db0e..44bdd3fc5 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -930,7 +930,7 @@ namespace IRaCIS.Core.Application.Image.QA case TrialQCProcess.SingleAudit: visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) .Include(x => x.Subject).ToListAsync(); subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) @@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id))) ) - .Where(x => !(x.QCChallengeList.Count() > 0 && x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum == UserTypeEnum.IQC)) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.OrderByDescending(x => x.CreateTime).FirstOrDefault().UserTypeEnum != UserTypeEnum.IQC) .Include(x => x.Subject).ToListAsync(); if (subjectVisit != null) {