出库调整前后净重...

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.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
inventoryAdjustmentRecord.setAdjustBeforeStatusName("合格");
// inventoryAdjustmentRecord.setAdjustBeforeStatusName("合格");
inventoryAdjustmentRecord.setMaterialBaseInfoId(materialInventoryPO.getMaterialBaseInfoId());
inventoryAdjustmentRecord.setMaterialCode(outMaterialDetail.getMaterialNo());
inventoryAdjustmentRecord.setMaterialName(outMaterialDetail.getCommodityName());
@@ -311,15 +311,15 @@ 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.setNetWeight(outMaterialDetail.getTotalNetWeight() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalNetWeight());
inventoryAdjustmentRecord.setGrossWeight(outMaterialDetail.getTotalGrossWeight() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalGrossWeight());
inventoryAdjustmentRecord.setVolume(outMaterialDetail.getTotalVolume() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalVolume());
inventoryAdjustmentRecord.setArea(outMaterialDetail.getTotalArea() == null ? BigDecimal.ZERO : outMaterialDetail.getTotalArea());
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()) );
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventoryPO.getNetWeight());
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventoryPO.getGrossWeight());
inventoryAdjustmentRecord.setAdjustedVolume(materialInventoryPO.getVolume() );
inventoryAdjustmentRecord.setAdjustedArea(materialInventoryPO.getArea() );
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}