修改统计内容

This commit is contained in:
wenc000 2020-12-25 18:22:05 +08:00
parent 60e84305ef
commit c5c3b10c84

View File

@ -175,6 +175,7 @@ public class CountServiceImpl extends BaseService implements ICountService {
// 地区企业总数
params.put("isLogOff", 0);
params.put("area" + areaLevel, areaDTO.getDictionaryId());
setParentArea(areaDTO.getDictionaryParentId(), areaLevel - 1, params);
params.put("year", year);
Integer enterpriseCount = enterpriseService.countEnterpriseReturnInteger(params);
resultListMap.put("enterpriseCount", enterpriseCount);
@ -792,8 +793,10 @@ public class CountServiceImpl extends BaseService implements ICountService {
private Integer countEnterpriseOfArea(String areaId, Integer areaLevel, String year) {
Map<String, Object> params = getHashMap(6);
params.put("isLogOff", 0);
params.put("area" + areaLevel, areaId);
// params.put("area" + areaLevel, areaId);
setParentArea(areaId, areaLevel, params);
params.put("year", year);
return enterpriseOfGridOperatorService.countEnterpriseOfArea(params);
}
@ -918,4 +921,13 @@ public class CountServiceImpl extends BaseService implements ICountService {
resultListMap.put("rectificationRatio", totalRectificationCount == 0 ? 0 : String.format("%.2f", (double) rectificationCount / (unRectificationCount + rectificationCount) * 100));
}
private void setParentArea(String parentAreaId, int parentAreaLevel, Map<String, Object> params) {
if (parentAreaLevel == 0) {
return;
}
params.put("area" + parentAreaLevel, parentAreaId);
DataDictionaryDTO dataDictionaryDTO = dataDictionaryService.getDictionaryById(parentAreaId);
setParentArea(dataDictionaryDTO.getDictionaryParentId(), parentAreaLevel - 1, params);
}
}