| 
					
				 | 
			
			
				@ -124,6 +124,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseSleepPlanDetailDao sleepPlanDetailDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseSleepNightRecordDao nightRecordDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PatientSafeAreaDao safeAreaDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private Logger logger = LoggerFactory.getLogger(SecurityMonitoringOrderService.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -254,8 +256,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String , Object>> getElectronicFence(String deviceSn){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select safe_area_gz safeAreaGz from wlyy_patient_device where device_sn = '"+deviceSn+"' and del = 0 order by id desc limit 1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String , Object>> getElectronicFence(String patient){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select safe_area_gz safeAreaGz from wlyy_patient_safe_area where patient = '"+patient+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1402,7 +1404,11 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (!(dulat == 0.0 && dulon == 0.0)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String safeArea = deviceDO.getSafeAreaGz(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<PatientSafeAreaDO> safeAreaDOS = safeAreaDao.findByPatient(deviceDO.getUser()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String safeArea=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (safeAreaDOS.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        safeArea = safeAreaDOS.get(0).getSafeAreaGz(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONArray fenceLocation = new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String address = LatitudeUtils.getLocationAddress(dulat + "", dulon + ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (StringUtils.isNotBlank(safeArea)) { 
			 |