|  | @ -1264,7 +1264,7 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 //失联设备(一周未上传当作失联)
 | 
	
		
			
				|  |  |                 sql.append("and d.device_sn not in (select device_sn from ( select device_sn,MAX(record_date) record_date from device.wlyy_patient_health_index where device_sn<>'' GROUP BY device_sn)a ");
 | 
	
		
			
				|  |  |                 sql.append("where TIMESTAMPDIFF(DAY,record_date,NOW()) <= 7)");
 | 
	
		
			
				|  |  |                 sql.append("where TIMESTAMPDIFF(DAY,record_date,NOW()) <= 30)");
 | 
	
		
			
				|  |  |                 Integer lostContact = jdbcTemplate.queryForObject(sql.toString(),Integer.class);
 | 
	
		
			
				|  |  |                 result.put("lostContact",lostContact);
 | 
	
		
			
				|  |  |             }
 | 
	
	
		
			
				|  | @ -1387,7 +1387,7 @@ public class MonitorPlatformService  {
 | 
	
		
			
				|  |  |                 sqlCondition.append("and record_date >='"+startTime+" 00:00:00' and record_date<='"+endTime+" 23:59:59'  ");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             else{
 | 
	
		
			
				|  |  |                 sqlCondition.append("and  TIMESTAMPDIFF(DAY,record_date,NOW()) <= 7  ");
 | 
	
		
			
				|  |  |                 sqlCondition.append("and  TIMESTAMPDIFF(DAY,record_date,NOW()) <= 30  ");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             sqlCondition.append(")");
 | 
	
		
			
				|  |  |             sql.append(sqlCondition);
 |