上架入库数据判空;

This commit is contained in:
王奎兴
2026-02-07 12:25:35 +08:00
parent 44d295f702
commit d3dbeb5858
@@ -545,19 +545,24 @@ public class StockShelfOrderDomainService {
BigDecimal oldInventoryQuantity = materialInventoryPO.getInventoryQuantity();
BigDecimal newAllocationQuantity = materialInventoryPO.getAllocationQuantity().add(shelvesQuantity);
BigDecimal oldAllocationQuantity = materialInventoryPO.getAllocationQuantity();
BigDecimal oldArea = materialInventoryPO.getArea();
oldArea = oldArea != null ? oldArea : BigDecimal.ZERO;
BigDecimal totalArea = shelfMaterialDetail.getTotalArea();
totalArea = totalArea != null ? totalArea : BigDecimal.ZERO;
BigDecimal newArea = oldArea.add(totalArea);
BigDecimal oldVolume = materialInventoryPO.getVolume();
oldVolume = oldVolume != null ? oldVolume : BigDecimal.ZERO;
BigDecimal totalVolume = shelfMaterialDetail.getTotalVolume();
totalVolume = totalVolume != null ? totalVolume : BigDecimal.ZERO;
BigDecimal newVolume = oldVolume.add(totalVolume);
BigDecimal oldGrossWeight = materialInventoryPO.getGrossWeight();
oldGrossWeight = oldGrossWeight != null ? oldGrossWeight : BigDecimal.ZERO;
BigDecimal totalGrossWeight = shelfMaterialDetail.getTotalGrossWeight();
totalGrossWeight = totalGrossWeight != null ? totalGrossWeight : BigDecimal.ZERO;
BigDecimal newGrossWeight = oldGrossWeight.add(totalGrossWeight);
BigDecimal oldNetWeight = materialInventoryPO.getNetWeight();
oldNetWeight = oldNetWeight != null ? oldNetWeight : BigDecimal.ZERO;
BigDecimal totalNetWeight = shelfMaterialDetail.getTotalNetWeight();
totalNetWeight = totalNetWeight != null ? totalNetWeight : BigDecimal.ZERO;
BigDecimal newNetWeight = oldNetWeight.add(totalNetWeight);