修改模块列表
parent
8a2d88d52d
commit
0610193b04
|
@ -40,8 +40,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string? Name { get; set; }
|
||||
|
||||
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -76,15 +76,14 @@ namespace IRaCIS.Application.Services
|
|||
#region MyRegion
|
||||
dto.SortField = dto.SortField.IsNullOrEmpty() ? nameof(ReadModuleView.TrialSiteCode) : dto.SortField;
|
||||
dto.SortField = dto.Asc ? dto.SortField : dto.SortField + " desc";
|
||||
var subjectQuery = _readModuleViewRepository.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId)
|
||||
var subjectQuery = _readModuleViewRepository.Where(x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId)
|
||||
.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId)
|
||||
.WhereIf(dto.SubjectId != null, x => x.SubjectId == dto.SubjectId)
|
||||
.WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != string.Empty, x => x.TrialSiteCode == dto.TrialSiteCode)
|
||||
.WhereIf(dto.SubjectCode != null && dto.SubjectCode != string.Empty, x => x.SubjectCode == dto.SubjectCode)
|
||||
.WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType)
|
||||
.WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
|
||||
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name!)).OrderBy(x => x.SiteCode)
|
||||
|
||||
/*.WhereIf(dto.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId== dto.TrialReadingCriterionId)*/;
|
||||
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name!)).OrderBy(x => x.SiteCode);
|
||||
|
||||
var subjectIds = await subjectQuery.OrderBy(dto.SortField).Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||
|
||||
|
|
Loading…
Reference in New Issue