1//=================begin-取得类型树=================2//传入所有的列表节点3privateListcTreeList(ListaList){4ListreturnList=newArrayList();5ListtopList=newArrayList();6ListtempList=newArrayList();78//筛选出顶级节点9for(SysAuditotypecategory sacty : aList) {10if(sacty.getParent()==null){11topList.add(sacty);//是顶级节点12}else{13tempList.add(sacty);//不是顶级节点14}15}1617//获取子级节点列表18for(inti=0;icTreeNodeList(ListinList,Long parentid,String headString){35ListtempList1=newArrayList();36ListtempList2=newArrayList();37ListreturnList=newArrayList();3839//取得兄弟节点和不是兄弟节点40for(inti=0;i0){50for(inti=0;i0){57returnList.addAll(cTreeNodeList(tempList2,sacty1.getId(),headString+((i+1
java 下拉列表块,Java中使用List递归生成下拉列表树
最新推荐文章于 2023-12-20 09:29:55 发布