diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java index eefa94178..b275ee219 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java @@ -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);