Merge remote-tracking branch 'origin/feature/NoScanning' into feature/NoScanning

This commit is contained in:
yf001217 2026-06-03 17:47:24 +08:00
commit e28fa5740f
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,7 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
}
)
.flatMap(list -> list.stream())
.toList();
.collect(Collectors.toList());
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(errorMaterialNos))
.throwMessage("以下物料库存不足:" + StrUtil.join(",", errorMaterialNos));
List<WmsInventory> forDelete = dbInventories.stream()
@ -96,6 +96,7 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
.toList();
if (CollectionUtil.isNotEmpty(forDelete)) {
removeBatchByIds(forDelete);
dbInventories.removeAll(forDelete);
}
dbInventories.forEach(inventory -> {
VUtil.trueThrowBusinessError(!updateById(inventory)).throwMessage("库存更新失败");