| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -6,12 +6,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					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.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					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.feign.EpmetUserOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.GovOrgOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.opendata.dao.CaRotatorsDao; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.opendata.dto.ca.CaRotatorsDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.opendata.dto.constant.CaWghDataConstant; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -31,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.ArrayList; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.Arrays; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.List; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.Map; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -50,6 +55,9 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private EpmetUserOpenFeignClient openFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private GovOrgOpenFeignClient govOrgOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<CaRotatorsDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        IPage<CaRotatorsEntity> page = baseDao.selectPage( | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -104,11 +112,23 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<CaRotatorsResultDTO> getPage(CaRotatorsFormDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 获取组织id
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String agencyId = staffInfo.getAgencyId(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 根据组织id获取gridId网格id
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<CustomerGridDTO>> gridIListByAgency = govOrgOpenFeignClient.getGridIListByAgency(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> gridList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridList.add(agencyId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridIListByAgency.getData().forEach(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            gridList.add(item.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PageHelper.startPage(dto.getPage(), dto.getLimit()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<CaRotatorsResultDTO> result = baseDao.getPage(dto.getRotatorsName(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.getIdCard(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.getTelephone(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.getGridId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.getGridId(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                gridList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PageInfo<CaRotatorsResultDTO> info = new PageInfo<>(result); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new PageData<>(result, info.getTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |