Commit b0c9cf42 authored by tianyiming's avatar tianyiming

监管大屏地图接口调整

parent 03398e02
......@@ -1302,7 +1302,8 @@ public class DPStatisticsServiceImpl {
}
public List<Map<String, Object>> dataStatisticByReginCode(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> result = regionModels.parallelStream().filter(e -> e.getParentRegionCode() != null && (e.getParentRegionCode().toString()).equals(dpFilterParamDto.getCityCode())).map(r -> {
List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto);
List<Map<String, Object>> result = regionModels.parallelStream().map(r -> {
DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = staticsCenterMapCountDataForRegin(filterParamDto);
......@@ -1313,34 +1314,6 @@ public class DPStatisticsServiceImpl {
itemResult.put(REGION_NAME, r.getRegionName());
return itemResult;
}).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;
}
......
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