上架入库数据判空(上架保存失败);
This commit is contained in:
+5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user