| 
						
						
							
								
							
						
						
					 | 
					@ -9,9 +9,11 @@ import com.epmet.commons.tools.utils.DateUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.dto.epmetuser.result.StaffPatrolRecordDailyResultDTO; | 
					 | 
					 | 
					import com.epmet.dataaggre.dto.epmetuser.result.StaffPatrolRecordDailyResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; | 
					 | 
					 | 
					import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; | 
					 | 
					 | 
					import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; | 
					 | 
					 | 
					import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.service.AggreGridService; | 
					 | 
					 | 
					import com.epmet.dataaggre.service.AggreGridService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.service.datastats.DataStatsService; | 
					 | 
					 | 
					import com.epmet.dataaggre.service.datastats.DataStatsService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dataaggre.service.epmetuser.EpmetUserService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService; | 
					 | 
					 | 
					import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dataaggre.service.govorg.GovOrgService; | 
					 | 
					 | 
					import com.epmet.dataaggre.service.govorg.GovOrgService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.github.pagehelper.PageInfo; | 
					 | 
					 | 
					import com.github.pagehelper.PageInfo; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -20,6 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.*; | 
					 | 
					 | 
					import java.util.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.util.function.Function; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.util.stream.Collectors; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					@Service | 
					 | 
					 | 
					@Service | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					public class AggreGridServiceImpl implements AggreGridService { | 
					 | 
					 | 
					public class AggreGridServiceImpl implements AggreGridService { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -33,6 +37,9 @@ public class AggreGridServiceImpl implements AggreGridService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private StatsStaffPatrolRecordDailyService statsStaffPatrolRecordDailyService; | 
					 | 
					 | 
					    private StatsStaffPatrolRecordDailyService statsStaffPatrolRecordDailyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private EpmetUserService epmetUserService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public List<GridMemberDataAnalysisResultDTO> getGridMemberDataAnalysis( | 
					 | 
					 | 
					    public List<GridMemberDataAnalysisResultDTO> getGridMemberDataAnalysis( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<String> gridIds, | 
					 | 
					 | 
					            List<String> gridIds, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -100,6 +107,19 @@ public class AggreGridServiceImpl implements AggreGridService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<List<String>> userIdsParts = Lists.partition(userIds, partSize); | 
					 | 
					 | 
					        List<List<String>> userIdsParts = Lists.partition(userIds, partSize); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        for (List<String> userIdsPart : userIdsParts) { | 
					 | 
					 | 
					        for (List<String> userIdsPart : userIdsParts) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            // 批量查询出用户信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            List<CustomerStaffEntity> staffInfos = epmetUserService.listStaffsByIds(userIdsPart); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            //Map<String, CustomerStaffEntity> staffIdAndStaffInfo = staffInfos.stream().collect(Collectors.toMap((s) -> s.getUserId(), Function.identity()));
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            for (CustomerStaffEntity staffInfo : staffInfos) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                Map<String, GridMemberDataAnalysisResultDTO> gridAndData = structedData.get(staffInfo.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                if (gridAndData != null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    gridAndData.forEach((k, v) -> v.setMobile(staffInfo.getMobile())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            // 批量查询出巡查信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<StaffPatrolRecordDailyResultDTO> patrolDatas = statsStaffPatrolRecordDailyService.listStaffPatrolRecordDailyAnalysis(pids, userIdsPart, startDateID, endDateID); | 
					 | 
					 | 
					            List<StaffPatrolRecordDailyResultDTO> patrolDatas = statsStaffPatrolRecordDailyService.listStaffPatrolRecordDailyAnalysis(pids, userIdsPart, startDateID, endDateID); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            for (StaffPatrolRecordDailyResultDTO d : patrolDatas) { | 
					 | 
					 | 
					            for (StaffPatrolRecordDailyResultDTO d : patrolDatas) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                Map<String, GridMemberDataAnalysisResultDTO> gridAndData = structedData.get(d.getStaffId()); | 
					 | 
					 | 
					                Map<String, GridMemberDataAnalysisResultDTO> gridAndData = structedData.get(d.getStaffId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |