From c27b939fa5fa6ce4d712f7e9ced2ad811d69d5ec Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 30 十月 2024 20:46:25 +0800
Subject: [PATCH] 去掉dnc部分

---
 smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java
index c5beab3..3605a35 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java
@@ -17,10 +17,11 @@
 import com.qianwen.core.tool.utils.Func;
 import com.qianwen.smartman.common.cache.SysCache;
 import com.qianwen.smartman.common.utils.Lambda;
-import com.qianwen.smartman.modules.cps.entity.Employee;
-import com.qianwen.smartman.modules.cps.service.IEmployeeService;
+import com.qianwen.smartman.modules.smis.entity.Employee;
+import com.qianwen.smartman.modules.smis.service.IEmployeeService;
 import com.qianwen.smartman.modules.system.entity.Dept;
 import com.qianwen.smartman.modules.system.entity.DeptScope;
+import com.qianwen.smartman.modules.system.entity.UserDept;
 import com.qianwen.smartman.modules.system.mapper.DeptMapper;
 import com.qianwen.smartman.modules.system.service.IDataScopeManagerService;
 import com.qianwen.smartman.modules.system.service.IDeptScopeService;
@@ -152,9 +153,7 @@
     }
 
     private void checkUsingDept(List<Long> deptId) {
-        if (this.userDeptService.count(Lambda.in((v0) -> {
-            return v0.getDeptId();
-        }, deptId)) != 0) {
+        if (this.userDeptService.count(Lambda.in(UserDept::getDeptId, deptId)) != 0) {
             throw new ServiceException("鏃犳硶鍒犻櫎,璐﹀彿缁戝畾浜嗚鏉冮檺");
         }
         
@@ -229,9 +228,8 @@
     @Override
     @Transactional
     public boolean grant(final DataScopeGrantVO grantVO) {
-        this.deptScopeService.remove(Lambda.eq((v0) -> {
-            return v0.getDeptId();
-        }, grantVO.getDeptId()));
+        this.deptScopeService.remove(Lambda.eq(DeptScope::getDeptId, grantVO.getDeptId()));
+        
         List<DeptScope> deptScopeList = grantVO.getDataScopeIds().stream().map(scopeId -> {
             DeptScope scope = new DeptScope();
             scope.setScopeId(scopeId);

--
Gitblit v1.9.3