| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -446,4 +446,38 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineW | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public RoutineWorkDetailResultDTO getDetail(GridMemberRoutineWorkFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //1.查询例行工作详情数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        RoutineWorkDetailResultDTO resultDTO = baseDao.getDetail(formDTO.getRoutineWorkId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == resultDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new RoutineWorkDetailResultDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.获取工作人员缓存信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), resultDTO.getStaffId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == staffInfo) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.获取网格缓存信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(resultDTO.getGridId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == gridInfo) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new EpmetException(String.format("未查询到网格{%s}信息", resultDTO.getGridId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isEmpty(gridInfo.getAgencyName())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(gridInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            gridInfo.setAgencyName(agencyInfo.getOrganizationName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //4.获取例行工作类型字典表数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<Map<String, String>> unitTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.PATROL_WORK_TYPE.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!unitTypeMap.success() || MapUtils.isEmpty(unitTypeMap.getData())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取例行工作类型字典表数据失败!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //5.封装数据并返回
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        resultDTO.setGridName(gridInfo.getAgencyName() + "-" + gridInfo.getGridName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        resultDTO.setStaffName(staffInfo.getRealName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        resultDTO.setWorkTypeName(unitTypeMap.getData().get(resultDTO.getAllPCode()) + "-" + unitTypeMap.getData().get(resultDTO.getWorkTypeCode())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return resultDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |