出库交接增加净重...

This commit is contained in:
zhou-hongcheng
2026-03-09 16:32:02 +08:00
parent c85adcf878
commit 6e52d85cbf
@@ -311,6 +311,16 @@ public class HandoverTaskOrderDomainService {
inventoryAdjustmentRecord.setFreezeAfterQuantity(newFreezeQuantity);
inventoryAdjustmentRecord.setInventoryBeforeQuantity(oldInventoryQuantity);
inventoryAdjustmentRecord.setInventoryAfterQuantity(newInventoryQuantity);
inventoryAdjustmentRecord.setNetWeight(materialInventoryPO.getNetWeight() == null ? BigDecimal.ZERO : materialInventoryPO.getNetWeight());
inventoryAdjustmentRecord.setGrossWeight(materialInventoryPO.getGrossWeight() == null ? BigDecimal.ZERO : materialInventoryPO.getGrossWeight());
inventoryAdjustmentRecord.setVolume(materialInventoryPO.getVolume() == null ? BigDecimal.ZERO : materialInventoryPO.getVolume());
inventoryAdjustmentRecord.setArea(materialInventoryPO.getArea() == null ? BigDecimal.ZERO : materialInventoryPO.getArea());
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventoryPO.getNetWeight().subtract(outMaterialDetail.getTotalNetWeight()));
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventoryPO.getGrossWeight().subtract(outMaterialDetail.getTotalGrossWeight()));
inventoryAdjustmentRecord.setAdjustedVolume(materialInventoryPO.getVolume().subtract(outMaterialDetail.getTotalVolume()) );
inventoryAdjustmentRecord.setAdjustedArea(materialInventoryPO.getArea().subtract(outMaterialDetail.getTotalArea()) );
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
}