diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java index 8a530826..5661dd6b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java @@ -141,7 +141,7 @@ public class SysCustomerController extends BaseController sysCustomer1.setEnterpriseName(sysCustomer.getEnterpriseName()); sysCustomer1.setCustomerPurser(sysCustomer.getCustomerPurser()); SysCustomerVo sysCustomerVo2 = sysCustomerService.selectSysCustomerByCustomer(sysCustomer1); - if(ObjectUtil.isNotEmpty(sysCustomerVo2)){ + if(ObjectUtil.isNotNull(sysCustomerVo2)){ return AjaxResult.error("该客户已被其他业务员添加,"+" 客户名称 :" + sysCustomerVo2.getEnterpriseName() + "事业部 : "+ sysCustomerVo2.getCustomerPurser() + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java index db457f1c..5d99c7d2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java @@ -351,6 +351,7 @@ public class SysCustomerServiceImpl implements ISysCustomerService String businessKey = materialId.toString(); // 实体类 ID,作为流程的业务 key String key = "customer"; Map variables = new HashMap<>(); + insertSysCustomer(sysCustomer); // 构造authority传参 buildAuthority(user, variables); sysCustomer.setApplyTitle(applyTitle); diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/add.html b/ruoyi-admin/src/main/resources/templates/system/customer/add.html index 7bd68bfd..fbbe249b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customer/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/customer/add.html @@ -143,7 +143,7 @@
- +
@@ -212,8 +212,7 @@
- - +
@@ -243,7 +242,7 @@
-
@@ -261,9 +260,7 @@