查询条件优化
This commit is contained in:
@@ -754,8 +754,8 @@ namespace WMS.Web.Repositories
|
||||
.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 })
|
||||
.GroupJoin(_context.InStockDetails, p => p.detail.Id, ts => ts.TaskDetailId, (p, ts) => new { p.detail, p.order, p.box,ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, instockdet) => new { p.detail, p.order,p.box, instockdet })
|
||||
.Where(adv => 1 == 1);
|
||||
|
||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||
@@ -776,7 +776,7 @@ namespace WMS.Web.Repositories
|
||||
//序列号
|
||||
if (dto.SerialNumbers != null && dto.SerialNumbers.Count != 0)
|
||||
{
|
||||
query = query.Where(w => dto.SerialNumbers.Contains(w.serNumb.SerialNumber));
|
||||
query = query.Where(w => w.instockdet.SerialNumbers.SequenceEqual(dto.SerialNumbers));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user