|  | @ -41,15 +41,16 @@ public class EmeWarnOrderJob implements Job {
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //救助工单<=1小时&&<1未处理
 | 
	
		
			
				|  |  |             String sql = " select '紧急呼叫' as serverDesc,o.org_code orgCode,o.device_sn,o.serve_lat,o.serve_lon,o.id,o.session_id sessionId,o.patient,o.patient_name patientName,o.create_time,20 as type from " +
 | 
	
		
			
				|  |  |                 "base_emergency_assistance_order o where status=1 and (TIMESTAMPDIFF(HOUR,o.create_time,now()) >=1 " +
 | 
	
		
			
				|  |  |             String sql = " select '紧急呼叫' as serverDesc,o.org_code orgCode,o.device_sn,o.serve_lat,o.serve_lon,o.id,o.session_id sessionId,o.patient,o.patient_name patientName,o.create_time,20 as type,p.residential_area residentialArea from " +
 | 
	
		
			
				|  |  |                 "base_emergency_assistance_order o INNER JOIN base_patient p on o.patient = p.id where status=1 and (TIMESTAMPDIFF(HOUR,o.create_time,now()) >=1 " +
 | 
	
		
			
				|  |  |                 "and TIMESTAMPDIFF(HOUR,o.create_time,now()) <24) and not EXISTS ( " +
 | 
	
		
			
				|  |  |                     " select 1 from base_emergency_warn_log log where log.order_id = o.id) ";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             List<Map<String,Object>>  list = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //安防<=1小时&&<1天未处理
 | 
	
		
			
				|  |  |              sql = " select o.serve_desc serverDesc,o.hospital orgCode,o.device_sn,o.serve_lat,o.serve_lon,o.id,o.patient,o.patient_name patientName,o.serve_desc serverDesc,ct.id consult,22 as type from base_security_monitoring_order o " +
 | 
	
		
			
				|  |  |              sql = " select o.serve_desc serverDesc,o.hospital orgCode,o.device_sn,o.serve_lat,o.serve_lon,o.id,o.patient,o.patient_name patientName,o.serve_desc serverDesc,ct.id consult,22 as type,p.residential_area residentialArea from " +
 | 
	
		
			
				|  |  |                      " base_security_monitoring_order o INNER JOIN base_patient p on o.patient = p.id " +
 | 
	
		
			
				|  |  |                      " INNER JOIN wlyy_consult ct on o.id = ct.relation_code where o.status=1 and (TIMESTAMPDIFF(HOUR,o.create_time,now()) >=1 " +
 | 
	
		
			
				|  |  |                      " AND TIMESTAMPDIFF(HOUR,o.create_time,now()) <24) and not EXISTS ( " +
 | 
	
		
			
				|  |  |                     " select 1 from base_emergency_warn_log log where log.order_id = o.id); ";
 | 
	
	
		
			
				|  | @ -76,6 +77,7 @@ public class EmeWarnOrderJob implements Job {
 | 
	
		
			
				|  |  |                         message.put("categoryCode","");
 | 
	
		
			
				|  |  |                         message.put("orgType","");
 | 
	
		
			
				|  |  |                         message.put("contactStatus","");
 | 
	
		
			
				|  |  |                         message.put("residentialArea",null==map.get("residentialArea")?"":map.get("residentialArea"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         if (null!=map.get("device_sn")){
 | 
	
		
			
				|  |  |                             String device_sn = map.get("device_sn").toString();
 | 
	
	
		
			
				|  | @ -111,6 +113,7 @@ public class EmeWarnOrderJob implements Job {
 | 
	
		
			
				|  |  |                         message.put("categoryCode","");
 | 
	
		
			
				|  |  |                         message.put("orgType","");
 | 
	
		
			
				|  |  |                         message.put("contactStatus","");
 | 
	
		
			
				|  |  |                         message.put("residentialArea",null==map.get("residentialArea")?"":map.get("residentialArea"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         if (null!=map.get("device_sn")){
 | 
	
		
			
				|  |  |                             String device_sn = map.get("device_sn").toString();
 |