自动分配修改库存;

This commit is contained in:
王奎兴
2026-02-25 10:51:17 +08:00
parent afac3b8c15
commit 1dc73121d5
2 changed files with 3 additions and 3 deletions
@@ -597,7 +597,7 @@ public class StockOutOrderApplicationService {
StockOutOrderDO stockOutOrderD = new StockOutOrderDO();
StockOutOrder stockOutOrderDb = stockOutOrderService.getById(outOrderId);
if (stockOutOrderDb == null){
throw new ServiceException("出库单ID不存在");
throw new ServiceException("出库单不存在");
}
BeanUtils.copyProperties(stockOutOrderDb, stockOutOrderD);
List<OutMaterialDetail> outMaterialDetailList = outMaterialDetailService.list(new QueryWrapper<OutMaterialDetail>().lambda()
@@ -417,9 +417,9 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
for (OutMaterialDetail outMaterialDetail : outMaterialDetailList) {
BigDecimal alreadyAllocationQuantity = outMaterialDetail.getAlreadyAllocationQuantity();
// 如果已经分配数量大于0,则跳过本次循环(该明细已分配过,不再重复处理)
if (alreadyAllocationQuantity != null && alreadyAllocationQuantity.compareTo(BigDecimal.ZERO) > 0) {
/*if (alreadyAllocationQuantity != null && alreadyAllocationQuantity.compareTo(BigDecimal.ZERO) > 0) {
continue;
}
}*/
Long materialInventoryId = outMaterialDetail.getMaterialInventoryId();
BigDecimal allocationQuantity = outMaterialDetail.getAllocationQuantity();
if (ObjectUtils.isEmpty(allocationQuantity)) {