diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index bb6cd595d..5399a21bb 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -37,6 +37,8 @@ namespace IRaCIS.Core.Application.Contracts public DateTime? AuditEndTime { get; set; } + public string[]? VisitPlanArray { get; set; } + } public class CRCVisitSearchDTO : PageInput diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index b8932195c..382f120e1 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; +using IRaCIS.Core.Infrastructure.Extention; using MassTransit.Initializers; using Microsoft.AspNetCore.Mvc; @@ -38,11 +39,13 @@ namespace IRaCIS.Core.Application.Image.QA [HttpPost] public async Task>> GetImageBackList(ImageBackQueryDto inQuery) { + var svExpression = QCCommon.GetSubjectVisitFilter(inQuery.VisitPlanArray); var query = _subjectVisitImageBackRecordReposiotry.Where(t => t.SubjectVisit.TrialId == inQuery.TrialId) .WhereIf(inQuery.TrialSiteId != null, t => t.SubjectVisit.TrialSiteId == inQuery.TrialSiteId) .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(inQuery.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(inQuery.VisitName), t => t.SubjectVisit.VisitName.Contains(inQuery.VisitName)) + .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) .WhereIf(inQuery.CreateUserId != null, t => t.CreateUserId == inQuery.CreateUserId) .WhereIf(inQuery.ApplyUserRole != null, t => t.ApplyUserRole == inQuery.ApplyUserRole) .WhereIf(inQuery.ApplyBeginTime != null, t => t.CreateTime >= inQuery.ApplyBeginTime)