Merge remote-tracking branch 'origin/feature/NoScanning' into feature/NoScanning
This commit is contained in:
commit
e28fa5740f
|
|
@ -88,7 +88,7 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.flatMap(list -> list.stream())
|
.flatMap(list -> list.stream())
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(errorMaterialNos))
|
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(errorMaterialNos))
|
||||||
.throwMessage("以下物料库存不足:" + StrUtil.join(",", errorMaterialNos));
|
.throwMessage("以下物料库存不足:" + StrUtil.join(",", errorMaterialNos));
|
||||||
List<WmsInventory> forDelete = dbInventories.stream()
|
List<WmsInventory> forDelete = dbInventories.stream()
|
||||||
|
|
@ -96,6 +96,7 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
|
||||||
.toList();
|
.toList();
|
||||||
if (CollectionUtil.isNotEmpty(forDelete)) {
|
if (CollectionUtil.isNotEmpty(forDelete)) {
|
||||||
removeBatchByIds(forDelete);
|
removeBatchByIds(forDelete);
|
||||||
|
dbInventories.removeAll(forDelete);
|
||||||
}
|
}
|
||||||
dbInventories.forEach(inventory -> {
|
dbInventories.forEach(inventory -> {
|
||||||
VUtil.trueThrowBusinessError(!updateById(inventory)).throwMessage("库存更新失败");
|
VUtil.trueThrowBusinessError(!updateById(inventory)).throwMessage("库存更新失败");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue