czh преди 2 години
родител
ревизия
ddc58c71bf

+ 1 - 3
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java

@@ -327,9 +327,7 @@ public class KwmCooperateManageService {
         }
 
         List<Long> targetEntIdList = new ArrayList<>();
-        kwmCooperates.forEach(item -> {
-            targetEntIdList.add(item.getInviterEntId().equals(id) ? item.getInviteeEntId() : item.getInviterEntId());
-        });
+        kwmCooperates.forEach(item -> targetEntIdList.add(item.getInviterEntId().equals(id) ? item.getInviteeEntId() : item.getInviterEntId()));
 
         Map<Long, EntCacheResDto> entCacheResDtoMap = remoteSystemService.queryEntCacheMapByIds(targetEntIdList);
         if (Objects.isNull(entCacheResDtoMap)) {

+ 13 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsRoleService.java

@@ -135,6 +135,19 @@ public class KwsRoleService {
         if (StringUtils.isBlank(deptIds)) {
             return idResVo;
         }
+
+        saveAuthority(roleId, deptIds);
+
+        return idResVo;
+    }
+
+    /**
+     * @param roleId 角色id  deptIds能访问的机构数据id
+     * @desc: 存数据权限
+     * @author: czh
+     * @date: 2023/8/16
+     */
+    private void saveAuthority(Long roleId, String deptIds) {
         String[] deptIdArr = deptIds.split(",");
         List<KwsAuthority> kwsAuthorities = new ArrayList<>();
         Long userId = LoginUserHolder.getUserId();
@@ -155,8 +168,6 @@ public class KwsRoleService {
         if (kwsAuthorityDao.saveBatch(kwsAuthorities) != kwsAuthorities.size()) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
-
-        return idResVo;
     }
 
     /**