diff --git a/src/WMS.Web.Repositories/InStockTaskRepositories.cs b/src/WMS.Web.Repositories/InStockTaskRepositories.cs index 2adf662d..b7ae3fc3 100644 --- a/src/WMS.Web.Repositories/InStockTaskRepositories.cs +++ b/src/WMS.Web.Repositories/InStockTaskRepositories.cs @@ -207,7 +207,7 @@ namespace WMS.Web.Repositories //boxList = boxList.GroupBy(g => g.DetailId).Select(s => s.OrderByDescending(o => o.ReceiveTime).First()).ToList(); var boxIds = boxList.GroupBy(x => x.BoxId).Select(x => x.Key).ToList(); - if (entity.Type == InstockType.Purchase) + if ((entity.Type == InstockType.Purchase||entity.Type==InstockType.ProduceSotck)) { //左连接中 右表中的数据如果有多条,所以需要特殊处理 var instockTaskBoxList = await _context.InstockTaskBox.Include(x => x.Details).Where(w => w.TaskId == entity.Id && boxIds.Contains(w.BoxId)).ToListAsync(); @@ -251,7 +251,7 @@ namespace WMS.Web.Repositories } - if (entity.Type == InstockType.Purchase) + if ((entity.Type == InstockType.Purchase || entity.Type == InstockType.ProduceSotck)) { var receiveBox = await _context.InStockTaskBoxDetails .GroupJoin(_context.InstockTaskBox, boxde => boxde.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })