diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index f483ede9..b42f447d 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index a89ee3f7..91f89ff9 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -8359,15 +8359,17 @@ public class CoeProcessLevelWeb extends ActionWeb { } // 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限 - if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ - List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); - allTeamInfo.parallelStream().forEach(teamInfo -> { - boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); - if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 - CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); - } - }); - } + new Thread(() -> { + if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ + List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); + allTeamInfo.parallelStream().forEach(teamInfo -> { + boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); + if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 + CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); + } + }); + } + }).start(); // 操作行为日志记录 if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) { @@ -8467,15 +8469,17 @@ public class CoeProcessLevelWeb extends ActionWeb { } // 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限 - if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ - List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); - allTeamInfo.parallelStream().forEach(teamInfo -> { - boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); - if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 - CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); - } - }); - } + new Thread(() -> { + if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ + List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); + allTeamInfo.parallelStream().forEach(teamInfo -> { + boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); + if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 + CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); + } + }); + } + }).start(); ro.put("id", id); // 操作行为日志记录 @@ -8624,15 +8628,17 @@ public class CoeProcessLevelWeb extends ActionWeb { } // 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限 - if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ - List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); - allTeamInfo.parallelStream().forEach(teamInfo -> { - boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); - if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 - CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); - } - }); - } + new Thread(() -> { + if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){ + List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); + allTeamInfo.parallelStream().forEach(teamInfo -> { + boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(teamPermId -> teamPermId.equals(parentId)); + if (isPerm && !teamInfo.getVersionIds().contains(model.getVersionId())){ // 当前新建的文件 父级有权限且自身没在小组权限中 + CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRole(teamInfo.getTeamId(), model.getVersionId()); + } + }); + } + }).start(); ro.put("id", id); // 操作行为日志记录 @@ -11036,18 +11042,20 @@ public String deleteReply(String replyid, String messageid) { } // 移动的文件/文件夹/架构 只要有一个在当前小组数据权限中 则 目标文件/文件夹/架构及所有直接父级都放入小组权限中 - List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); - allTeamInfo.parallelStream().forEach(teamInfo -> { - boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(verId -> sourceList.stream().anyMatch(palRepositoryModel -> palRepositoryModel.getVersionId().equals(verId))); - if (isPerm){ - Set toBeInsertPermIds = new HashSet<>(); - recursionLookUp(targetId, toBeInsertPermIds); - toBeInsertPermIds = toBeInsertPermIds.stream() - .filter(permId -> !teamInfo.getVersionIds().contains(permId)) - .collect(Collectors.toSet()); - CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRoleBatch(teamInfo.getTeamId(), toBeInsertPermIds); - } - }); + new Thread(() -> { + List allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo(); + allTeamInfo.parallelStream().forEach(teamInfo -> { + boolean isPerm = teamInfo.getVersionIds().stream().anyMatch(verId -> sourceList.stream().anyMatch(palRepositoryModel -> palRepositoryModel.getVersionId().equals(verId))); + if (isPerm){ + Set toBeInsertPermIds = new HashSet<>(); + recursionLookUp(targetId, toBeInsertPermIds); + toBeInsertPermIds = toBeInsertPermIds.stream() + .filter(permId -> !teamInfo.getVersionIds().contains(permId)) + .collect(Collectors.toSet()); + CoeCooperationAPIManager.getInstance().addPermDataToTeamAndRoleBatch(teamInfo.getTeamId(), toBeInsertPermIds); + } + }); + }).start(); /** * by bzp