修复bug
This commit is contained in:
@@ -124,7 +124,7 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<bool> UpdateRange(List<InStockDetails> entitys, bool isTransaction = true);
|
Task<bool> UpdateRange(List<InStockDetails> entitys, bool isTransaction = true);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取-已入库的箱
|
/// 获取-非采购上将已入库的箱
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="boxIds"></param>
|
/// <param name="boxIds"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|||||||
@@ -488,13 +488,16 @@ namespace WMS.Web.Repositories
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取已入库的箱
|
/// 获取非采购上将已入库的箱
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="boxIds"></param>
|
/// <param name="boxIds"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<int>> GetInstockBoxIds(List<int> boxIds)
|
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