修改警告

This commit is contained in:
2022-08-10 14:38:11 +08:00
parent 6e4fb5e407
commit 682a3fd5db
8 changed files with 102 additions and 55 deletions
@@ -170,7 +170,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.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name)).OrderBy(x => x.SiteCode);
.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();
@@ -334,7 +334,7 @@ namespace IRaCIS.Application.Services
visitQuery = visitQuery
//.WhereIf(dto.ExpirationDate != null, x => x.LatestScanDate <= dto.ExpirationDate.Value)
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum == dto.ExpirationVisitNum.Value);
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum == dto.ExpirationVisitNum!);
var visit = visitQuery.OrderByDescending(x => x.VisitNum).FirstOrDefault();
if (visit != null)