From ff2f4b605482a2873cf6e12e3dfaecb84bb795d9 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Wed, 3 Dec 2025 21:55:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/entity/vo/MaterialLabelInfoByPiVo.java | 2 ++ .../service/impl/ProductionReturnServiceImpl.java | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gaotao/modules/production/entity/vo/MaterialLabelInfoByPiVo.java b/src/main/java/com/gaotao/modules/production/entity/vo/MaterialLabelInfoByPiVo.java index bb09eee..67d758f 100644 --- a/src/main/java/com/gaotao/modules/production/entity/vo/MaterialLabelInfoByPiVo.java +++ b/src/main/java/com/gaotao/modules/production/entity/vo/MaterialLabelInfoByPiVo.java @@ -21,4 +21,6 @@ public class MaterialLabelInfoByPiVo { private String isInWh; private String labelCode; + + private BigDecimal quantity; } diff --git a/src/main/java/com/gaotao/modules/production/service/impl/ProductionReturnServiceImpl.java b/src/main/java/com/gaotao/modules/production/service/impl/ProductionReturnServiceImpl.java index d388c43..b70f5cc 100644 --- a/src/main/java/com/gaotao/modules/production/service/impl/ProductionReturnServiceImpl.java +++ b/src/main/java/com/gaotao/modules/production/service/impl/ProductionReturnServiceImpl.java @@ -201,6 +201,9 @@ public class ProductionReturnServiceImpl implements ProductionReturnService { newSelectMaterials.add(material); }else{ HandlingUnit byId = handlingUnitService.getById(material.getLabelCode()); + if(byId == null){ + throw new Exception("数据库不存在确认退料标签"); + } material.setHeight(material.getHeight().add(byId.getHeight() == null ?BigDecimal.ZERO:byId.getHeight())); newSelectMaterials.add(material); } @@ -403,6 +406,9 @@ public class ProductionReturnServiceImpl implements ProductionReturnService { newSelectMaterials.add(material); }else{ HandlingUnit byId = handlingUnitService.getById(material.getLabelCode()); + if(byId == null){ + throw new Exception("数据库不存在确认退料标签"); + } material.setHeight(material.getHeight().add(byId.getHeight() == null ?BigDecimal.ZERO:byId.getHeight())); newSelectMaterials.add(material); } @@ -707,7 +713,7 @@ public class ProductionReturnServiceImpl implements ProductionReturnService { labelInfo.setBatchNo(vo.getBatchNo()); labelInfo.setLocationId(vo.getLocationId()); labelInfo.setWarehouseId(vo.getOrderRef4()); - labelInfo.setAvailableQty(BigDecimal.ZERO); + labelInfo.setQuantity(BigDecimal.ZERO); labelInfo.setWdrNo(vo.getOrderRef3()); labelInfo.setEngChgLevel(vo.getEngChgLevel()); labelInfo.setHeight(BigDecimal.ZERO);