修复bug
This commit is contained in:
@@ -522,14 +522,17 @@ namespace WMS.Web.Domain.Services
|
||||
});
|
||||
|
||||
var all_boxIds = dto.Boxs.Select(s => s.BoxId).ToList();
|
||||
//2.1判断箱是否上架过了
|
||||
var boxInventoryList = await _boxInventoryRepositories.GetList(all_boxIds);
|
||||
foreach (var b in dto.Boxs)
|
||||
//2.1判断箱是否上架过了 按箱出货才判断
|
||||
if (dto.ShelfMethod == 1)
|
||||
{
|
||||
var boxInventory = boxInventoryList.FirstOrDefault(f => f.BoxId == b.BoxId);
|
||||
if (boxInventory != null)
|
||||
var boxInventoryList = await _boxInventoryRepositories.GetList(all_boxIds);
|
||||
foreach (var b in dto.Boxs)
|
||||
{
|
||||
return Result<InStock>.ReFailure($"{b.BoxBillNo} 箱号已上架入库", 80000);
|
||||
var boxInventory = boxInventoryList.FirstOrDefault(f => f.BoxId == b.BoxId);
|
||||
if (boxInventory != null)
|
||||
{
|
||||
return Result<InStock>.ReFailure($"{b.BoxBillNo} 箱号已上架入库", 80000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user