Commit 93fa1342 authored by chenhao's avatar chenhao

添加对于建筑树信息帅选时map中是否存在定义key-value 的判断

parent 447cf67d
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.itextpdf.text.log.SysoCounter;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom; import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
...@@ -226,7 +227,7 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -226,7 +227,7 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if(buildingMapList==null || buildingMapList.size()<1) { if(buildingMapList==null || buildingMapList.size()<1) {
return null; return null;
} }
List<Map<String, Object>> childrens = ((List<Map<String, Object>>) buildingMapList.get(0).get("children")).stream().filter(i->i.get("bizOrgCode").toString().contains(bizOrgCode)).collect(Collectors.toList()); List<Map<String, Object>> childrens = ((List<Map<String, Object>>) buildingMapList.get(0).get("children")).stream().filter(i-> i.containsKey("bizOrgCode") && i.get("bizOrgCode").toString().contains(bizOrgCode)).collect(Collectors.toList());
return parseTree(childrens,FireStationCountMap); return parseTree(childrens,FireStationCountMap);
} }
...@@ -320,5 +321,4 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -320,5 +321,4 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
} }
return resultList; return resultList;
} }
} }
...@@ -417,7 +417,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite ...@@ -417,7 +417,7 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
if (buildingMapList == null || buildingMapList.size() < 1) { if (buildingMapList == null || buildingMapList.size() < 1) {
return null; return null;
} }
List<Map<String, Object>> childrens = ((List<Map<String, Object>>) buildingMapList.get(0).get("children")).stream().filter(i->i.get("bizOrgCode").toString().contains(bizOrgCode)).collect(Collectors.toList()); List<Map<String, Object>> childrens = ((List<Map<String, Object>>) buildingMapList.get(0).get("children")).stream().filter(i->i.containsKey("bizOrgCode") && i.get("bizOrgCode").toString().contains(bizOrgCode)).collect(Collectors.toList());
Map<String, Object> reMap = parseTree(childrens, Map<String, Object> reMap = parseTree(childrens,
keySiteCountMap, allCount); keySiteCountMap, allCount);
Map<String, Object> fristMap = buildingMapList.get(0); Map<String, Object> fristMap = buildingMapList.get(0);
......
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