From 989dd1b9dec8ffbf32657d67bb5012de3bc75d04 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期五, 09 一月 2026 15:46:53 +0800
Subject: [PATCH] #接口: WCS入库任务申请 WCS任务上报通知 WCS申请任务重新分配入库 WCS申请在库库位更换库位

---
 rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
index 1e06e7c..a705dd9 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
@@ -61,13 +61,15 @@
         if (Objects.isNull(dictType.getName())) {
             throw new CoolException("瀛楀吀鍚嶇О涓嶈兘涓虹┖锛侊紒");
         }
-        if (Objects.isNull(dictType.getDescription())) {
-            throw new CoolException("瀛楀吀鎻忚堪涓嶈兘涓虹┖锛侊紒");
-        }
         if (Objects.isNull(dictType.getCode())) {
             throw new CoolException("瀛楀吀缂栫爜涓嶈兘涓虹┖锛侊紒");
         }
-
+        if (!dictTypeService.list(new LambdaQueryWrapper<DictType>().eq(DictType::getCode, dictType.getCode())).isEmpty()) {
+            throw new CoolException("缂栫爜涓嶈兘閲嶅锛侊紒");
+        }
+        if (!dictTypeService.list(new LambdaQueryWrapper<DictType>().eq(DictType::getName, dictType.getName())).isEmpty()) {
+            throw new CoolException("鍚嶇О涓嶈兘閲嶅锛侊紒");
+        }
         if (!dictTypeService.save(dictType)) {
             return R.error("Save Fail");
         }
@@ -78,8 +80,10 @@
     @OperationLog("Update 鏁版嵁瀛楀吀")
     @PostMapping("/dictType/update")
     public R update(@RequestBody DictType dictType) {
+        if (Objects.isNull(dictType)) {
+            throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
         dictType.setUpdateBy(getLoginUserId());
-        dictType.setUpdateTime(new Date());
         if (!dictTypeService.updateById(dictType)) {
             return R.error("Update Fail");
         }

--
Gitblit v1.9.1