Commit e1d253cf authored by chenzhao's avatar chenzhao

修改代码

parent edbd7925
...@@ -500,6 +500,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -500,6 +500,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
return allListVo; return allListVo;
} }
@Override @Override
public List<BuildingTreeVo> getBuildingTierTree(Integer tier) { public List<BuildingTreeVo> getBuildingTierTree(Integer tier) {
if (tier != null) { if (tier != null) {
...@@ -1527,10 +1529,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1527,10 +1529,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
String companyCode = companyByBizOrgCodeList.getResult().getBizOrgCode(); String companyCode = companyByBizOrgCodeList.getResult().getBizOrgCode();
List<BuildingTreeVo> buildingTreeVos = this.getBuildingTreeVos(true); List<BuildingTreeVo> buildingTreeVos = this.getBuildingTreeVos(true);
List<BuildingTreeVo> orgBuildingTreeVos = buildingTreeVos.stream().filter(b-> b.getBizOrgCode() != null && b.getBizOrgCode().startsWith(companyCode)).collect(Collectors.toList()); List<BuildingTreeVo> orgBuildingTreeVos = buildingTreeVos.stream().filter(b-> b.getBizOrgCode() != null && b.getBizOrgCode().startsWith(companyCode)).collect(Collectors.toList());
return buildingTreeVos.stream().filter(b -> "-1".equals(b.getParentId())).peek(b -> {
List<BuildingTreeVo> collect = buildingTreeVos.stream().filter(b -> "-1".equals(b.getParentId())).peek(b -> {
b.setId(0L); b.setId(0L);
b.setChildren(this.getCompanyBuildingChildrenTree(b.getId().toString(), orgBuildingTreeVos)); b.setChildren(this.getCompanyBuildingChildrenTree(b.getId().toString(), orgBuildingTreeVos));
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return collect.get(0).getChildren();
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment