Commit 2fbee741 authored by 麻笑宇's avatar 麻笑宇

大屏中部地图数据增加初始化

parent 93d7b7a4
...@@ -397,7 +397,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -397,7 +397,7 @@ public class JGDPStatisticsServiceImpl {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (StringUtils.isEmpty(orgCode)) { if (StringUtils.isEmpty(orgCode)) {
return new HashMap<>(); return setDefaultCount(result);
} }
// 1.气瓶数量统计 // 1.气瓶数量统计
long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode); long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode);
...@@ -416,7 +416,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -416,7 +416,7 @@ public class JGDPStatisticsServiceImpl {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (StringUtils.isEmpty(orgCode)) { if (StringUtils.isEmpty(orgCode)) {
return new HashMap<>(); return setDefaultCount(result);
} }
// 0. 气瓶数量统计 // 0. 气瓶数量统计
long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode); long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode);
...@@ -429,6 +429,24 @@ public class JGDPStatisticsServiceImpl { ...@@ -429,6 +429,24 @@ public class JGDPStatisticsServiceImpl {
return result; return result;
} }
private Map<String,Object> setDefaultCount(Map<String,Object> result){
result.put(DPMapStatisticsItemEnum.LIFTING_MACHINERY.getCode(), 0);
result.put(DPMapStatisticsItemEnum.PRESSURE_VESSELS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.GAS_UNITS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.PRESSURE_PIPELINES.getCode(), 0);
result.put(DPMapStatisticsItemEnum.PASSENGER_ROPEWAYS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.MANUFACTURING_UNITS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.BOILERS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.TOTAL.getCode(), 0);
result.put(DPMapStatisticsItemEnum.OPERATORS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.CONSTRUCTION_UNITS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.GAS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.ON_SITE_MOTOR_VEHICLES.getCode(), 0);
result.put(DPMapStatisticsItemEnum.ELEVATORS.getCode(), 0);
result.put(DPMapStatisticsItemEnum.LARGE_AMUSEMENT_FACILITIES.getCode(), 0);
return result;
}
private void staticsCenterMapCountDataForPerson(Map<String, Object> result, DPFilterParamDto dpFilterParamDto, String orgCode) { private void staticsCenterMapCountDataForPerson(Map<String, Object> result, DPFilterParamDto dpFilterParamDto, String orgCode) {
if (orgCode == null) { if (orgCode == null) {
result.put(DPMapStatisticsItemEnum.OPERATORS.getCode(), 0); result.put(DPMapStatisticsItemEnum.OPERATORS.getCode(), 0);
...@@ -495,6 +513,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -495,6 +513,7 @@ public class JGDPStatisticsServiceImpl {
filterParamDto.setCityCode(r.getRegionCode().toString()); filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = getCenterMapOverviewData(filterParamDto); Map<String, Object> itemResult = getCenterMapOverviewData(filterParamDto);
itemResult.put("cityCode", r.getRegionCode()); itemResult.put("cityCode", r.getRegionCode());
itemResult.put("cityName", r.getRegionName());
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
this.setCompanyDataBatch(result); this.setCompanyDataBatch(result);
......
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