diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java index 7486ec643..4add65325 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/handoverTaskOrder/service/HandoverTaskOrderDomainService.java @@ -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); }