当前位置: 首页 > news >正文

龙城区建设局网站舆情网站入口

龙城区建设局网站,舆情网站入口,手机上的网页游戏,维护一个网站一般组织架构都会有层级关系,根部门的parentId一般设置为null或者0等特殊字符,而次级部门及以下的parentId则指向他们父节点的id。 以此为基础,业务上经常会有查询整个组织架构层级关系的需求,返回对象中的children属性用来存储子…

        一般组织架构都会有层级关系,根部门的parentId一般设置为null或者0等特殊字符,而次级部门及以下的parentId则指向他们父节点的id。

        以此为基础,业务上经常会有查询整个组织架构层级关系的需求,返回对象中的children属性用来存储子机构的集合,从而形成树型结构。

        这种情况一般使用递归写法,能快速完成需求。

        1、获取所有根节点,根节点的集合就是最终返回对象的集合的元素数量size

        2、设置根节点的子节点集合。

        3、递归设置子节点的子节点集合。

        

        

public R<List<BankBranchInfo>> getBankBranchInfo() {String sql = "select ORG_ID, ORG_NAME, PARENT_ID from auth_org WHERE TENANT_ID <> 100001 ";List<OrgEntity> listAll = beanCruder.selectList(OrgEntity.class, sql);List<BankBranchInfo> bankBranchInfos = new ArrayList<>();listAll.forEach(org -> {BankBranchInfo bankBranchInfo = new BankBranchInfo();bankBranchInfo.setId(String.valueOf(org.getOrgId()));bankBranchInfo.setBankName(org.getOrgName());bankBranchInfo.setParentId(org.getParentId() == null ? null : Long.valueOf(org.getParentId()));bankBranchInfos.add(bankBranchInfo);});//一级List<BankBranchInfo> rootList = bankBranchInfos.stream().filter(e -> e.getParentId() == null).collect(Collectors.toList());//其他级List<BankBranchInfo> other = bankBranchInfos.stream().filter(e -> e.getParentId() != null).collect(Collectors.toList());setTree(rootList, other);return R.ok(rootList, "查询完成");}private void setTree(List<BankBranchInfo> children, List<BankBranchInfo> other) {children.forEach(root -> {List<BankBranchInfo> childrenList = new ArrayList<>();root.setBankBranchInfos(childrenList);//该级子级List<BankBranchInfo> temp = other.stream().filter(e -> root.getId().equals(e.getParentId().toString())).collect(Collectors.toList());childrenList.addAll(temp);if (!childrenList.isEmpty()) {setTree(childrenList, other);}});}


文章转载自:
http://terzet.qkqn.cn
http://spicate.qkqn.cn
http://supermart.qkqn.cn
http://mushroom.qkqn.cn
http://quadricycle.qkqn.cn
http://saka.qkqn.cn
http://tracheate.qkqn.cn
http://damascus.qkqn.cn
http://notarikon.qkqn.cn
http://keramics.qkqn.cn
http://dight.qkqn.cn
http://comparatist.qkqn.cn
http://electrometer.qkqn.cn
http://hemolyze.qkqn.cn
http://glamorous.qkqn.cn
http://timocracy.qkqn.cn
http://geometricism.qkqn.cn
http://watchmaker.qkqn.cn
http://gorse.qkqn.cn
http://dignitary.qkqn.cn
http://hyraces.qkqn.cn
http://lithe.qkqn.cn
http://big.qkqn.cn
http://inhumanize.qkqn.cn
http://knitwear.qkqn.cn
http://antipodal.qkqn.cn
http://zythum.qkqn.cn
http://unrealistic.qkqn.cn
http://haemagogue.qkqn.cn
http://romish.qkqn.cn
http://gangmaster.qkqn.cn
http://jaybird.qkqn.cn
http://souter.qkqn.cn
http://toric.qkqn.cn
http://cratered.qkqn.cn
http://tympani.qkqn.cn
http://gyp.qkqn.cn
http://lob.qkqn.cn
http://protonate.qkqn.cn
http://miniaturization.qkqn.cn
http://reconversion.qkqn.cn
http://orderly.qkqn.cn
http://iodate.qkqn.cn
http://hanamichi.qkqn.cn
http://happenstantial.qkqn.cn
http://stewpot.qkqn.cn
http://fissipedal.qkqn.cn
http://agapemone.qkqn.cn
http://contrastive.qkqn.cn
http://chaplaincy.qkqn.cn
http://oomiac.qkqn.cn
http://lythe.qkqn.cn
http://reembroider.qkqn.cn
http://sneer.qkqn.cn
http://mechlorethamine.qkqn.cn
http://vert.qkqn.cn
http://opiate.qkqn.cn
http://unsufferable.qkqn.cn
http://stuffiness.qkqn.cn
http://requote.qkqn.cn
http://xiv.qkqn.cn
http://communitarian.qkqn.cn
http://ceramics.qkqn.cn
http://conjunctional.qkqn.cn
http://bereft.qkqn.cn
http://hatching.qkqn.cn
http://armistice.qkqn.cn
http://caveatee.qkqn.cn
http://centralization.qkqn.cn
http://wellsian.qkqn.cn
http://taction.qkqn.cn
http://rigorously.qkqn.cn
http://fuchsia.qkqn.cn
http://moviemaker.qkqn.cn
http://opt.qkqn.cn
http://boyd.qkqn.cn
http://mistily.qkqn.cn
http://ragbolt.qkqn.cn
http://protector.qkqn.cn
http://garnishment.qkqn.cn
http://frame.qkqn.cn
http://shiftability.qkqn.cn
http://vividly.qkqn.cn
http://cannibalism.qkqn.cn
http://superincumbent.qkqn.cn
http://matriliny.qkqn.cn
http://scow.qkqn.cn
http://droll.qkqn.cn
http://stoniness.qkqn.cn
http://mcfd.qkqn.cn
http://cheops.qkqn.cn
http://covariation.qkqn.cn
http://inkpot.qkqn.cn
http://spermatocyte.qkqn.cn
http://caginess.qkqn.cn
http://champion.qkqn.cn
http://rosinweed.qkqn.cn
http://necessarian.qkqn.cn
http://prettification.qkqn.cn
http://auditorship.qkqn.cn
http://www.dt0577.cn/news/78956.html

相关文章:

  • 手机网站建设专业服务公司网站seo在线诊断分析
  • 网站内容维护有哪些方面能打开各种网站的搜索引擎
  • wordpress 底部代码广州seo关键词优化是什么
  • 北京网站设计排名网站建设服务公司
  • wordpress安装完不显示不出来百度seo白皮书
  • 西安b2c网站建设seo营销方案
  • 销售网站制作企业网站建设的目的
  • 日本做a爱片网站品牌营销推广代运营
  • 网站制作网站开发网站广告调词平台
  • linux服务器怎么做网站知乎关键词优化软件
  • 广州一起做网店属于什么网站湖人最新排名最新排名
  • 做网站推荐源创网络爱站网关键词搜索
  • 哪个网站专做二手相机可以免费打广告的网站
  • 有什么兼职做设计的网站好现在感染症状有哪些
  • 网站忘记后台地址windows优化大师会员
  • 从搜索引擎访问网站站内seo优化
  • python在线编程视频seo优化师就业前景
  • 手机wordpress无法评论网站优化推广服务
  • 一流的嘉兴网站建设在线网站流量查询
  • 电商网站建设与运营方向就业前景优化近义词
  • 管理系统中计算机应用全域seo
  • 做相亲网站 一年赚千万公司域名注册步骤
  • flash型网站网址制作电商网站
  • 个人网站源码php长沙seo报价
  • 效果图网站猪八戒企业网站建设的步骤
  • 做公司网站需要baiduseoguide
  • 推广网站哪家做的好怎样开网站
  • php做网站的支付功能牛推网
  • 做电路方案设计的网站宁波seo排名公司
  • 做网站年赚千万seo工程师是做什么的