bug编号00000043,角色图搜索,或者打开目录导致系统繁忙(角色图按照创建时间维度进行树组建)
This commit is contained in:
parent
129725cbd4
commit
54a7dca316
Binary file not shown.
@ -459,7 +459,7 @@ public class OrgRoleModelUtil {
|
||||
* @param repositoryId
|
||||
* @return
|
||||
*/
|
||||
public static boolean isOrgRoleModel(String repositoryId) {
|
||||
public static boolean isOrgVirtualOrFixDir(String repositoryId) {
|
||||
if (UtilString.isNotEmpty(repositoryId)) {
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(repositoryId);
|
||||
if (model != null) {
|
||||
@ -467,14 +467,6 @@ public class OrgRoleModelUtil {
|
||||
if ("org".equals(model.getMethodCategory()) && ("default".equals(model.getMethodId()) && "角色模型".equals(model.getName()))) {
|
||||
return true;
|
||||
}
|
||||
// 具体的角色图
|
||||
String pid = model.getParentId();
|
||||
PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(pid);
|
||||
if (parentModel != null) {
|
||||
if ("org".equals(model.getMethodCategory()) && ("default".equals(parentModel.getMethodId()) && "角色模型".equals(parentModel.getName()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (repositoryId.startsWith("date-")) {
|
||||
return true;
|
||||
@ -484,6 +476,21 @@ public class OrgRoleModelUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOrgRoleModel(String repositoryId) {
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(repositoryId);
|
||||
if (model != null) {
|
||||
// 具体的角色图
|
||||
String pid = model.getParentId();
|
||||
PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(pid);
|
||||
if (parentModel != null) {
|
||||
if ("org".equals(model.getMethodCategory()) && ("default".equals(parentModel.getMethodId()) && "角色模型".equals(parentModel.getName()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取组织-角色模型虚拟路径
|
||||
* @param repositoryId
|
||||
|
||||
@ -5040,7 +5040,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
path.add(currModel.getVersionId());
|
||||
} else if (currObj.getString("id").length() < 36) {
|
||||
path.add(currObj.getString("id"));
|
||||
} else if (OrgRoleModelUtil.isOrgRoleModel(currObj.getString("id"))) {
|
||||
} else if (OrgRoleModelUtil.isOrgVirtualOrFixDir(currObj.getString("id"))) {
|
||||
names.add(currObj.getString("name"));
|
||||
path.add(currObj.getString("id"));
|
||||
}
|
||||
@ -8321,7 +8321,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
JSONArray createUserList = UtilString.isNotEmpty(createUsers) ? JSONArray.parseArray(createUsers) : new JSONArray();
|
||||
JSONArray orgIdList = UtilString.isNotEmpty(orgIds) ? JSONArray.parseArray(orgIds) : new JSONArray();
|
||||
JSONArray methodIdList = UtilString.isNotEmpty(methodIds) ? JSONArray.parseArray(methodIds) : new JSONArray();
|
||||
if (OrgRoleModelUtil.isOrgRoleModel(pid)) {// 组织-角色模型单独查询
|
||||
if (OrgRoleModelUtil.isOrgVirtualOrFixDir(pid)) {// 组织-角色模型单独查询
|
||||
ro.setData(OrgRoleModelUtil.getUsedPalRepositoryTreeDataByPid(_uc, wsId, teamId, pid, createUserList, orgIdList, methodIdList));
|
||||
return ro.toString();
|
||||
}
|
||||
@ -10627,7 +10627,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
* @return
|
||||
*/
|
||||
public String getPalProcessLevelRepositoryChildData(String wsId, String teamId, String id, String createUsers, String orgIds, String methodIds) {
|
||||
if (OrgRoleModelUtil.isOrgRoleModel(id)) {// 组织-角色模型单独处理
|
||||
if (OrgRoleModelUtil.isOrgVirtualOrFixDir(id) || OrgRoleModelUtil.isOrgRoleModel(id)) {// 组织-角色模型单独处理
|
||||
return OrgRoleModelUtil.getPalRoleLevelRepositoryChildData(_uc, wsId, teamId, id, createUsers, orgIds, methodIds);
|
||||
}
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
@ -11030,7 +11030,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
* @return
|
||||
*/
|
||||
public String getPalProcessLevelRepositoryDetailData(String wsId, String teamId, String id) {
|
||||
if (OrgRoleModelUtil.isOrgRoleModel(id)) {
|
||||
if (OrgRoleModelUtil.isOrgVirtualOrFixDir(id)) {
|
||||
return OrgRoleModelUtil.getPalProcessLevelRepositoryDetailData(_uc, wsId, teamId, id);
|
||||
}
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user