From 60357038dfe48381a9a47e66a206e4ba8989bf1f Mon Sep 17 00:00:00 2001 From: Kelvin Date: Mon, 6 Jan 2025 17:19:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=AE=9E=E4=BD=93):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/service/impl/WmsInPlanDetailEntityServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()) { // 匹配入库明细