文档加过滤条件

Uat_Study
hang 2022-04-12 18:01:53 +08:00
parent 9bd129b98a
commit 9e5f7bc64d
2 changed files with 5 additions and 1 deletions

View File

@ -109,6 +109,8 @@ namespace IRaCIS.Core.Application.Contracts
public string Name { get; set; } = string.Empty;
public bool? IsSign { get; set; }
}
public class UserConfirmCommand

View File

@ -188,7 +188,9 @@ namespace IRaCIS.Core.Application.Services
var unionQuery = systemDocumentQueryable.Union(trialDocQueryable)
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId);
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
.WhereIf(querySystemDocument.IsSign == true, t => t.ConfirmUserId != null)
.WhereIf(querySystemDocument.IsSign == false, t => t.ConfirmUserId == null);
return await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
}