任务列表查询条件
This commit is contained in:
@@ -752,6 +752,10 @@ namespace WMS.Web.Repositories
|
||||
var query = _context.InStockTaskDetails
|
||||
.GroupJoin(_context.InStockTask, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.GroupJoin(_context.InstockTaskBox,p=>p.order.Id,ts=>ts.TaskId, (p,ts)=>new { p.detail,p.order,ts})
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order,box })
|
||||
.GroupJoin(_context.SerialNumbers, p => p.box.BoxId, ts => ts.BoxId, (p, ts) => new { p.detail, p.order, p.box,ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, serNumb) => new { p.detail, p.order,p.box, serNumb })
|
||||
.Where(adv => 1 == 1);
|
||||
|
||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||
@@ -763,6 +767,19 @@ namespace WMS.Web.Repositories
|
||||
query = query.Where(w => materialNumbs.Contains(w.detail.MaterialNumber));
|
||||
}
|
||||
|
||||
//箱号
|
||||
if (dto.BoxBillNos != null && dto.BoxBillNos.Count != 0)
|
||||
{
|
||||
query = query.Where(w => dto.BoxBillNos.Contains(w.box.BoxBillNo));
|
||||
}
|
||||
|
||||
//序列号
|
||||
if (dto.SerialNumbers != null && dto.SerialNumbers.Count != 0)
|
||||
{
|
||||
query = query.Where(w => dto.SerialNumbers.Contains(w.serNumb.SerialNumber));
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(dto.Receiver))
|
||||
query = query.Where(w => ids_Receiver.Contains(w.order.ReceiverId ?? 0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user