|  |  | @ -225,12 +225,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         //下属所有社区的党建能力平均值
 | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreNew(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); | 
			
		
	
		
			
				
					|  |  |  |                 } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { | 
			
		
	
	
		
			
				
					|  |  | @ -251,7 +253,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |                 // 街道名义发文数量
 | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId, IndexCalConstant.STREET_LEVEL); | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapNew(customerId, monthId, IndexCalConstant.STREET_LEVEL,quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(mapList)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |                 } else { | 
			
		
	
	
		
			
				
					|  |  | @ -300,11 +302,13 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreNew(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subGridGovernAvg)){ | 
			
		
	
		
			
				
					|  |  |  |                     log.warn("查询街道下属所有社区治理能力汇总为空"); | 
			
		
	
		
			
				
					|  |  |  |                 }else if (subGridGovernAvg.size() > NumConstant.ZERO) { | 
			
		
	
	
		
			
				
					|  |  | @ -324,7 +328,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |                 // 治理能力的六个五级指标
 | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.STREET_LEVEL); | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(communityGovernAbility)){ | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); | 
			
		
	
		
			
				
					|  |  |  |                 }else{ | 
			
		
	
	
		
			
				
					|  |  | @ -372,12 +376,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             String indexCode = detail.getIndexCode(); | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreNew(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subCommServiceAvg)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn("查询街道下属社区服务能力得分平均值为空"); | 
			
		
	
		
			
				
					|  |  |  |                 } else if (subCommServiceAvg.size() > NumConstant.ZERO) { | 
			
		
	
	
		
			
				
					|  |  | @ -396,7 +402,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |                     }); | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.STREET_LEVEL); | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(communityActivityCountList)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); | 
			
		
	
		
			
				
					|  |  |  |                 }else{ | 
			
		
	
	
		
			
				
					|  |  | @ -610,12 +616,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         //下属所有社区的党建能力平均值
 | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommPartyAvgScore = disposeSubAvg(dispose, form); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); | 
			
		
	
	
		
			
				
					|  |  | @ -638,7 +646,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |                 // 街道名义发文数量
 | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubStreet(monthId,form.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubStreetNew(monthId,form.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(mapList)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |                 } else { | 
			
		
	
	
		
			
				
					|  |  | @ -688,11 +696,13 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subGridGovernAvg = disposeSubAvg(dispose,form); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subGridGovernAvg)){ | 
			
		
	
		
			
				
					|  |  |  |                     log.warn("查询街道下属所有社区治理能力汇总为空"); | 
			
		
	
	
		
			
				
					|  |  | @ -763,12 +773,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |             log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); | 
			
		
	
		
			
				
					|  |  |  |             return true; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(monthId); | 
			
		
	
		
			
				
					|  |  |  |         List<IndexInputVO> indexInputVOS = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, String> pid = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         detailListByParentCode.forEach(detail -> { | 
			
		
	
		
			
				
					|  |  |  |             String indexCode = detail.getIndexCode(); | 
			
		
	
		
			
				
					|  |  |  |             if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |                 List<SubCommunityAvgResultDTO> subCommServiceAvg = disposeSubAvg(dispose,form); | 
			
		
	
		
			
				
					|  |  |  |                 if (CollectionUtils.isEmpty(subCommServiceAvg)) { | 
			
		
	
		
			
				
					|  |  |  |                     log.warn("查询街道下属社区服务能力得分平均值为空"); | 
			
		
	
	
		
			
				
					|  |  | @ -905,9 +917,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     public List<Map<String, Object>> disposeFiveLevel(CalculateCommonFormDTO formDTO){ | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(formDTO.getMonthId()); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelfNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET,quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCunNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(kongCunGovernAbility)){ | 
			
		
	
		
			
				
					|  |  |  |             kongCunGovernAbility.forEach(k -> { | 
			
		
	
		
			
				
					|  |  |  |                 k.put("AGENCY_ID",k.get("PARENT_ID")); | 
			
		
	
	
		
			
				
					|  |  | @ -924,9 +938,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     public List<Map<String, Object>> disposeActivityCount(CalculateCommonFormDTO formDTO){ | 
			
		
	
		
			
				
					|  |  |  |         String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); | 
			
		
	
		
			
				
					|  |  |  |         String yearId = DateUtils.getYearId(formDTO.getMonthId()); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> ActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> ActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |         List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCunNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(kongCunActivityCountList)){ | 
			
		
	
		
			
				
					|  |  |  |             kongCunActivityCountList.forEach(k -> { | 
			
		
	
		
			
				
					|  |  |  |                 k.put("AGENCY_ID",k.get("PARENT_ID")); | 
			
		
	
	
		
			
				
					|  |  | 
 |