From c6e9227208dc46f2f46f046fea0b21bea398a16c Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 07 十月 2023 09:40:15 +0800
Subject: [PATCH] #报销相关
---
src/main/java/com/zy/crm/manager/controller/CstmrController.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/crm/manager/controller/CstmrController.java b/src/main/java/com/zy/crm/manager/controller/CstmrController.java
index 75ffe4d..b26ea1f 100644
--- a/src/main/java/com/zy/crm/manager/controller/CstmrController.java
+++ b/src/main/java/com/zy/crm/manager/controller/CstmrController.java
@@ -119,6 +119,9 @@
if (cstmrService.selectByUuid(hostId, cstmr.getUuid()) != null) {
throw new CoolException("瀹㈡埛宸插瓨鍦�");
}
+ if (cstmrService.selectByName(hostId, cstmr.getName()) != null) {
+ throw new CoolException("瀹㈡埛宸插瓨鍦�");
+ }
Cstmr cstmr1 = cstmrService.selectByName(hostId, cstmr.getName());
if (cstmr1!=null){
throw new CoolException("璇ュ鎴蜂俊鎭凡瀛樺湪锛屼笟鍔″憳鏄�:"+cstmr1.getDirector$());
@@ -132,6 +135,7 @@
cstmr.setCreateTime(new Date());
cstmr.setUpdateBy(getUserId());
cstmr.setUpdateTime(new Date());
+ cstmr.setDirector(getUserId());
cstmr.setStatus(1);
cstmrService.insert(cstmr);
return R.ok();
@@ -153,9 +157,9 @@
@ManagerAuth(memo = "鍒犻櫎鐢叉柟鍗曚綅")
public R delete(@RequestParam(value="ids[]") Long[] ids){
for (Long id : ids){
- int cstmr_id = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id));
- if (cstmr_id!=0){
- return R.error("瀛樺湪鍏宠仈璺熻釜椤圭洰锛岀姝㈠垹闄わ紒锛侊紒");
+ int order = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id));
+ if (order!=0){
+ return R.error("瀛樺湪鍏宠仈鐨勮窡韪」鐩紝绂佹鍒犻櫎锛侊紒锛�");
}
cstmrService.deleteById(id);
}
--
Gitblit v1.9.1