| 
						
						
						
					 | 
				
				 | 
				
					@ -1,5 +1,6 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					package com.epmet.opendata.service.impl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import cn.hutool.core.collection.CollUtil; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.alibaba.fastjson.JSONObject; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -7,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.dto.result.OptionResultDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.enums.OrgTypeEnum; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -15,6 +17,7 @@ import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.HttpClientManager; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.CustomerGridDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.form.GridOptionFormDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.result.CustomerStaffGridResultDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.GovOrgOpenFeignClient; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -118,12 +121,14 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String agencyId = staffInfo.getAgencyId(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 根据组织id获取gridId网格id
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<CustomerStaffGridResultDTO>> staffGridList = govOrgOpenFeignClient.getStaffGridList(dto.getCustomerId(), agencyId, OrgTypeEnum.AGENCY.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        GridOptionFormDTO gridOptionFormDTO = new GridOptionFormDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridOptionFormDTO.setAgencyId(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridOptionFormDTO.setPurpose("query"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<OptionResultDTO>> gridOption = govOrgOpenFeignClient.getGridOption(gridOptionFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> gridList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridList.add(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        staffGridList.getData().forEach(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            gridList.add(item.getGridId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.packGirdArray(gridOption.getData(), gridList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PageHelper.startPage(dto.getPage(), dto.getLimit()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<CaRotatorsResultDTO> result = baseDao.getPage(dto.getRotatorsName(), | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -135,6 +140,15 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new PageData<>(result, info.getTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private void packGirdArray(List<OptionResultDTO> options, List<String> gridList) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollUtil.isNotEmpty(options)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            for (OptionResultDTO option : options) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                gridList.add(option.getValue()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                packGirdArray(option.getChildren(), gridList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * 流动人口调用ruoyi接口存储数据 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |