From d8357ea130a8ffb1442453bf21545229499c0bce Mon Sep 17 00:00:00 2001 From: Kelvin Date: Thu, 19 Dec 2024 10:48:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=87=BA=E5=BA=93=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=BC=96=E7=A0=81=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ktg/mes/md/controller/WmsOutPlanController.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java index 4f61ad6..aa97bf0 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutPlanController.java @@ -89,8 +89,12 @@ public class WmsOutPlanController extends BaseController { @Log(title = "出库计划管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WmsOutPlan wmsOutPlan) { - if (UserConstants.NOT_UNIQUE.equals(wmsOutPlanService.checkPlanCodeUnique(wmsOutPlan))) { - return AjaxResult.error("新增出库计划失败,出库计划编码“" + wmsOutPlan.getPlanCode() + "”已存在"); +// if (UserConstants.NOT_UNIQUE.equals(wmsOutPlanService.checkPlanCodeUnique(wmsOutPlan))) { +// return AjaxResult.error("新增出库计划失败,出库计划编码“" + wmsOutPlan.getPlanCode() + "”已存在"); +// } + // 出库计划编码自动生成 + if (wmsOutPlan.getPlanCode() == null || wmsOutPlan.getPlanCode().isEmpty()) { + wmsOutPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("CKP")); } wmsOutPlan.setCreateBy(getUsername()); return toAjax(wmsOutPlanService.insertWmsOutPlan(wmsOutPlan));