修改获取下一个任务-3
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2025-08-01 14:36:52 +08:00
parent 33e84a05ef
commit a11edc3053
1 changed files with 2 additions and 1 deletions

View File

@ -1365,7 +1365,7 @@ namespace IRaCIS.Core.Application.Image.QA
.Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None))
.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.CurrentActionUserId == null)
//.WhereIf(isSecondReview, t => t.PreliminaryAuditUserId != null)
//.WhereIf(isSecondReview == false, t => t.PreliminaryAuditUserId == null)
.WhereIf(isSecondReview == false, t => t.AuditState != AuditStateEnum.QCPassed)
//.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
.OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync();
@ -1404,6 +1404,7 @@ namespace IRaCIS.Core.Application.Image.QA
.Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None))
.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.CurrentActionUserId == null)
.WhereIf(isSecondReview == false, t => t.AuditState >= AuditStateEnum.PrimaryQCPassed ? t.PreliminaryAuditUserId != _userInfo.UserRoleId : true)
.WhereIf(isSecondReview == false, t => t.AuditState != AuditStateEnum.QCPassed)
//.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
.OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync();