Commit 471b74c3 authored by tianyiming's avatar tianyiming

监管大屏地图接口调整

parent b4d5d1f0
...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.yeejoin.amos.boot.biz.common.dto.CountDto; import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto; import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto; import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto; import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum; import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
...@@ -87,6 +88,18 @@ public class DPStatisticsServiceImpl { ...@@ -87,6 +88,18 @@ public class DPStatisticsServiceImpl {
*/ */
private final static String COMPANY_TYPE_FILLING = "充装单位"; private final static String COMPANY_TYPE_FILLING = "充装单位";
/**
* 监管-中屏-地图行政区划code
*/
private final static String REGION_CODE = "regionCode";
/**
* 监管-中屏-地图行政区划code
*/
private final static String REGION_NAME = "regionName";
@Autowired @Autowired
private EquipmentCategoryMapper equipmentCategoryMapper; private EquipmentCategoryMapper equipmentCategoryMapper;
...@@ -1284,13 +1297,42 @@ public class DPStatisticsServiceImpl { ...@@ -1284,13 +1297,42 @@ public class DPStatisticsServiceImpl {
if (itemResult == null) { if (itemResult == null) {
itemResult = new HashMap<>(); itemResult = new HashMap<>();
} }
itemResult.put("regionCode", r.getRegionCode()); itemResult.put(REGION_CODE, r.getRegionCode());
itemResult.put("regionName", r.getRegionName()); itemResult.put(REGION_NAME, r.getRegionName());
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 杨陵区/韩城市 数据过滤添至返回结果
result = reginStepDataHandle(result);
return result;
}
private List<Map<String, Object>> reginStepDataHandle(List<Map<String, Object>> result) {
// 杨凌区数据统计
String ylOrgCode = commonMapper.getOrgCodeByCompanyCode(ReginStepEnum.YANGLING.getCode());
Map<String, Object> ylMap = new HashMap<>();
Long ylCertificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(ylOrgCode);
Long ylDeviceCount = equipmentCategoryMapper.countEquipByReginCode(ylOrgCode);
ylMap.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), ylCertificateCount);
ylMap.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), ylDeviceCount);
ylMap.put(REGION_CODE, ReginStepEnum.YANGLING.getCode());
ylMap.put(REGION_NAME, ReginStepEnum.YANGLING.getName());
result.add(ylMap);
// 韩城市数据统计
String hcOrgCode = commonMapper.getOrgCodeByCompanyCode(ReginStepEnum.HANCHENG.getCode());
Map<String, Object> hcMap = new HashMap<>();
Long hcCertificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(hcOrgCode);
Long hcDeviceCount = equipmentCategoryMapper.countEquipByReginCode(hcOrgCode);
hcMap.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), hcCertificateCount);
hcMap.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), hcDeviceCount);
hcMap.put(REGION_CODE, ReginStepEnum.HANCHENG.getCode());
hcMap.put(REGION_NAME, ReginStepEnum.HANCHENG.getName());
result.add(hcMap);
return result; return result;
} }
private Map<String, Object> staticsCenterMapCountDataForRegin(DPFilterParamDto dpFilterParamDto) { private Map<String, Object> staticsCenterMapCountDataForRegin(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = regionCodeOrgCodeMap.get(dpFilterParamDto.getCityCode()); String orgCode = regionCodeOrgCodeMap.get(dpFilterParamDto.getCityCode());
......
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