diff --git a/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar b/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar index bdc20412..bec059bb 100644 Binary files a/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar and b/com.actionsoft.apps.coe.pal.cooperation/lib/com.actionsoft.apps.coe.pal.cooperation.jar differ diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/web/CooperationWeb.java b/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/web/CooperationWeb.java index 5d9f4a6f..c8479ba3 100644 --- a/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/web/CooperationWeb.java +++ b/com.actionsoft.apps.coe.pal.cooperation/src/com/actionsoft/apps/coe/pal/cooperation/web/CooperationWeb.java @@ -1727,15 +1727,19 @@ public class CooperationWeb extends ActionWeb { //处理隐藏角色的权限复制, CoeCooperationRoleModel originHideRole = api.queryCooperationTeamHideRole(teamId, userid); - api.removeCooperationRolePerms(teamId,originHideRole.getId()); - CoeCooperationRoleModel targetHideRole = api.queryCooperationTeamHideRole(teamId, targetUserid); - List targetRolePerms = api.queryCooperationRoleDataPermList(teamId, targetHideRole.getId()); - List permModelList = new ArrayList<>(); - for (CoeCooperationRolePermModel targetRolePerm : targetRolePerms) { - CoeCooperationRolePermModel permModel = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, originHideRole.getId(), targetRolePerm.getPalVersionId(), targetRolePerm.getActionPerm()); - permModelList.add(permModel); + if (null != originHideRole){ + CoeCooperationRoleModel targetHideRole = api.queryCooperationTeamHideRole(teamId, targetUserid); + if (null != targetHideRole){ + api.removeCooperationRolePerms(teamId,originHideRole.getId()); + List targetRolePerms = api.queryCooperationRoleDataPermList(teamId, targetHideRole.getId()); + List permModelList = new ArrayList<>(); + for (CoeCooperationRolePermModel targetRolePerm : targetRolePerms) { + CoeCooperationRolePermModel permModel = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, originHideRole.getId(), targetRolePerm.getPalVersionId(), targetRolePerm.getActionPerm()); + permModelList.add(permModel); + } + api.createCooperationRolePerms(permModelList); + } } - api.createCooperationRolePerms(permModelList); return ro.toString(); }