Commit 160307e9 authored by 李松's avatar 李松

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents a00a6cc8 83049baf
...@@ -242,6 +242,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -242,6 +242,9 @@ public class JGDPStatisticsServiceImpl {
public Map<String, Object> getCenterMapCountDataForGlobal(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> getCenterMapCountDataForGlobal(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (StringUtils.isEmpty(orgCode)) {
return new HashMap<>();
}
// 1.气瓶数量统计 // 1.气瓶数量统计
long cylinderNum = this.staticsCenterMapCountDataForCylinder(result, orgCode); long cylinderNum = this.staticsCenterMapCountDataForCylinder(result, orgCode);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量 //1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
...@@ -258,6 +261,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -258,6 +261,9 @@ public class JGDPStatisticsServiceImpl {
private Map<String, Object> getCenterMapOverviewData(DPFilterParamDto dpFilterParamDto) { private Map<String, Object> getCenterMapOverviewData(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if(StringUtils.isEmpty(orgCode)){
return new HashMap<>();
}
// 0. 气瓶数量统计 // 0. 气瓶数量统计
long cylinderNum = this.staticsCenterMapCountDataForCylinder(result, orgCode); long cylinderNum = this.staticsCenterMapCountDataForCylinder(result, orgCode);
// 1. 8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量 // 1. 8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
...@@ -859,13 +865,13 @@ public class JGDPStatisticsServiceImpl { ...@@ -859,13 +865,13 @@ public class JGDPStatisticsServiceImpl {
public List<Map<String, Object>> maintenanceCountTopTen(DPFilterParamDto dpFilterParamDto) { public List<Map<String, Object>> maintenanceCountTopTen(DPFilterParamDto dpFilterParamDto) {
List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto); List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto);
List<Integer> regionCodeList = regionModels.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModels.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
Map<Integer,RegionModel> regionMap = regionModels.stream().collect(Collectors.toMap(RegionModel::getRegionCode, Function.identity())); Map<Integer, RegionModel> regionMap = regionModels.stream().collect(Collectors.toMap(RegionModel::getRegionCode, Function.identity()));
List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCountTopTen(dpFilterParamDto,regionCodeList); List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCountTopTen(dpFilterParamDto, regionCodeList);
List<Map<String, Object>> resultList = new ArrayList<>(); List<Map<String, Object>> resultList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("key", i); result.put("key", i);
result.put("city", regionMap.get(Integer.valueOf(list.get(i).get("companyCode")+"")).getRegionName()); result.put("city", regionMap.get(Integer.valueOf(list.get(i).get("companyCode") + "")).getRegionName());
result.put("count", list.get(i).get("count")); result.put("count", list.get(i).get("count"));
result.put("name", list.get(i).get("companyName")); result.put("name", list.get(i).get("companyName"));
resultList.add(result); resultList.add(result);
...@@ -876,13 +882,13 @@ public class JGDPStatisticsServiceImpl { ...@@ -876,13 +882,13 @@ public class JGDPStatisticsServiceImpl {
public Map<String, Object> maintenanceCount(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> maintenanceCount(DPFilterParamDto dpFilterParamDto) {
List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto); List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto);
List<Integer> regionCodeList = regionModels.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModels.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
Map<Integer,RegionModel> regionMap = regionModels.stream().collect(Collectors.toMap(RegionModel::getRegionCode, Function.identity())); Map<Integer, RegionModel> regionMap = regionModels.stream().collect(Collectors.toMap(RegionModel::getRegionCode, Function.identity()));
List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCount(dpFilterParamDto,regionCodeList); List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCount(dpFilterParamDto, regionCodeList);
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List xList = new ArrayList(); List xList = new ArrayList();
List yList = new ArrayList(); List yList = new ArrayList();
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
xList.add(regionMap.get(Integer.valueOf(list.get(i).get("companyCode")+"")).getRegionName()); xList.add(regionMap.get(Integer.valueOf(list.get(i).get("companyCode") + "")).getRegionName());
yList.add(list.get(i).get("count")); yList.add(list.get(i).get("count"));
} }
resultMap.put("xdata", xList); resultMap.put("xdata", xList);
...@@ -913,31 +919,31 @@ public class JGDPStatisticsServiceImpl { ...@@ -913,31 +919,31 @@ public class JGDPStatisticsServiceImpl {
private Map<String, Object> cancelCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) { private Map<String, Object> cancelCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) {
Map<String,Integer> countMap = new HashMap<>(); Map<String, Integer> countMap = new HashMap<>();
List<Object> xDataList = new ArrayList<>(); List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>(); List<Object> yDataList = new ArrayList<>();
List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList); List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList);
Map<String, String> companyMap = new HashMap<>(); Map<String, String> companyMap = new HashMap<>();
List<String> orgCodes = new ArrayList<>(); List<String> orgCodes = new ArrayList<>();
orgCodeByCompanyCodes.stream().forEach(t->{ orgCodeByCompanyCodes.stream().forEach(t -> {
companyMap.put(t.get("companyCode")+"",t.get("orgCode")); companyMap.put(t.get("companyCode") + "", t.get("orgCode"));
if(StringUtils.isNotBlank(t.get("orgCode"))) { if (StringUtils.isNotBlank(t.get("orgCode"))) {
orgCodes.add(t.get("orgCode")); orgCodes.add(t.get("orgCode"));
} }
}); });
//注销报废 //注销报废
List<Map<String,Object>> cancelCoountList = dpStatisticsMapper.cancelCountByOrgCodes(orgCodes); List<Map<String, Object>> cancelCoountList = dpStatisticsMapper.cancelCountByOrgCodes(orgCodes);
countByMap(countMap,cancelCoountList); countByMap(countMap, cancelCoountList);
for(int i = 0; i < regionModelList.size(); i++){ for (int i = 0; i < regionModelList.size(); i++) {
AtomicInteger count = new AtomicInteger(); AtomicInteger count = new AtomicInteger();
xDataList.add(regionModelList.get(i).getRegionName()); xDataList.add(regionModelList.get(i).getRegionName());
if(StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode()+""))){ if (StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode() + ""))) {
int finalI = i; int finalI = i;
countMap.forEach((k, v)->{ countMap.forEach((k, v) -> {
if(k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode()+""))){ if (k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode() + ""))) {
if(null != v){ if (null != v) {
count.addAndGet(v); count.addAndGet(v);
} }
} }
...@@ -953,31 +959,31 @@ public class JGDPStatisticsServiceImpl { ...@@ -953,31 +959,31 @@ public class JGDPStatisticsServiceImpl {
private Map<String, Object> disableCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) { private Map<String, Object> disableCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) {
Map<String,Integer> countMap = new HashMap<>(); Map<String, Integer> countMap = new HashMap<>();
List<Object> xDataList = new ArrayList<>(); List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>(); List<Object> yDataList = new ArrayList<>();
List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList); List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList);
Map<String, String> companyMap = new HashMap<>(); Map<String, String> companyMap = new HashMap<>();
List<String> orgCodes = new ArrayList<>(); List<String> orgCodes = new ArrayList<>();
orgCodeByCompanyCodes.stream().forEach(t->{ orgCodeByCompanyCodes.stream().forEach(t -> {
companyMap.put(t.get("companyCode")+"",t.get("orgCode")); companyMap.put(t.get("companyCode") + "", t.get("orgCode"));
if(StringUtils.isNotBlank(t.get("orgCode"))) { if (StringUtils.isNotBlank(t.get("orgCode"))) {
orgCodes.add(t.get("orgCode")); orgCodes.add(t.get("orgCode"));
} }
}); });
//启用停用 //启用停用
List<Map<String,Object>> disableCountList = dpStatisticsMapper.disableCountByOrgCodes(orgCodes); List<Map<String, Object>> disableCountList = dpStatisticsMapper.disableCountByOrgCodes(orgCodes);
countByMap(countMap,disableCountList); countByMap(countMap, disableCountList);
for(int i = 0; i < regionModelList.size(); i++){ for (int i = 0; i < regionModelList.size(); i++) {
AtomicInteger count = new AtomicInteger(); AtomicInteger count = new AtomicInteger();
xDataList.add(regionModelList.get(i).getRegionName()); xDataList.add(regionModelList.get(i).getRegionName());
if(StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode()+""))){ if (StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode() + ""))) {
int finalI = i; int finalI = i;
countMap.forEach((k, v)->{ countMap.forEach((k, v) -> {
if(k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode()+""))){ if (k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode() + ""))) {
if(null != v){ if (null != v) {
count.addAndGet(v); count.addAndGet(v);
} }
} }
...@@ -993,44 +999,44 @@ public class JGDPStatisticsServiceImpl { ...@@ -993,44 +999,44 @@ public class JGDPStatisticsServiceImpl {
private Map<String, Object> changeCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) { private Map<String, Object> changeCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) {
Map<String,Integer> countMap = new HashMap<>(); Map<String, Integer> countMap = new HashMap<>();
List<Object> xDataList = new ArrayList<>(); List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>(); List<Object> yDataList = new ArrayList<>();
List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList); List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList);
Map<String, String> companyMap = new HashMap<>(); Map<String, String> companyMap = new HashMap<>();
List<String> orgCodes = new ArrayList<>(); List<String> orgCodes = new ArrayList<>();
orgCodeByCompanyCodes.stream().forEach(t->{ orgCodeByCompanyCodes.stream().forEach(t -> {
companyMap.put(t.get("companyCode")+"",t.get("orgCode")); companyMap.put(t.get("companyCode") + "", t.get("orgCode"));
if(StringUtils.isNotBlank(t.get("orgCode"))) { if (StringUtils.isNotBlank(t.get("orgCode"))) {
orgCodes.add(t.get("orgCode")); orgCodes.add(t.get("orgCode"));
} }
}); });
//更名变更登记 //更名变更登记
List<Map<String,Object>> changeNameList = dpStatisticsMapper.changeNameCountByOrgCodes(orgCodes); List<Map<String, Object>> changeNameList = dpStatisticsMapper.changeNameCountByOrgCodes(orgCodes);
countByMap(countMap,changeNameList); countByMap(countMap, changeNameList);
//改造变更登记 //改造变更登记
List<Map<String,Object>> reformList = dpStatisticsMapper.changeReformCountByOrgCodes(orgCodes); List<Map<String, Object>> reformList = dpStatisticsMapper.changeReformCountByOrgCodes(orgCodes);
countByMap(countMap,reformList); countByMap(countMap, reformList);
//移装变更登记 //移装变更登记
List<Map<String,Object>> transferList = dpStatisticsMapper.changeTransferCountByOrgCodes(orgCodes); List<Map<String, Object>> transferList = dpStatisticsMapper.changeTransferCountByOrgCodes(orgCodes);
countByMap(countMap,transferList); countByMap(countMap, transferList);
//单位变更登记 //单位变更登记
List<Map<String,Object>> unitList = dpStatisticsMapper.changeUnitCountByOrgCodes(orgCodes); List<Map<String, Object>> unitList = dpStatisticsMapper.changeUnitCountByOrgCodes(orgCodes);
countByMap(countMap,unitList); countByMap(countMap, unitList);
//单位变更登记 //单位变更登记
List<Map<String,Object>> vehicleList = dpStatisticsMapper.changeVehicleCountByOrgCodes(orgCodes); List<Map<String, Object>> vehicleList = dpStatisticsMapper.changeVehicleCountByOrgCodes(orgCodes);
countByMap(countMap,vehicleList); countByMap(countMap, vehicleList);
for(int i = 0; i < regionModelList.size(); i++){ for (int i = 0; i < regionModelList.size(); i++) {
AtomicInteger count = new AtomicInteger(); AtomicInteger count = new AtomicInteger();
xDataList.add(regionModelList.get(i).getRegionName()); xDataList.add(regionModelList.get(i).getRegionName());
if(StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode()+""))){ if (StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode() + ""))) {
int finalI = i; int finalI = i;
countMap.forEach((k, v)->{ countMap.forEach((k, v) -> {
if(k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode()+""))){ if (k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode() + ""))) {
if(null != v){ if (null != v) {
count.addAndGet(v); count.addAndGet(v);
} }
} }
...@@ -1047,33 +1053,33 @@ public class JGDPStatisticsServiceImpl { ...@@ -1047,33 +1053,33 @@ public class JGDPStatisticsServiceImpl {
private Map<String, Object> useCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) { private Map<String, Object> useCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) {
Map<String,Integer> countMap = new HashMap<>(); Map<String, Integer> countMap = new HashMap<>();
List<Object> xDataList = new ArrayList<>(); List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>(); List<Object> yDataList = new ArrayList<>();
List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList); List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList);
Map<String, String> companyMap = new HashMap<>(); Map<String, String> companyMap = new HashMap<>();
List<String> orgCodes = new ArrayList<>(); List<String> orgCodes = new ArrayList<>();
orgCodeByCompanyCodes.stream().forEach(t->{ orgCodeByCompanyCodes.stream().forEach(t -> {
companyMap.put(t.get("companyCode")+"",t.get("orgCode")); companyMap.put(t.get("companyCode") + "", t.get("orgCode"));
if(StringUtils.isNotBlank(t.get("orgCode"))) { if (StringUtils.isNotBlank(t.get("orgCode"))) {
orgCodes.add(t.get("orgCode")); orgCodes.add(t.get("orgCode"));
} }
}); });
//使用告知 //使用告知
List<Map<String,Object>> useCountList = dpStatisticsMapper.useCountByOrgCodes(orgCodes); List<Map<String, Object>> useCountList = dpStatisticsMapper.useCountByOrgCodes(orgCodes);
countByMap(countMap,useCountList); countByMap(countMap, useCountList);
//车用气瓶使用告知 //车用气瓶使用告知
List<Map<String, Object>> vehicleCountList = dpStatisticsMapper.vehicleCountByOrgCodes(orgCodes); List<Map<String, Object>> vehicleCountList = dpStatisticsMapper.vehicleCountByOrgCodes(orgCodes);
countByMap(countMap,vehicleCountList); countByMap(countMap, vehicleCountList);
for(int i = 0; i < regionModelList.size(); i++){ for (int i = 0; i < regionModelList.size(); i++) {
AtomicInteger count = new AtomicInteger(); AtomicInteger count = new AtomicInteger();
xDataList.add(regionModelList.get(i).getRegionName()); xDataList.add(regionModelList.get(i).getRegionName());
if(StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode()+""))){ if (StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode() + ""))) {
int finalI = i; int finalI = i;
countMap.forEach((k, v)->{ countMap.forEach((k, v) -> {
if(k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode()+""))){ if (k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode() + ""))) {
if(null != v){ if (null != v) {
count.addAndGet(v); count.addAndGet(v);
} }
} }
...@@ -1089,39 +1095,39 @@ public class JGDPStatisticsServiceImpl { ...@@ -1089,39 +1095,39 @@ public class JGDPStatisticsServiceImpl {
} }
private Map<String, Object> noticeCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) { private Map<String, Object> noticeCount(Map<String, Object> resultMap, List<RegionModel> regionModelList) {
Map<String,Integer> countMap = new HashMap<>(); Map<String, Integer> countMap = new HashMap<>();
List<Object> xDataList = new ArrayList<>(); List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>(); List<Object> yDataList = new ArrayList<>();
List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList()); List<Integer> regionCodeList = regionModelList.stream().map(m -> m.getRegionCode()).collect(Collectors.toList());
List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList); List<Map<String, String>> orgCodeByCompanyCodes = commonMapper.getOrgCodesByCompanyCodes(regionCodeList);
Map<String, String> companyMap = new HashMap<>(); Map<String, String> companyMap = new HashMap<>();
List<String> orgCodes = new ArrayList<>(); List<String> orgCodes = new ArrayList<>();
orgCodeByCompanyCodes.stream().forEach(t->{ orgCodeByCompanyCodes.stream().forEach(t -> {
companyMap.put(t.get("companyCode")+"",t.get("orgCode")); companyMap.put(t.get("companyCode") + "", t.get("orgCode"));
if(StringUtils.isNotBlank(t.get("orgCode"))) { if (StringUtils.isNotBlank(t.get("orgCode"))) {
orgCodes.add(t.get("orgCode")); orgCodes.add(t.get("orgCode"));
} }
}); });
//安装告知 //安装告知
List<Map<String,Object>> installCountList = dpStatisticsMapper.installCountByOrgCodes(orgCodes); List<Map<String, Object>> installCountList = dpStatisticsMapper.installCountByOrgCodes(orgCodes);
countByMap(countMap,installCountList); countByMap(countMap, installCountList);
//维修告知 //维修告知
List<Map<String, Object>> maintenanceCountList = dpStatisticsMapper.maintenanceNoticeCountByOrgCodes(orgCodes); List<Map<String, Object>> maintenanceCountList = dpStatisticsMapper.maintenanceNoticeCountByOrgCodes(orgCodes);
countByMap(countMap,maintenanceCountList); countByMap(countMap, maintenanceCountList);
//改造告知 //改造告知
List<Map<String, Object>> reformCountList = dpStatisticsMapper.reformCountByOrgCodes(orgCodes); List<Map<String, Object>> reformCountList = dpStatisticsMapper.reformCountByOrgCodes(orgCodes);
countByMap(countMap,reformCountList); countByMap(countMap, reformCountList);
//移装告知 //移装告知
List<Map<String, Object>> transferCountList = dpStatisticsMapper.transferCountByOrgCodes(orgCodes); List<Map<String, Object>> transferCountList = dpStatisticsMapper.transferCountByOrgCodes(orgCodes);
countByMap(countMap,transferCountList); countByMap(countMap, transferCountList);
for(int i = 0; i < regionModelList.size(); i++){ for (int i = 0; i < regionModelList.size(); i++) {
AtomicInteger count = new AtomicInteger(); AtomicInteger count = new AtomicInteger();
xDataList.add(regionModelList.get(i).getRegionName()); xDataList.add(regionModelList.get(i).getRegionName());
if(StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode()+""))){ if (StringUtils.isNotEmpty(companyMap.get(regionModelList.get(i).getRegionCode() + ""))) {
int finalI = i; int finalI = i;
countMap.forEach((k, v)->{ countMap.forEach((k, v) -> {
if(k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode()+""))){ if (k.startsWith(companyMap.get(regionModelList.get(finalI).getRegionCode() + ""))) {
if(null != v){ if (null != v) {
count.addAndGet(v); count.addAndGet(v);
} }
} }
...@@ -1138,9 +1144,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -1138,9 +1144,9 @@ public class JGDPStatisticsServiceImpl {
private void countByMap(Map<String, Integer> countMap, List<Map<String, Object>> list) { private void countByMap(Map<String, Integer> countMap, List<Map<String, Object>> list) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
if (null == countMap.get(list.get(i).get("orgCode"))) { if (null == countMap.get(list.get(i).get("orgCode"))) {
countMap.put(list.get(i).get("orgCode").toString(), Integer.valueOf(list.get(i).get("count")+"")); countMap.put(list.get(i).get("orgCode").toString(), Integer.valueOf(list.get(i).get("count") + ""));
} else { } else {
countMap.put(list.get(i).get("orgCode").toString(), countMap.get(list.get(i).get("orgCode")) + Integer.valueOf(list.get(i).get("count")+"")); countMap.put(list.get(i).get("orgCode").toString(), countMap.get(list.get(i).get("orgCode")) + Integer.valueOf(list.get(i).get("count") + ""));
} }
} }
} }
......
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