From a6dcee2ef30e8faf8c31351cb56abe89cf4f9608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Wed, 27 Nov 2024 15:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=8B=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=96=B0=E5=A2=9E=E6=96=99=E7=AE=B1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ktg/mes/wm/controller/UcmCtBaseController.java | 5 +++++ .../com/ktg/mes/wm/service/IUcmCtBaseService.java | 2 ++ .../mes/wm/service/impl/UcmCtBaseServiceImpl.java | 12 ++++++++++++ 3 files changed, 19 insertions(+) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java index c0d242c..5bb18e7 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/UcmCtBaseController.java @@ -95,6 +95,11 @@ public class UcmCtBaseController extends BaseController { } } + @PostMapping("/open/add") + public String openAdd(@RequestBody UcmCtBase ucmCtBase) { + return ucmCtBaseService.addUcmCtBase(ucmCtBase); + } + /** * 查询料箱管理列表 */ diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java index 8eb6a19..dc13eb2 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IUcmCtBaseService.java @@ -71,4 +71,6 @@ public interface IUcmCtBaseService String uploadTempBoxListInfo(List rfidCardList); String uploadTempBoxItemListInfo(List rfidCardList); + + String addUcmCtBase(UcmCtBase ucmCtBase); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java index e0c34a2..1acb4e5 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java @@ -265,4 +265,16 @@ public class UcmCtBaseServiceImpl implements IUcmCtBaseService { System.out.println("=============================================="); return "OK"; } + + @Override + public String addUcmCtBase(UcmCtBase ucmCtBase) { + UcmCtBase ucmCtBaseQuery = new UcmCtBase(); + ucmCtBaseQuery.setCode(ucmCtBase.getCode()); + if (!ucmCtBaseMapper.selectUcmCtBaseList(ucmCtBaseQuery).isEmpty()) + return "新增失败,该料箱已经存在"; + ucmCtBase.setCreateTime(DateUtils.getNowDate()); + ucmCtBase.setCreateBy(getUserName()); + ucmCtBaseMapper.insertUcmCtBase(ucmCtBase); + return "OK"; + } }