入库单-接口优化

This commit is contained in:
tongfei
2023-10-30 11:05:21 +08:00
parent fd0bb092db
commit 32cdd97e57
4 changed files with 116 additions and 3 deletions

View File

@@ -53,6 +53,26 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.SourceBillNo))
query = query.Where(w => EF.Functions.Like(w.detail.SourceBillNo, "%" + dto.SourceBillNo + "%"));
//if (!string.IsNullOrEmpty(dto.MaterialNumber))
// query = query.Where(w => EF.Functions.Like(w.detail.BillNo, "%" + dto.BillNo + "%"));
if(dto.SupplierId.HasValue)
query = query.Where(w => w.detail.SupplierId == dto.SupplierId.Value);
if (dto.OrgId.HasValue)
query = query.Where(w => w.detail.OrgId == dto.OrgId.Value);
if (dto.StockId.HasValue)
query = query.Where(w => w.detail.StockId == dto.StockId.Value);
if (dto.Type.HasValue)
query = query.Where(w => (int)w.order.Type == dto.Type);
if (dto.CreateBeginDate != null)
query = query.Where(w => w.order.CreateTime >= dto.CreateBeginDate);
if (dto.CreateEndDate != null)
query = query.Where(w => w.order.CreateTime <= dto.CreateEndDate);
var response = new ResultPagedList<InStockQueryResponse>();
int total = await query.CountAsync();
response.TotalCount = total;