From 519886a70d630e3cdd6c0f40f55fcebc6e780dc5 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 19 三月 2024 17:45:11 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
index 9e9700e..6255839 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
@@ -4,6 +4,7 @@
import java.util.Calendar;
import java.util.List;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.domain.BaseOnlyvalue;
import com.ruoyi.project.service.IBaseOnlyvalueService;
import com.ruoyi.web.controller.common.OnlyValueCommon;
@@ -83,13 +84,16 @@
*/
//@PreAuthorize("@ss.hasPermi('project:externalperson:add')")
@Log(title = "澶栧洿鍗曚綅浜哄憳", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
@RepeatSubmit
public AjaxResult add(@RequestBody ServiceExternalperson serviceExternalperson) {
- String zj = onlyValueCommon.addOnlyValue("zj");
- String formattedNumber = String.format("%05d", zj);
- serviceExternalperson.setUserno(formattedNumber);
- return toAjax(serviceExternalpersonService.save(serviceExternalperson));
+ if (StringUtils.isEmpty(serviceExternalperson.getUserno())) {
+ String zj = onlyValueCommon.addOnlyValue("zj");
+ String formattedNumber = String.format("%05d", zj);
+ serviceExternalperson.setUserno(formattedNumber);
+ }
+ boolean save1 = serviceExternalpersonService.save(serviceExternalperson);
+ return AjaxResult.success(serviceExternalperson);
}
/**
--
Gitblit v1.9.3