Commit d4e3e22e authored by chenzhao's avatar chenzhao

修改bug

parent da0fc706
...@@ -427,23 +427,26 @@ public class DataSourcesImpl implements DataSources { ...@@ -427,23 +427,26 @@ public class DataSourcesImpl implements DataSources {
} }
private String[] getBuildTree() throws Exception { private String[] getBuildTree() throws Exception {
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
List<Object> menus = keySiteService.getBuildTree(); List<Object> menus = keySiteService.getBuildTree();
List<String> stringList = new ArrayList<String>(); List<String> stringList = new ArrayList<String>();
initBuildTreeList(menus, stringList); initBuildTreeList(menus, stringList,bizOrgCode);
String[] str = stringList.toArray(new String[stringList.size()]); String[] str = stringList.toArray(new String[stringList.size()]);
return str; return str;
} }
private void initBuildTreeList(List<Object> menus, List<String> stringList) { private void initBuildTreeList(List<Object> menus, List<String> stringList,String bizOrgCode) {
for (Object orgMenuDto : menus) { for (Object orgMenuDto : menus) {
JSONObject detailObject = JSONObject.parseObject(orgMenuDto.toString()); JSONObject detailObject = JSONObject.parseObject(orgMenuDto.toString());
if (detailObject.containsKey("id")) { if (detailObject.containsKey("id") && detailObject.get("bizOrgCode") != null && detailObject.get("bizOrgCode").toString().startsWith(bizOrgCode)) {
stringList.add(detailObject.getString("name") + "@" + detailObject.getString("id")); // 任务3527 重点部位导出模板 id name 未正常配置 by kongfm stringList.add(detailObject.getString("name") + "@" + detailObject.getString("id")); // 任务3527 重点部位导出模板 id name 未正常配置 by kongfm
} }
JSONArray children = detailObject.getJSONArray("children"); JSONArray children = detailObject.getJSONArray("children");
if (children != null && children.size() > 0) { if (children != null && children.size() > 0) {
initBuildTreeList(children, stringList); initBuildTreeList(children, stringList,bizOrgCode);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment