增加搜索条件
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
49375ec5a9
commit
651af672f6
|
|
@ -124,6 +124,11 @@ public class FileUploadRecordQuery : PageInput
|
|||
|
||||
public string StudyCode { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public string? VisitName { get; set; }
|
||||
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
|
|
@ -211,6 +216,12 @@ public class UploadFileSyncRecordQuery : PageInput
|
|||
|
||||
|
||||
public jobState? JobState { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public string? VisitName { get; set; }
|
||||
|
||||
public string? StudyCode { get; set; }
|
||||
}
|
||||
|
||||
public class BatchAddSyncFileCommand
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
|||
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectVisitId == inQuery.SubjectVisitId)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.VisitName), t => t.SubjectVisit.VisitName.Contains(inQuery.VisitName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.Subject.Code.Contains(inQuery.SubjectCode))
|
||||
|
||||
.WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectId != null && inQuery.SubjectVisitId == null, t => t.SubjectVisitId == null)
|
||||
.WhereIf(inQuery.DataFileType == 1 && inQuery.SubjectVisitId != null && inQuery.StudyCode.IsNullOrEmpty(), t => t.StudyCode == "")
|
||||
|
|
@ -137,7 +139,9 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
|||
var fileUploadRecordQueryable = _uploadFileSyncRecordRepository
|
||||
|
||||
.WhereIf(inQuery.FileUploadRecordId != null, t => t.FileUploadRecordId == inQuery.FileUploadRecordId)
|
||||
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.StudyCode), t => t.FileUploadRecord.StudyCode.Contains(inQuery.StudyCode))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.VisitName), t => t.FileUploadRecord.SubjectVisit.VisitName.Contains(inQuery.VisitName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.FileUploadRecord.Subject.Code.Contains(inQuery.SubjectCode))
|
||||
|
||||
.ProjectTo<UploadFileSyncRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue