| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -18,7 +18,7 @@ import com.epmet.service.stats.user.FactRegUserGridMonthlyService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.util.CollectionUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.apache.commons.collections4.CollectionUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.math.BigDecimal; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.math.RoundingMode; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -73,35 +73,35 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//小组数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> groupList = factOriginGroupMainDailyService.getGridGroupCount(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> groupList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setGroupTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//话题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> topicList = factOriginTopicMainDailyService.getGridTopicCount(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> topicList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setTopicTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//议题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> issueList = factOriginIssueMainDailyService.getGridIssueCount(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> issueList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setIssueTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getGridProjectCount(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setProjectTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//结案率 结案数/项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactIndexGovrnAblityGridMonthlyEntity> abilityList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> abilityList.stream().filter(item -> item.getGridId().equals(entity.getOrgId())).forEach(dto -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (dto.getProjectTotal() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										BigDecimal total = new BigDecimal(dto.getProjectTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -113,7 +113,7 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//满意率 满意和非常满意占比
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> satisfactionList =  factOriginProjectLogDailyService.getGridSatisfaction(customerId, monthId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> satisfactionList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (dto.getSum() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										BigDecimal sum = new BigDecimal(dto.getSum()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -138,49 +138,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//党员数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactRegUserAgencyMonthlyDTO> partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setPartyTotal(dto.getPartymemberTotal()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//小组数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setGroupTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//话题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setTopicTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//议题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setIssueTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setProjectTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//结案率 结案数/项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setCloseProjectRatio(dto.getClosedProjectRatio()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//满意率 满意和非常满意占比
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> satisfactionList =  factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (dto.getSum() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										BigDecimal sum = new BigDecimal(dto.getSum()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -205,49 +205,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//党员数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactRegUserAgencyMonthlyDTO> partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setPartyTotal(dto.getPartymemberTotal()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//小组数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setGroupTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//话题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setTopicTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//议题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setIssueTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setProjectTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//结案率 结案数/项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setCloseProjectRatio(dto.getClosedProjectRatio()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//满意率 满意和非常满意占比
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> satisfactionList =  factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (dto.getSum() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										BigDecimal sum = new BigDecimal(dto.getSum()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -272,49 +272,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//党员数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactRegUserAgencyMonthlyDTO> partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									OrgTypeConstant.COMMUNITY); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(partyMemberList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setPartyTotal(dto.getPartymemberTotal()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//小组数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.DISTRICT); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(groupList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setGroupTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//话题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.DISTRICT); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(topicList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setTopicTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//议题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.DISTRICT); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(issueList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setIssueTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(projectList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> projectList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setProjectTotal(dto.getCount()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//结案率 结案数/项目数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.DISTRICT); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(abilityList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									entity.setCloseProjectRatio(dto.getClosedProjectRatio()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//满意率 满意和非常满意占比
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							List<OrgStatisticsResultDTO> satisfactionList =  factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!CollectionUtils.isEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (CollectionUtils.isNotEmpty(satisfactionList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (dto.getSum() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										BigDecimal sum = new BigDecimal(dto.getSum()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |