提交 680b897e 编写于 作者: sq3536's avatar sq3536

根节点单丢时和下级拉平

上级 39028b22
......@@ -139,8 +139,26 @@ public class OUCoreService
{
if(StringUtils.isEmpty(root))
root="alls";
List<OrgNode> list=new ArrayList<>();
Map<String,OrgMap> store=ouModelService.getOrgModel();
if(root.equals("alls"))
{
int rootcnt=0;
String tmp="";
for(OrgMap map:store.values()) {
IBZOrganization org = map.getOrg();
if(StringUtils.isEmpty(org.getParentorgid())) {
rootcnt++;
tmp=org.getOrgid();
}
}
if(rootcnt==1)
root=tmp;
}
for(OrgMap map:store.values())
{
IBZOrganization org=map.getOrg();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册