diff --git a/IRaCIS.Core.Application/Service/Common/FileUploadRecordService.cs b/IRaCIS.Core.Application/Service/Common/FileUploadRecordService.cs index 53e3ac230..522dd6ab1 100644 --- a/IRaCIS.Core.Application/Service/Common/FileUploadRecordService.cs +++ b/IRaCIS.Core.Application/Service/Common/FileUploadRecordService.cs @@ -100,6 +100,8 @@ public class FileUploadRecordService(IRepository _fileUploadRe .WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectId != null && inQuery.SubjectVisitId == null, t => t.SubjectVisitId == null) .WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectVisitId != null && inQuery.StudyCode == "", t => t.StudyCode == "") + .WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectCode.IsNotNullOrEmpty() && inQuery.VisitName.IsNullOrEmpty(), t => t.SubjectVisitId == null) + .WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectCode.IsNotNullOrEmpty() && inQuery.StudyCode == "", t => t.StudyCode == "") .WhereIf(inQuery.DataFileType == 0, t => t.TrialId == null) .WhereIf(inQuery.DataFileType == 1, t => t.SubjectId != null)