上架管理全部上架生成库存调整记录修改

This commit is contained in:
zhou-hongcheng
2026-03-10 10:35:40 +08:00
parent 0924e1466b
commit 906c65c164
@@ -746,6 +746,14 @@ public class StockShelfOrderDomainService {
inventoryAdjustmentRecord.setFreezeAfterQuantity(BigDecimal.ZERO);
inventoryAdjustmentRecord.setInventoryBeforeQuantity(BigDecimal.ZERO);
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
inventoryAdjustmentRecord.setNetWeight(BigDecimal.ZERO );
inventoryAdjustmentRecord.setGrossWeight(BigDecimal.ZERO);
inventoryAdjustmentRecord.setVolume(BigDecimal.ZERO);
inventoryAdjustmentRecord.setArea(BigDecimal.ZERO);
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventory.getNetWeight() == null ? BigDecimal.ZERO : materialInventory.getNetWeight());
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventory.getGrossWeight() == null ? BigDecimal.ZERO : materialInventory.getGrossWeight());
inventoryAdjustmentRecord.setAdjustedVolume(materialInventory.getVolume() == null ? BigDecimal.ZERO : materialInventory.getVolume());
inventoryAdjustmentRecord.setAdjustedArea(materialInventory.getArea() == null ? BigDecimal.ZERO : materialInventory.getArea());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
} else if (materialInventoryPOS.size() == 1) {
MaterialInventory materialInventory = new MaterialInventory();
@@ -835,6 +843,14 @@ public class StockShelfOrderDomainService {
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setNetWeight(BigDecimal.ZERO );
inventoryAdjustmentRecord.setGrossWeight(BigDecimal.ZERO);
inventoryAdjustmentRecord.setVolume(BigDecimal.ZERO);
inventoryAdjustmentRecord.setArea(BigDecimal.ZERO);
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventory.getNetWeight() == null ? BigDecimal.ZERO : materialInventory.getNetWeight());
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventory.getGrossWeight() == null ? BigDecimal.ZERO : materialInventory.getGrossWeight());
inventoryAdjustmentRecord.setAdjustedVolume(materialInventory.getVolume() == null ? BigDecimal.ZERO : materialInventory.getVolume());
inventoryAdjustmentRecord.setAdjustedArea(materialInventory.getArea() == null ? BigDecimal.ZERO : materialInventory.getArea());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
}
@@ -1072,15 +1088,6 @@ public class StockShelfOrderDomainService {
inventoryStandingDetailDO.setCreateBy(loginUser.getUserid());
inventoryStandingDetailDO.setCreateByName(loginUser.getUsername());
inventoryStandingDetailDO.setCreateTime(new Date());
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setNetWeight(BigDecimal.ZERO );
inventoryAdjustmentRecord.setGrossWeight(BigDecimal.ZERO);
inventoryAdjustmentRecord.setVolume(BigDecimal.ZERO);
inventoryAdjustmentRecord.setArea(BigDecimal.ZERO);
inventoryAdjustmentRecord.setAdjustedNetWeight(shelfMaterialDetailPO.getTotalNetWeight() == null ? BigDecimal.ZERO : shelfMaterialDetailPO.getTotalNetWeight());
inventoryAdjustmentRecord.setAdjustedGrossWeight(shelfMaterialDetailPO.getTotalGrossWeight() == null ? BigDecimal.ZERO : shelfMaterialDetailPO.getTotalGrossWeight());
inventoryAdjustmentRecord.setAdjustedVolume(shelfMaterialDetailPO.getTotalVolume() == null ? BigDecimal.ZERO : shelfMaterialDetailPO.getTotalVolume());
inventoryAdjustmentRecord.setAdjustedArea(shelfMaterialDetailPO.getTotalArea() == null ? BigDecimal.ZERO : shelfMaterialDetailPO.getTotalArea());
inventoryStandingDetailDOList.add(inventoryStandingDetailDO);
}
inventoryStandingDetailService.batchInsert(inventoryStandingDetailDOList);