Compare commits

...

2 Commits

Author SHA1 Message Date
hang 27d15599c1 复核指派bug修改
continuous-integration/drone/push Build is running Details
2025-07-23 15:13:23 +08:00
hang 356384142a 下一个任务不会跳复核任务 2025-07-23 15:13:19 +08:00
2 changed files with 7 additions and 3 deletions

View File

@ -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)))

View File

@ -319,6 +319,7 @@ namespace IRaCIS.Core.Application.Service
public async Task<List<TrialSelectUserBasicInfo>> GetTrialUserRoleList(Guid trialId, Guid? subjectVisitId, UserTypeEnum? userTypeEnum)
{
var isSeconReview = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).AnyAsync(t => t.SecondReviewState == SecondReviewState.WaitAudit);
//复审指派需要过滤初审的人
var firstUserId = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => t.PreliminaryAuditUserId).FirstOrDefaultAsync();
@ -326,7 +327,7 @@ namespace IRaCIS.Core.Application.Service
.SelectMany(t => t.TrialUserRoleList)
.WhereIf(userTypeEnum != null, t => t.UserRole.UserTypeEnum == userTypeEnum)
.Where(t => t.UserRole.Id != _userInfo.UserRoleId)//iQC 指派过滤自己
.WhereIf(firstUserId != null, t => t.UserRole.Id != firstUserId)//iQC 指派过滤自己
.WhereIf(firstUserId != null && isSeconReview == false, t => t.UserRole.Id != firstUserId)//iQC 过滤初审的人,复核不过滤
.Select(t => new TrialSelectUserBasicInfo()
{
FullName = t.TrialUser.IdentityUser.FullName,