Commit a8832769 authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents e8d0dc22 e800ef3a
...@@ -806,6 +806,9 @@ LEFT JOIN ( ...@@ -806,6 +806,9 @@ LEFT JOIN (
#{bizOrgType} #{bizOrgType}
</foreach> </foreach>
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''">
and usr.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
order by usr.rec_date order by usr.rec_date
</select> </select>
......
...@@ -1152,13 +1152,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1152,13 +1152,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备 // 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
Map<String, Long> comMap = companyList.stream().collect(Collectors.toMap(BuildingTreeVo::getBizOrgCode, BuildingTreeVo::getId)); Map<String, Long> comMap = companyList.stream().collect(Collectors.toMap(BuildingTreeVo::getBizOrgCode, BuildingTreeVo::getId));
buildingTreeVos.forEach(b -> { //增加了一层对树的过滤,过滤掉指定公司外的其他建筑。
List<BuildingTreeVo> collect = buildingTreeVos.stream().filter(build ->companyList.stream().map(m -> {
String bizOrgCode = m.getBizOrgCode();
return bizOrgCode;
}).collect(Collectors.toList()).contains(build.getBizOrgCode())).collect(Collectors.toList());
collect.forEach(b -> {
b.setParentId("0".equals(b.getParentId()) ? String.valueOf(comMap.get(b.getBizOrgCode())) : b.getParentId()); b.setParentId("0".equals(b.getParentId()) ? String.valueOf(comMap.get(b.getBizOrgCode())) : b.getParentId());
b.setDetailPaneApi(address); b.setDetailPaneApi(address);
b.setApiUrl(apiUrl); b.setApiUrl(apiUrl);
}); });
// 4.组装树 // 4.组装树
companyList.addAll(buildingTreeVos); companyList.addAll(collect);
return companyList; return companyList;
} }
......
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