出库调整前后净重...

This commit is contained in:
zhou-hongcheng
2026-03-10 16:32:18 +08:00
parent e3e73a307c
commit feb13e3ece
@@ -277,7 +277,7 @@ public class HandoverTaskOrderDomainService {
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge"); inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge"); inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格"); inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
inventoryAdjustmentRecord.setAdjustBeforeStatusName("合格"); // inventoryAdjustmentRecord.setAdjustBeforeStatusName("合格");
inventoryAdjustmentRecord.setMaterialBaseInfoId(materialInventoryPO.getMaterialBaseInfoId()); inventoryAdjustmentRecord.setMaterialBaseInfoId(materialInventoryPO.getMaterialBaseInfoId());
inventoryAdjustmentRecord.setMaterialCode(outMaterialDetail.getMaterialNo()); inventoryAdjustmentRecord.setMaterialCode(outMaterialDetail.getMaterialNo());
inventoryAdjustmentRecord.setMaterialName(outMaterialDetail.getCommodityName()); inventoryAdjustmentRecord.setMaterialName(outMaterialDetail.getCommodityName());
@@ -311,15 +311,15 @@ public class HandoverTaskOrderDomainService {
inventoryAdjustmentRecord.setFreezeAfterQuantity(newFreezeQuantity); inventoryAdjustmentRecord.setFreezeAfterQuantity(newFreezeQuantity);
inventoryAdjustmentRecord.setInventoryBeforeQuantity(oldInventoryQuantity); inventoryAdjustmentRecord.setInventoryBeforeQuantity(oldInventoryQuantity);
inventoryAdjustmentRecord.setInventoryAfterQuantity(newInventoryQuantity); inventoryAdjustmentRecord.setInventoryAfterQuantity(newInventoryQuantity);
inventoryAdjustmentRecord.setNetWeight(materialInventoryPO.getNetWeight() == null ? BigDecimal.ZERO : materialInventoryPO.getNetWeight()); inventoryAdjustmentRecord.setNetWeight(outMaterialDetail.getTotalNetWeight() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalNetWeight());
inventoryAdjustmentRecord.setGrossWeight(materialInventoryPO.getGrossWeight() == null ? BigDecimal.ZERO : materialInventoryPO.getGrossWeight()); inventoryAdjustmentRecord.setGrossWeight(outMaterialDetail.getTotalGrossWeight() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalGrossWeight());
inventoryAdjustmentRecord.setVolume(materialInventoryPO.getVolume() == null ? BigDecimal.ZERO : materialInventoryPO.getVolume()); inventoryAdjustmentRecord.setVolume(outMaterialDetail.getTotalVolume() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalVolume());
inventoryAdjustmentRecord.setArea(materialInventoryPO.getArea() == null ? BigDecimal.ZERO : materialInventoryPO.getArea()); inventoryAdjustmentRecord.setArea(outMaterialDetail.getTotalArea() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalArea());
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventoryPO.getNetWeight().subtract(outMaterialDetail.getTotalNetWeight())); inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventoryPO.getNetWeight());
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventoryPO.getGrossWeight().subtract(outMaterialDetail.getTotalGrossWeight())); inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventoryPO.getGrossWeight());
inventoryAdjustmentRecord.setAdjustedVolume(materialInventoryPO.getVolume().subtract(outMaterialDetail.getTotalVolume()) ); inventoryAdjustmentRecord.setAdjustedVolume(materialInventoryPO.getVolume() );
inventoryAdjustmentRecord.setAdjustedArea(materialInventoryPO.getArea().subtract(outMaterialDetail.getTotalArea()) ); inventoryAdjustmentRecord.setAdjustedArea(materialInventoryPO.getArea() );
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord); inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
} }