|
@ -210,6 +210,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
List<SubAgencyScoreAvgResultDTO> deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); |
|
|
if (CollectionUtils.isEmpty(deptScoreAvgList)) { |
|
|
if (CollectionUtils.isEmpty(deptScoreAvgList)) { |
|
|
log.error("查询所有直属部门治理能力平均值集合为空"); |
|
|
log.error("查询所有直属部门治理能力平均值集合为空"); |
|
|
|
|
|
//return;
|
|
|
} else{ |
|
|
} else{ |
|
|
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); |
|
|
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); |
|
|
List<List<SubAgencyScoreAvgResultDTO>> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); |
|
|
List<List<SubAgencyScoreAvgResultDTO>> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); |
|
@ -280,11 +281,13 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); |
|
|
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); |
|
|
|
|
|
if (!CollectionUtils.isEmpty(indexInputVOS)) { |
|
|
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); |
|
|
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); |
|
|
log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); |
|
|
log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); |
|
|
log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); |
|
|
log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); |
|
|
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); |
|
|
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); |
|
|
insertDetail(result); |
|
|
insertDetail(result); |
|
|
|
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -413,7 +416,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
score.setAllParentIndexCode(allParentIndexCode); |
|
|
score.setAllParentIndexCode(allParentIndexCode); |
|
|
score.setDataType(IndexCalConstant.DISTRICT_LEVEL); |
|
|
score.setDataType(IndexCalConstant.DISTRICT_LEVEL); |
|
|
pid.forEach((agency, parentAgency) -> { |
|
|
pid.forEach((agency, parentAgency) -> { |
|
|
if (k.equals(agency)) { |
|
|
//todo 确认
|
|
|
|
|
|
if (k != null && k.equals(agency)) { |
|
|
score.setParentAgencyId(parentAgency); |
|
|
score.setParentAgencyId(parentAgency); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -431,7 +435,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
s.setAllParentIndexCode(streetScore.getAllParentIndexCode()); |
|
|
s.setAllParentIndexCode(streetScore.getAllParentIndexCode()); |
|
|
s.setDataType(IndexCalConstant.DISTRICT_LEVEL); |
|
|
s.setDataType(IndexCalConstant.DISTRICT_LEVEL); |
|
|
pid.forEach((agency, parentAgency) -> { |
|
|
pid.forEach((agency, parentAgency) -> { |
|
|
if (k.equals(agency)) { |
|
|
//todo 确认
|
|
|
|
|
|
if (k != null && k.equals(agency)) { |
|
|
s.setParentAgencyId(parentAgency); |
|
|
s.setParentAgencyId(parentAgency); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|