diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java index ef22c43..34979f2 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java @@ -67,8 +67,11 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS wmsInPlanDetailEntityList.forEach(entity -> { // 获取入库计划信息 WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(entity.getPlanId()); - // 获取入库计划 - WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId().toString()); + if (Objects.isNull(wmsInPlan)) { + throw new RuntimeException("入库计划查询失败, planId: " + entity.getPlanId()); + } + // 获取入库计划类型 + WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByCode(wmsInPlan.getPlanTypeCode()); for (WmsInPlanDetail detail : wmsInPlan.getWmsInPlanDetailList()) { // 匹配入库明细