入库单-接口优化
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user