|
|
@ -104,7 +104,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
//党建能力平均值
|
|
|
|
indexDetailList.forEach(detail -> { |
|
|
|
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { |
|
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); |
|
|
|
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
|
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { |
|
|
|
log.error(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); |
|
|
|
return; |
|
|
@ -184,7 +184,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
Map<String,String> pid = new HashMap<>(); |
|
|
|
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()); |
|
|
|
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
|
if (districtGovernAvgList.size() == NumConstant.ONE) { |
|
|
|
pid.put(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),districtGovernAvgList.get(NumConstant.ZERO).getParentId()); |
|
|
|
sizeOne(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); |
|
|
@ -254,7 +254,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
detailListByParentCode.forEach(detail -> { |
|
|
|
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()); |
|
|
|
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); |
|
|
|
if (subStreetAvgList.size() == NumConstant.ONE) { |
|
|
|
pid.put(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),subStreetAvgList.get(NumConstant.ZERO).getParentId()); |
|
|
|
sizeOne(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); |
|
|
@ -312,6 +312,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
score.setMonthId(monthId); |
|
|
|
score.setYearId(DateUtils.getYearId(monthId)); |
|
|
|
score.setQuarterId(DateUtils.getQuarterId(monthId)); |
|
|
|
score.setDataType(IndexCalConstant.DISTRICT_LEVEL); |
|
|
|
score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); |
|
|
|
value.forEach(community -> { |
|
|
|
score.setScore(score.getScore().add(community.getScore())); |
|
|
@ -351,7 +352,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict |
|
|
|
public void deleteAndInsert(String customerId, String monthId, String indexCode, List<AgencyScoreDTO> subAllDistrict) { |
|
|
|
if (!CollectionUtils.isEmpty(subAllDistrict)) { |
|
|
|
agencyScoreDao.deleteOldRecord(customerId, monthId, indexCode,IndexCalConstant.DISTRICT_LEVEL); |
|
|
|
System.err.println(subAllDistrict.size()); |
|
|
|
agencyScoreDao.insertStreetRecord(subAllDistrict); |
|
|
|
} |
|
|
|
} |
|
|
|