|
@ -160,7 +160,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
Map<String, BigDecimal> weightMap = new HashMap<>(); |
|
|
Map<String, BigDecimal> weightMap = new HashMap<>(); |
|
|
selfSubIndexList.forEach(o -> { |
|
|
selfSubIndexList.forEach(o -> { |
|
|
//找出自身 和下级的指标
|
|
|
//找出自身 和下级的指标
|
|
|
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) { |
|
|
if (o.getAllIndexCodePath().contains(ProjectConstant.XIA_JI)) { |
|
|
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode()); |
|
|
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode()); |
|
|
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight())); |
|
|
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight())); |
|
|
} else { |
|
|
} else { |
|
@ -217,6 +217,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
@ -225,11 +227,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
//党建能力平均值
|
|
|
//党建能力平均值
|
|
|
indexDetailList.forEach(detail -> { |
|
|
indexDetailList.forEach(detail -> { |
|
|
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); |
|
|
|
|
|
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); |
|
|
subGridPartyAvgScore.forEach(s -> { |
|
|
subGridPartyAvgScore.forEach(s -> { |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount()); |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount()); |
|
|
}); |
|
|
}); |
|
|
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); |
|
|
|
|
|
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { |
|
|
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { |
|
|
log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); |
|
|
log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); |
|
|
} else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { |
|
|
} else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { |
|
@ -238,12 +240,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
subPartyAvgList.forEach(party -> { |
|
|
subPartyAvgList.forEach(party -> { |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
party.forEach(c -> { |
|
|
party.forEach(c -> { |
|
|
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { |
|
|
pid.put(c.getAgencyId(), c.getParentId()); |
|
|
// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
|
|
|
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); |
|
|
pid.put(c.getParentId(), agencyMap.get(c.getParentId())); |
|
|
index1SampleValues.add(s); |
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
|
|
index1SampleValues.add(s); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); |
|
@ -252,7 +251,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// 区名义发文数量
|
|
|
// 区名义发文数量
|
|
|
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); |
|
|
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapNew(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL,quarterId,yearId); |
|
|
log.info("publishArticleCountList:::"+publishArticleCountList.toString()); |
|
|
log.info("publishArticleCountList:::"+publishArticleCountList.toString()); |
|
|
if (CollectionUtils.isEmpty(publishArticleCountList)) { |
|
|
if (CollectionUtils.isEmpty(publishArticleCountList)) { |
|
|
log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); |
|
|
log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); |
|
@ -308,6 +307,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
// key:agencyId,value:sampleCount样本量
|
|
|
// key:agencyId,value:sampleCount样本量
|
|
@ -315,11 +316,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); |
|
|
|
|
|
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); |
|
|
districtGovernAvgList.forEach(s -> { |
|
|
districtGovernAvgList.forEach(s -> { |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount()); |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount()); |
|
|
}); |
|
|
}); |
|
|
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); |
|
|
|
|
|
for (int i = 0; i < districtGovernAvgList.size(); i++) { |
|
|
for (int i = 0; i < districtGovernAvgList.size(); i++) { |
|
|
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
districtGovernAvgList.remove(districtGovernAvgList.get(i)); |
|
|
districtGovernAvgList.remove(districtGovernAvgList.get(i)); |
|
@ -333,12 +334,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
governAvg.forEach(avg -> { |
|
|
governAvg.forEach(avg -> { |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
avg.forEach(c -> { |
|
|
avg.forEach(c -> { |
|
|
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { |
|
|
pid.put(c.getAgencyId(), c.getParentId()); |
|
|
// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
|
|
|
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); |
|
|
pid.put(c.getParentId(), agencyMap.get(c.getParentId())); |
|
|
index1SampleValues.add(s); |
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
|
|
index1SampleValues.add(s); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); |
|
@ -346,7 +344,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ |
|
|
} else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgNew(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); |
|
|
log.info("deptScoreAvgList:::"+deptScoreAvgList.toString()); |
|
|
log.info("deptScoreAvgList:::"+deptScoreAvgList.toString()); |
|
|
for (int i = 0; i < deptScoreAvgList.size(); i++) { |
|
|
for (int i = 0; i < deptScoreAvgList.size(); i++) { |
|
|
if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
@ -401,6 +399,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
// key:agencyId,value:sampleCount样本量
|
|
|
// key:agencyId,value:sampleCount样本量
|
|
@ -409,12 +409,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
String indexCode = detail.getIndexCode(); |
|
|
String indexCode = detail.getIndexCode(); |
|
|
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { |
|
|
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { |
|
|
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); |
|
|
|
|
|
log.info("subStreetAvgList:::"+subStreetAvgList.toString()); |
|
|
subStreetAvgList.forEach(s -> { |
|
|
subStreetAvgList.forEach(s -> { |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount()); |
|
|
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount()); |
|
|
}); |
|
|
}); |
|
|
log.info("subStreetAvgList:::"+subStreetAvgList.toString()); |
|
|
|
|
|
for (int i = 0; i < subStreetAvgList.size(); i++) { |
|
|
for (int i = 0; i < subStreetAvgList.size(); i++) { |
|
|
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
subStreetAvgList.remove(subStreetAvgList.get(i)); |
|
|
subStreetAvgList.remove(subStreetAvgList.get(i)); |
|
@ -429,12 +428,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
serviceAvg.forEach(c -> { |
|
|
serviceAvg.forEach(c -> { |
|
|
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { |
|
|
pid.put(c.getAgencyId(), c.getParentId()); |
|
|
// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
|
|
|
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); |
|
|
pid.put(c.getParentId(), agencyMap.get(c.getParentId())); |
|
|
index1SampleValues.add(s); |
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
|
|
index1SampleValues.add(s); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); |
|
|
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); |
|
|
indexInputVOS.add(index1VO); |
|
|
indexInputVOS.add(index1VO); |
|
@ -643,13 +639,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
//党建能力平均值
|
|
|
//党建能力平均值
|
|
|
indexDetailList.forEach(detail -> { |
|
|
indexDetailList.forEach(detail -> { |
|
|
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); |
|
|
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); |
|
|
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { |
|
|
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { |
|
|
log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); |
|
|
log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); |
|
@ -677,7 +675,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// 区名义发文数量
|
|
|
// 区名义发文数量
|
|
|
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode()); |
|
|
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelfNew(monthId,form.getCustomerAreaCode(),quarterId,yearId); |
|
|
log.info("publishArticleCountList:::"+publishArticleCountList.toString()); |
|
|
log.info("publishArticleCountList:::"+publishArticleCountList.toString()); |
|
|
if (CollectionUtils.isEmpty(publishArticleCountList)) { |
|
|
if (CollectionUtils.isEmpty(publishArticleCountList)) { |
|
|
log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); |
|
|
log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); |
|
@ -729,12 +727,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
// 治理能力平均值
|
|
|
|
|
|
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); |
|
|
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); |
|
|
for (int i = 0; i < districtGovernAvgList.size(); i++) { |
|
|
for (int i = 0; i < districtGovernAvgList.size(); i++) { |
|
|
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
@ -766,7 +767,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ |
|
|
} else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgExistsSubNotSelf(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgExistsSubNotSelfNew(form.getCustomerAreaCode(),monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); |
|
|
log.info("deptScoreAvgList:::"+deptScoreAvgList.toString()); |
|
|
log.info("deptScoreAvgList:::"+deptScoreAvgList.toString()); |
|
|
for (int i = 0; i < deptScoreAvgList.size(); i++) { |
|
|
for (int i = 0; i < deptScoreAvgList.size(); i++) { |
|
|
if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
@ -817,13 +818,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
String quarterId = DateUtils.getQuarterId(monthId); |
|
|
|
|
|
String yearId = DateUtils.getYearId(monthId); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
List<IndexInputVO> indexInputVOS = new ArrayList<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> pid = new HashMap<>(); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
Map<String, String> agencyMap = agencyMap(customerId); |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
detailListByParentCode.forEach(detail -> { |
|
|
String indexCode = detail.getIndexCode(); |
|
|
String indexCode = detail.getIndexCode(); |
|
|
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { |
|
|
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { |
|
|
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
log.info("subStreetAvgList:::"+subStreetAvgList.toString()); |
|
|
log.info("subStreetAvgList:::"+subStreetAvgList.toString()); |
|
|
for (int i = 0; i < subStreetAvgList.size(); i++) { |
|
|
for (int i = 0; i < subStreetAvgList.size(); i++) { |
|
|
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|