|  |  | @ -25,7 +25,6 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.ExceptionUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
	
		
			
				
					|  |  | @ -45,13 +44,11 @@ import com.epmet.dao.StaffRoleDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.NewUserRoleResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.CustomerStaffEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.GovStaffRoleEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.StaffRoleEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.UserEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.AuthFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.GovAccessFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.GovOrgOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.OperCrmOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.CustomerStaffService; | 
			
		
	
	
		
			
				
					|  |  | @ -97,8 +94,6 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, | 
			
		
	
		
			
				
					|  |  |  |     private GovStaffRoleDao govStaffRoleDao; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private OperCrmOpenFeignClient operCrmOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private GovAccessFeignClient govAccessFeignClient; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public PageData<CustomerStaffDTO> page(Map<String, Object> params) { | 
			
		
	
	
		
			
				
					|  |  | @ -288,16 +283,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         })); | 
			
		
	
		
			
				
					|  |  |  |         resultDTO.setRoleList(staffRoleList); | 
			
		
	
		
			
				
					|  |  |  |         // 获取新角色
 | 
			
		
	
		
			
				
					|  |  |  |         GetStaffExistRoleFormDTO getStaffExistRoleFormDTO = ConvertUtils.sourceToTarget(fromDTO, GetStaffExistRoleFormDTO.class); | 
			
		
	
		
			
				
					|  |  |  |         Result<List<NewUserRoleResultDTO>> staffExistRole = govAccessFeignClient.getStaffExistRole(getStaffExistRoleFormDTO); | 
			
		
	
		
			
				
					|  |  |  |         if (!staffExistRole.success()){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("getStaffExistRole method is failure"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(staffExistRole.getData())){ | 
			
		
	
		
			
				
					|  |  |  |             List<StaffRoleResultDTO> staffRoleResultDTOS = ConvertUtils.sourceToTarget(staffExistRole.getData(), StaffRoleResultDTO.class); | 
			
		
	
		
			
				
					|  |  |  |             resultDTO.setNewRoleList(staffRoleResultDTOS); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         return new Result<StaffInitResultDTO>().ok(resultDTO); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -846,11 +832,13 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //2.查询工作人员中拥有网格长网格员角色的人员列表
 | 
			
		
	
		
			
				
					|  |  |  |         List<GridMobileListResultDTO.Role> staffRoleList = staffRoleDao.staffRoleList(gridStaffs.getData()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if(CollectionUtils.isEmpty(staffRoleList)){ | 
			
		
	
		
			
				
					|  |  |  |             return resultList; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //3.查询工作人员基础信息
 | 
			
		
	
		
			
				
					|  |  |  |         List<String> staffIdList = staffRoleList.stream().map(GridMobileListResultDTO.Role::getStaffId).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |         staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |         List<StaffListResultDTO> list = baseDao.selectStaffByIds(staffIdList, Constant.ENABLE); | 
			
		
	
		
			
				
					|  |  |  |         List<StaffListResultDTO> list = CollectionUtils.isEmpty(staffIdList) ? new ArrayList<>() : baseDao.selectStaffByIds(staffIdList, Constant.ENABLE); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //4.封装数据并返回
 | 
			
		
	
		
			
				
					|  |  |  |         resultList = ConvertUtils.sourceToTarget(list, GridMobileListResultDTO.class); | 
			
		
	
	
		
			
				
					|  |  | 
 |