This commit is contained in:
tongfei
2023-12-07 15:27:57 +08:00
parent 8288793246
commit 4db3c144ce

View File

@@ -568,7 +568,7 @@ namespace WMS.Web.Domain.Services
var boxIds = dtoData.Details.SelectMany(x => x.BoxsDetails).GroupBy(x=>x.BoxId).Select(x => x.Key).ToList(); var boxIds = dtoData.Details.SelectMany(x => x.BoxsDetails).GroupBy(x=>x.BoxId).Select(x => x.Key).ToList();
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds); var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
//判断箱库存是否存在 //判断箱库存是否存在
var isNotHaveBoxInvetory = boxInventorys.All(x => boxIds.Any(bid => bid != x.Id)); var isNotHaveBoxInvetory = boxInventorys.All(x => boxIds.Any(bid => bid != x.BoxId));
if(isNotHaveBoxInvetory) if(isNotHaveBoxInvetory)
return Result.ReFailure(ResultCodes.BoxInventoryNoDataError); return Result.ReFailure(ResultCodes.BoxInventoryNoDataError);