| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -94,12 +94,13 @@ public class TopicServiceImpl implements TopicService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<TopicSubGridResultDTO> topicSubGrid(TokenDto tokenDto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String agencyId = this.getLoginUserDetails(tokenDto); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String customerId = tokenDto.getCustomerId(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<TopicSubGridResultDTO> result = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<TopicSubGridResultDTO> resultAll = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> subGridIdList = topicDao.getSubGridIdList(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (subGridIdList.size() != NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubGridResultDTO> gridAllTopicInfoLastDay = topicDao.getGridAllTopicInfoLastDay(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubGridResultDTO> gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubGridResultDTO> gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            subGridIdList.forEach(gridId -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                gridAllTopicInfoLastDay.forEach(gridTopic -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (gridId.equals(gridTopic.getGridId())){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -135,13 +136,14 @@ public class TopicServiceImpl implements TopicService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public List<TopicSubAgencyResultDTO> topicSubAgency(TokenDto tokenDto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String agencyId = this.getLoginUserDetails(tokenDto); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String customerId = tokenDto.getCustomerId(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<TopicSubAgencyResultDTO> result = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<TopicSubAgencyResultDTO> resultAll = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> subAgencyIdList = topicDao.getSubAgencyIdList(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //存在下级机关
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (subAgencyIdList.size() != NumConstant.ZERO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubAgencyResultDTO> allTopicInfoLastDay = topicDao.getAllTopicInfoLastDay(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubAgencyResultDTO> allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<TopicSubAgencyResultDTO> allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //话题状态为 已关闭、讨论中、已屏蔽
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            subAgencyIdList.forEach(agencyIdOne -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                allTopicInfoLastDay.forEach(agency -> { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |