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);