库存添加单位体积

This commit is contained in:
王奎兴
2026-02-04 14:19:09 +08:00
parent 02b64d8f96
commit b5c29925a8
@@ -539,8 +539,21 @@ public class StockShelfOrderDomainService {
BigDecimal oldInventoryQuantity = materialInventoryPO.getInventoryQuantity();
BigDecimal newAllocationQuantity = materialInventoryPO.getAllocationQuantity().add(shelfMaterialDetail.getShelvesQuantity());
BigDecimal oldAllocationQuantity = materialInventoryPO.getAllocationQuantity();
BigDecimal oldArea = materialInventoryPO.getArea();
BigDecimal newArea = oldArea.add(shelfMaterialDetail.getTotalArea());
BigDecimal oldVolume = materialInventoryPO.getVolume();
BigDecimal newVolume = oldVolume.add(shelfMaterialDetail.getTotalVolume());
BigDecimal oldGrossWeight = materialInventoryPO.getGrossWeight();
BigDecimal newGrossWeight = oldGrossWeight.add(shelfMaterialDetail.getTotalGrossWeight());
BigDecimal oldNetWeight = materialInventoryPO.getNetWeight();
BigDecimal newNetWeight = oldNetWeight.add(shelfMaterialDetail.getTotalNetWeight());
materialInventoryPO.setInventoryQuantity(newInventoryQuantity);
materialInventoryPO.setAllocationQuantity(newAllocationQuantity);
materialInventoryPO.setArea(newArea);
materialInventoryPO.setVolume(newVolume);
materialInventoryPO.setGrossWeight(newGrossWeight);
materialInventoryPO.setNetWeight(newNetWeight);
BeanUtils.copyProperties(materialInventoryPO, materialInventory);
materialInventory.setUpdateBy(loginUser.getUserid());
materialInventory.setUpdateByName(loginUser.getUsername());