修复bug
This commit is contained in:
@@ -124,7 +124,7 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateRange(List<InStockDetails> entitys, bool isTransaction = true);
|
||||
/// <summary>
|
||||
/// 获取-已入库的箱
|
||||
/// 获取-非采购上将已入库的箱
|
||||
/// </summary>
|
||||
/// <param name="boxIds"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -488,13 +488,16 @@ namespace WMS.Web.Repositories
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取已入库的箱
|
||||
/// 获取非采购上将已入库的箱
|
||||
/// </summary>
|
||||
/// <param name="boxIds"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<int>> GetInstockBoxIds(List<int> boxIds)
|
||||
{
|
||||
return await _context.InStockDetails.Where(x => boxIds.Contains(x.BoxId)).Select(s => s.BoxId).ToListAsync();
|
||||
return await _context.InStockDetails
|
||||
.GroupJoin(_context.Instock, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.Where(x => boxIds.Contains(x.detail.BoxId) && x.order.Type != InstockType.Purchase).Select(s => s.detail.BoxId).ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user