<h4 class="sidebar-header" data-toggle="collapse" href="#collapse${ danwei_index}">
<strong>${danwei.orgname!}</strong>
</h4>
<ul class="nav sidebar-nav collapse" id="collapse${danwei_index}" >
<#list danwei.mulu as Unit>
<li><a href="#" οnclick="ShowitemmuluDetail(this)" _id="${Unit.code!}">${Unit.name!}</a></li>
</#list>
</ul>
</#list>
JSONArray itemallbyorg = new JSONArray();
JSONArray allinfos = new JSONArray();
JSONArray orgnames = new JSONArray();
JSONArray UnitListall = new JSONArray();
JSONArray muluallbyorg = new JSONArray();
if (null != UnitList && UnitList.size() > 0) {
// 对每个单位进行循环遍历查询一级目录
for (int i = 0; i < UnitList.size(); i++) {
EnforceUnit bean = UnitList.get(i);
String orgid = bean.getOrganizeId();
JSONArray jsonarraymulu2 = new JSONArray();
JSONObject allinfo = new JSONObject();
JSONObject infos = new JSONObject();
infos.put("orgid", orgid);
infos.put("orgname", bean.getOrganizeName());
JSONArray para = new JSONArray();
StringBuffer where2 = new StringBuffer();
where2.append(" AND TYPE='CF' AND FOLDER_TREE_LEVEL=0 ");
where2.append(MessageFormat.format(" AND ORG_CODE=''{0}''", orgid));
com.alibaba.fastjson.JSONObject jsonmulu = null;
jsonmulu = powerManagerService.getFloderListByPage(1, 1000, where2.toString(), para);
// JSONObject jsonmulu =
// powerManagerService.getIndexListByPage(1,20,"",UnitList.get(i).getOrganizeId(),
// "", "",regionCode,"");
JSONArray muluarray = jsonmulu.getJSONArray("pageList");
if (null != muluarray && muluarray.size() > 0) {
for (int m = 0; m < muluarray.size(); m++) {
JSONObject muluone = new JSONObject();
JSONObject muluonce = muluarray.getJSONObject(m);
muluone.put("name", muluonce.getJSONObject("columns").get("FOLDER_NAME"));
muluone.put("id", muluonce.getJSONObject("columns").get("ID"));
muluone.put("code", muluonce.getJSONObject("columns").get("CODE"));
muluone.put("unitorgcode", orgid);
muluone.put("unitorgname", bean.getOrganizeName());
jsonarraymulu2.add(muluone);
}
}
infos.put("mulu", jsonarraymulu2);
muluallbyorg.add(jsonarraymulu2);
allinfo.put("orgs", bean);
allinfo.put("mulus", jsonarraymulu2);
UnitListall.add(allinfo);
// UnitListall.add(jsonarraymulu2);
orgnames.add(bean.getOrganizeName());
allinfos.add(infos);
setAttr("zhifamulu" + i, jsonarraymulu2);
}
}
setAttr("orgnames", orgnames);
setAttr("UnitListall", UnitListall);
setAttr("muluallbyorg", muluallbyorg);
setAttr("allinfos", allinfos);
setAttr("itemallbyorg", itemallbyorg.toJSONString());
setAttr("root", getCdnURL(request));