|
|
@ -209,7 +209,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
subPartyAvgList.forEach(party -> { |
|
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
|
party.forEach(c -> { |
|
|
|
pid.put(c.getParentId(),customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
if (c.getParentId()!=NumConstant.ZERO_STR) { |
|
|
|
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
} |
|
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
index1SampleValues.add(s); |
|
|
|
}); |
|
|
@ -275,6 +277,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
detailListByParentCode.forEach(detail -> { |
|
|
|
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); |
|
|
|
for (int i = 0; i < districtGovernAvgList.size(); i++) { |
|
|
|
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
|
districtGovernAvgList.remove(districtGovernAvgList.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(districtGovernAvgList)) { |
|
|
|
log.error("查询所有街道治理能力平均值集合为空"); |
|
|
|
} else{ |
|
|
@ -283,7 +290,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
governAvg.forEach(avg -> { |
|
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
|
avg.forEach(c -> { |
|
|
|
pid.put(c.getParentId(),customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
if (c.getParentId()!=NumConstant.ZERO_STR) { |
|
|
|
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
} |
|
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
index1SampleValues.add(s); |
|
|
|
}); |
|
|
@ -294,6 +303,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
} |
|
|
|
} 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()); |
|
|
|
for (int i = 0; i < deptScoreAvgList.size(); i++) { |
|
|
|
if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
|
deptScoreAvgList.remove(deptScoreAvgList.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(deptScoreAvgList)) { |
|
|
|
log.error("查询所有直属部门治理能力平均值集合为空"); |
|
|
|
} else{ |
|
|
@ -343,6 +357,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
String indexCode = detail.getIndexCode(); |
|
|
|
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); |
|
|
|
for (int i = 0; i < subStreetAvgList.size(); i++) { |
|
|
|
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ |
|
|
|
subStreetAvgList.remove(subStreetAvgList.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(subStreetAvgList)) { |
|
|
|
log.error("查询区下属街道服务能力汇总平均值集合为空"); |
|
|
|
} else{ |
|
|
@ -352,7 +371,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); |
|
|
|
List<SampleValue> index1SampleValues = new ArrayList<>(); |
|
|
|
serviceAvg.forEach(c -> { |
|
|
|
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
if (c.getParentId()!=NumConstant.ZERO_STR) { |
|
|
|
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); |
|
|
|
} |
|
|
|
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); |
|
|
|
index1SampleValues.add(s); |
|
|
|
}); |
|
|
|