Uat_Study
parent
36542adb19
commit
931f51583d
|
@ -154,7 +154,7 @@ namespace IRaCIS.Application.Services
|
|||
.WhereIf(dto.SubjectCode != null && dto.SubjectCode != String.Empty, x => x.SubjectCode == dto.SubjectCode)
|
||||
.WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType)
|
||||
.WhereIf(dto.Status != null, x => x.Status == dto.Status)
|
||||
.WhereIf(dto.Name != null, x => x.Name.Contains(x.Name)).OrderBy(x => x.SiteCode);
|
||||
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name)).OrderBy(x => x.SiteCode);
|
||||
|
||||
var subjectIds = await subjectQuery.Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||
List<ReadModuleView> ReadModuleViewList = await subjectQuery.Where(x => subjectIds.Contains(x.SubjectId)).ToListAsync();
|
||||
|
@ -407,8 +407,9 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == dto.SubjectId);
|
||||
|
||||
visitQuery = visitQuery.WhereIf(dto.ExpirationDate != null, x => x.LatestScanDate <= dto.ExpirationDate.Value)
|
||||
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum <= dto.ExpirationVisitNum.Value);
|
||||
visitQuery = visitQuery
|
||||
//.WhereIf(dto.ExpirationDate != null, x => x.LatestScanDate <= dto.ExpirationDate.Value)
|
||||
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum == dto.ExpirationVisitNum.Value);
|
||||
var visit = visitQuery.OrderByDescending(x => x.VisitNum).FirstOrDefault();
|
||||
|
||||
if (visit != null)
|
||||
|
|
Loading…
Reference in New Issue