关于多层级树形结构的项目列表
2016-10-31 20:12
337 查看
这里记录一下
public static List<Map> getTreeDep(List<Department> depList,Long parentId){List<Map> mapList=new ArrayList<Map>();for(Department department:depList){if(department.getParentId()==parentId){Map map=new HashedMap();map.put("id",department.getId());map.put("text",department.getName());map.put("state",department.getIsDelete());map.put("iconCls","emptyico");map.put("children",getTreeDep(depList,department.getId()));mapList.add(map);}}return mapList;}
相关文章推荐
- 关于drp项目中的实体模型中树形结构的映射
- 关于intellij导入项目左边没有形成树形结构问题
- 关于dva项目的文件目录结构
- 项目开发-树形层级结构中的数量统计
- intellij 创建maven项目的树形目录结构
- 关于android stuido 与 Eclipse 的android项目结构对比
- 飞秋_关于MVC项目目录结构调整的建议
- 关于树形结构父类查子类,子类查父类的方法
- 关于“DropDownList 有一个无效 SelectedValue,原因是它不存在于项目列表中”的解决办法
- javascript+css简单实现树形结构列表
- [转]Unix下针对邮件,搜索,网络硬盘等海量存储的分布式文件系统项目(关于GFS、MogileFS分布式文件系统邮件列表)
- MAVEN创建多模块项目(水平与树形结构)
- Android实现多层级Spinner列表选项实时更新树形层级
- idea MAVEN创建多模块项目(水平与树形结构)
- 关于idea新建子目录时往父目录名字后叠加而不是树形结构的解决方法(转)
- 关于树形结构的表与另外一个表的连接查询
- 关于mysql中数据存储复合树形结构,查询时结果按树形结构输出
- 将Json数组转换为树形结构生成菜单列表
- magento 得到树形结构的分类列表
- DevExpress Xaf入门——关于树形结构对象的配置(DC模式)