diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 16c5b2608..335c47f04 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -8000,6 +8000,13 @@ + + + 获取下一个Qc信息 + + + + QC 访视列表 diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index ad813749c..6a914a8f0 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -31,11 +31,18 @@ namespace IRaCIS.Core.Application.Contracts } + public class GetNextQCInfoInDto + { + public Guid TrialId { get; set; } + } + public class QCVisitSearchDTO : PageInput { //public AuditStateEnum? AuditState { get; set; } + public Guid? CurrentActionUserId { get; set; } + public AuditStateEnum[]? AuditStateArray { get; set; } public ChallengeStateEnum? ChallengeState { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 430b5120d..7e4ccac35 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -237,6 +237,27 @@ namespace IRaCIS.Core.Application.Image.QA return (pageList, config); } + + /// + /// 获取下一个Qc信息 + /// + /// + /// + [HttpPost] + public async Task GetNextQCInfo(GetNextQCInfoInDto inDto) + { + var result= await GetQCVisitList(new QCVisitSearchDTO() + { + + TrialId = inDto.TrialId, + CurrentActionUserId=_userInfo.Id, + PageIndex=1, + PageSize=1, + }); + + return result.Item1.CurrentPageData.Count > 0 ? result.Item1.CurrentPageData[0] : null; + } + /// /// QC 访视列表 /// @@ -406,6 +427,7 @@ namespace IRaCIS.Core.Application.Image.QA var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray); var query = _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId) + .WhereIf(visitSearchDTO.CurrentActionUserId != null, t => t.CurrentActionUserId == visitSearchDTO.CurrentActionUserId) .WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState) .WhereIf(visitSearchDTO.SiteId != null, t => t.SiteId == visitSearchDTO.SiteId) .WhereIf(visitSearchDTO.SubjectId != null, t => t.Subject.Id == visitSearchDTO.SubjectId) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index 83db23a6e..4f94fe613 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs @@ -335,7 +335,7 @@ namespace IRaCIS.Application.Services { var agreeOrNotAnswer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).Select(x => x.Answer).FirstOrDefault() ?? string.Empty; - if (agreeOrNotAnswer.IsNullOrEmpty()&& lastGlobalTask.RelatedVisitTaskIdList.Contains(x.VisitTaskId)) + if (agreeOrNotAnswer.IsNullOrEmpty()&& lastGlobalTask!=null&& lastGlobalTask.RelatedVisitTaskIdList.Contains(x.VisitTaskId)) { agreeOrNotAnswer = "1"; }