diff --git a/src/main/java/com/spring/modules/shipment/service/impl/ShipmentServiceImpl.java b/src/main/java/com/spring/modules/shipment/service/impl/ShipmentServiceImpl.java index 86118d9..c7de54c 100644 --- a/src/main/java/com/spring/modules/shipment/service/impl/ShipmentServiceImpl.java +++ b/src/main/java/com/spring/modules/shipment/service/impl/ShipmentServiceImpl.java @@ -195,6 +195,9 @@ public class ShipmentServiceImpl extends ServiceImpl i box.setPartNo(detail.getPartNo()); box.setSite(shipment.getSite()); PartInformationVo part = shipmentRollMapper.queryPart(box); + if (Objects.isNull(part)){ + throw new RuntimeException(detail.getPartNo()+"物料信息不存在!"); + } String customerPart = shipmentRollMapper.queryPartPropertyItem(part.getSite(),part.getPartNo(),"P00001"); String[] customerPartNo = customerPart.split(","); if (customerPartNo.length < 3){