| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -53,8 +53,15 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        NumberFormat numberFormat = NumberFormat.getInstance(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        numberFormat.setMaximumFractionDigits(NumConstant.SIX); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isBlank(formDTO.getDateId())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Date yesterday = DateUtils.addDateDays(new Date(), -1); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setDateId(format.format(yesterday)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //1.查询组织下注册用户最新日统计数据【只查询注册用户的统计数据,不涉及参与用户的】
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO user = dataStatsDao.getAgnecyRegUser(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO user = dataStatsDao.getAgnecyRegUser(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != user) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setUserTotal(user.getUserTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setResiTotal(user.getResiTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -64,7 +71,7 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.查询组织下最新群组日统计数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO group = dataStatsDao.getAgnecyGroup(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO group = dataStatsDao.getAgnecyGroup(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != user) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setGroupTotal(group.getGroupTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setOrdinaryTotal(group.getOrdinaryTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -76,9 +83,9 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.查询组织下最新话题日统计数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //状态话题-机关日统计数据表最新日期三种状态数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //机关日表里三种类型数据之和就是话题总量,讨论中数量与热议中不是一个概念,热议中=总量-关闭数-屏蔽数-转议题数
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<AgencyBasicDataResultDTO.Topic> topic = dataStatsDao.getAgencyTopic(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<AgencyBasicDataResultDTO.Topic> topic = dataStatsDao.getAgencyTopic(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //转议题话题-机关日统计数据表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO.Topic topicSHiftIssue = dataStatsDao.getAgencyTopicShiftIssue(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO.Topic topicSHiftIssue = dataStatsDao.getAgencyTopicShiftIssue(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AtomicReference<Integer> closedTotal = new AtomicReference<>(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AtomicReference<Integer> hiddenTotal = new AtomicReference<>(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (topic.size()>NumConstant.ZERO) { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -98,7 +105,7 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        resultDTO.setClosedTopicRatio(resultDTO.getClosedTopicTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedTopicTotal() / (float) resultDTO.getTopicTotal()))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //4.查询组织下最新议题日统计数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO issue = dataStatsDao.getAgencyIssue(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO issue = dataStatsDao.getAgencyIssue(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != issue) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setIssueTotal(issue.getIssueTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setVotingTotal(issue.getVotingTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -110,7 +117,7 @@ public class DataStatsServiceImpl implements DataStatsService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //5.查询组织下最新项目日统计数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO project = dataStatsDao.getAgencyProject(formDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AgencyBasicDataResultDTO project = dataStatsDao.getAgencyProject(formDTO.getAgencyId(), formDTO.getDateId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != project) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setProjectTotal(project.getProjectTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            resultDTO.setPendingTotal(project.getPendingTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |