From acaf6624ef2f706b8ccf442b453d802320829bd3 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 07 四月 2025 16:51:16 +0800 Subject: [PATCH] # 修改 1. 任务列表修改 2. ASN执行状态修改 3. ASN扩展字段优化 4. 确认收货扩展字段优化 --- 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