收货-判断-箱里面的物料存在不存在

This commit is contained in:
tongfei
2024-03-02 11:54:57 +08:00
parent 0bf9735ee3
commit c623227b08

View File

@@ -675,6 +675,13 @@ namespace WMS.Web.Domain.Services
if (boxs == null || boxs.Count == 0)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxNoData);
//3.判断箱里面对应的物料是否存在;不存在就报错
foreach (var item in boxs)
{
if(item.Details==null || item.Details.Count==0)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxMateriaNoData);
}
//判断箱是否存在库存:有的话就提示“箱号已上架入库”
var boxInventory = await _boxInventoryRepositories.GetList(boxs.Select(x => x.Id).ToList());
if (boxInventory != null && boxInventory.Count != 0)