From b588d1467ce562bbff0e2ed3bca629a8c9095e62 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Mon, 9 Dec 2024 11:22:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E7=BC=96=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java index 0dd010d..8cb72c4 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java @@ -92,7 +92,9 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { public int insertWmsInPlan(WmsInPlan wmsInPlan) { wmsInPlan.setCreateTime(DateUtils.getNowDate()); // 设置计划编码 - wmsInPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("RKP")); + if (wmsInPlan.getPlanCode() == null) { + wmsInPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("RKP")); + } int rows = wmsInPlanMapper.insertWmsInPlan(wmsInPlan); insertWmsInPlanDetails(wmsInPlan); return rows; @@ -161,6 +163,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { List wmsInPlanDetailEntityList = list.get(i).getWmsInPlanDetailEntityList(); wmsInPlanDetailsList1.get(i).setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); wmsInPlanDetailEntityMapper.deleteWmsInPlanDetailEntityByPlanDetailsId(wmsInPlanDetailsList1.get(i).getDetailsId()); + // 插入实例 insertWmsInPlanDetailEntity(wmsInPlanDetailsList1.get(i)); } }