| 
						
						
							
								
							
						
						
					 | 
					@ -4,11 +4,13 @@ import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.StrConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.IndexCalConstant; | 
					 | 
					 | 
					import com.epmet.constant.IndexCalConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; | 
					 | 
					 | 
					import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService; | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService; | 
					 | 
					 | 
					import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.util.CollectionUtils; | 
					 | 
					 | 
					import org.springframework.util.CollectionUtils; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -24,6 +26,7 @@ import java.util.List; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * @author yinzuomei@elink-cn.com | 
					 | 
					 | 
					 * @author yinzuomei@elink-cn.com | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * @date 2020/9/22 11:25 | 
					 | 
					 | 
					 * @date 2020/9/22 11:25 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 */ | 
					 | 
					 | 
					 */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					@Slf4j | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					@Service | 
					 | 
					 | 
					@Service | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					public class PioneerDataExtractServiceImpl implements PioneerDataExtractService { | 
					 | 
					 | 
					public class PioneerDataExtractServiceImpl implements PioneerDataExtractService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -35,6 +38,9 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private FactOriginIssueMainDailyService factOriginIssueMainDailyService; | 
					 | 
					 | 
					    private FactOriginIssueMainDailyService factOriginIssueMainDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private FactOriginProjectMainDailyService factOriginProjectMainDailyService; | 
					 | 
					 | 
					    private FactOriginProjectMainDailyService factOriginProjectMainDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private FactOriginIssueLogDailyService factOriginIssueLogDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @param customerId | 
					 | 
					 | 
					     * @param customerId | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -54,11 +60,15 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        gridList.forEach(entity -> { | 
					 | 
					 | 
					        gridList.forEach(entity -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String gridId = entity.getOrgId(); | 
					 | 
					 | 
					            String gridId = entity.getOrgId(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            //1、党员参与议事 todo
 | 
					 | 
					 | 
					            //1、党员参与议事
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            entity.setIssueTotal(NumConstant.ZERO); | 
					 | 
					 | 
					            entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            //2、党员参与议事占比 todo
 | 
					 | 
					 | 
					            if(entity.getIssueTotal()==0){ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                entity.setIssueRatio(BigDecimal.ZERO); | 
					 | 
					 | 
					                entity.setIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					            }else{ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                //2、党员参与议事占比
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //3、党员发布话题:
 | 
					 | 
					 | 
					            //3、党员发布话题:
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setTopicTotal(getTopicTotal(customerId, gridId, null)); | 
					 | 
					 | 
					            entity.setTopicTotal(getTopicTotal(customerId, gridId, null)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -86,6 +96,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null)); | 
					 | 
					 | 
					                entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //8、议题转项目占比 : 占网格内议题总数的比率
 | 
					 | 
					 | 
					                //8、议题转项目占比 : 占网格内议题总数的比率
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//                log.info("当前网格内所有议题总数="+gridIssueTotal);
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -102,6 +118,25 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        screenPioneerDataService.delAndSavePioneerData(customerId, "grid", IndexCalConstant.DELETE_SIZE, gridList); | 
					 | 
					 | 
					        screenPioneerDataService.delAndSavePioneerData(customerId, "grid", IndexCalConstant.DELETE_SIZE, gridList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return int | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param customerId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param gridId 网格id | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param communityId  社区的id | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param agencyPath  组织的pids包含自己 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param isParty  1党员 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @author yinzuomei | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @description | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Date 2020/9/26 17:41 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private int calPartyPartiIssueTotal(String customerId, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        String gridId, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        String communityId, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        String agencyPath, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        String isParty) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return factOriginIssueLogDailyService.calPartyPartiIssueTotal(customerId,gridId,communityId,agencyPath,isParty); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void extractCommunityPioneerData(String customerId, String dateId) { | 
					 | 
					 | 
					    public void extractCommunityPioneerData(String customerId, String dateId) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //查询客户下所有的社区,初始数据值为0
 | 
					 | 
					 | 
					        //查询客户下所有的社区,初始数据值为0
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -112,11 +147,15 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        communityList.forEach(entity -> { | 
					 | 
					 | 
					        communityList.forEach(entity -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String communityId = entity.getOrgId(); | 
					 | 
					 | 
					            String communityId = entity.getOrgId(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            //1、党员参与议事 todo
 | 
					 | 
					 | 
					            //1、党员参与议事
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            entity.setIssueTotal(NumConstant.ZERO); | 
					 | 
					 | 
					            entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            //2、党员参与议事占比 todo
 | 
					 | 
					 | 
					            if(entity.getIssueTotal()==0){ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                entity.setIssueRatio(BigDecimal.ZERO); | 
					 | 
					 | 
					                entity.setIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					            }else{ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                //2、党员参与议事占比
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //3、党员发布话题:
 | 
					 | 
					 | 
					            //3、党员发布话题:
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setTopicTotal(getTopicTotal(customerId, null, communityId)); | 
					 | 
					 | 
					            entity.setTopicTotal(getTopicTotal(customerId, null, communityId)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -144,6 +183,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId)); | 
					 | 
					 | 
					                entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //8、议题转项目占比 : 占社区内议题总数的比率
 | 
					 | 
					 | 
					                //8、议题转项目占比 : 占社区内议题总数的比率
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//                log.info("当前社区内所有议题总数="+communityIssueTotal);
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -170,17 +215,20 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        agencyList.forEach(entity -> { | 
					 | 
					 | 
					        agencyList.forEach(entity -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
					 | 
					 | 
					            entity.setDataEndTime(dateId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String agencyId = entity.getOrgId(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //1、党员参与议事 todo
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setIssueTotal(NumConstant.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //2、党员参与议事占比 todo
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setIssueRatio(BigDecimal.ZERO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (StringUtils.isEmpty(entity.getPid()) || NumConstant.ZERO_STR.equals(entity.getPid())) { | 
					 | 
					 | 
					            if (StringUtils.isEmpty(entity.getPid()) || NumConstant.ZERO_STR.equals(entity.getPid())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setAgencyPath(entity.getOrgId()); | 
					 | 
					 | 
					                entity.setAgencyPath(entity.getOrgId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } else { | 
					 | 
					 | 
					            } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId())); | 
					 | 
					 | 
					                entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					            //1、党员参与议事
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if(entity.getIssueTotal()==0){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                //2、党员参与议事占比
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //3、党员发布话题:
 | 
					 | 
					 | 
					            //3、党员发布话题:
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); | 
					 | 
					 | 
					            entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -208,6 +256,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath())); | 
					 | 
					 | 
					                entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //8、议题转项目占比 : 占网格内议题总数的比率
 | 
					 | 
					 | 
					                //8、议题转项目占比 : 占网格内议题总数的比率
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
					 | 
					 | 
					                entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//                log.info("当前组织内所有议题总数="+agencyIssueTotal);
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setPublishIssueRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectTotal(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                entity.setShiftProjectRatio(BigDecimal.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |