|  | @ -945,11 +945,21 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
 | 
	
		
			
				|  |  |                     dataSql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '" + deviceSn + "' AND del = 1 ORDER BY sort_date DESC LIMIT 10";
 | 
	
		
			
				|  |  |                     dataList = jdbcTemplate.queryForList(dataSql);
 | 
	
		
			
				|  |  |                     devInfoObj.put("data", dataList);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     String ssql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '" + deviceSn + "' AND del = 1 AND status = 1 ";
 | 
	
		
			
				|  |  |                     String bloodPressureSql = ssql + " AND type = 1 ORDER BY sort_date DESC LIMIT 10";
 | 
	
		
			
				|  |  |                     dataList = jdbcTemplate.queryForList(bloodPressureSql);
 | 
	
		
			
				|  |  |                     devInfoObj.put("bloodPressure",dataList); //血压
 | 
	
		
			
				|  |  |                     break;
 | 
	
		
			
				|  |  |                 case "2"://血糖设备
 | 
	
		
			
				|  |  |                     dataSql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '" + deviceSn + "' AND del = 1 ORDER BY sort_date DESC LIMIT 10";
 | 
	
		
			
				|  |  |                     dataSql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '" + deviceSn + "' AND del = 1 ";
 | 
	
		
			
				|  |  |                     dataSql += " ORDER BY sort_date DESC LIMIT 10";
 | 
	
		
			
				|  |  |                     dataList = jdbcTemplate.queryForList(dataSql);
 | 
	
		
			
				|  |  |                     devInfoObj.put("data", dataList);
 | 
	
		
			
				|  |  |                     devInfoObj.put("data", dataList);    //血糖数据
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     recordSql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '" + deviceSn + "' AND del = 1  AND status = 1 ORDER BY sort_date DESC LIMIT 10";
 | 
	
		
			
				|  |  |                     dataList = jdbcTemplate.queryForList(recordSql);
 | 
	
		
			
				|  |  |                     devInfoObj.put("bloodSugar", dataList);          //血糖异常数据
 | 
	
		
			
				|  |  |                     break;
 | 
	
		
			
				|  |  |                 case "4"://手表 围栏与轨迹
 | 
	
		
			
				|  |  |                     if (StringUtils.isBlank(day)) {
 | 
	
	
		
			
				|  | @ -1012,9 +1022,9 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
 | 
	
		
			
				|  |  |         List<DevicePatientDevice> devices = patientDeviceDao.findByDeviceSn(deviceSn);
 | 
	
		
			
				|  |  |         if (devices.size()>0){
 | 
	
		
			
				|  |  |             DevicePatientDevice device = devices.get(0);
 | 
	
		
			
				|  |  |             if (!patient.equals(device.getUser())){
 | 
	
		
			
				|  |  |                 throw new Exception("居民未绑定该设备");
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  | //            if (!patient.equals(device.getUser())){
 | 
	
		
			
				|  |  | //                throw new Exception("居民未绑定该设备");
 | 
	
		
			
				|  |  | //            }else{
 | 
	
		
			
				|  |  |                 switch (device.getCategoryCode()){
 | 
	
		
			
				|  |  |                     case "1"://血压设备
 | 
	
		
			
				|  |  |                         result = getHealthIndex(result,1,deviceSn,patient,page,pageSize);
 | 
	
	
		
			
				|  | @ -1026,10 +1036,12 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
 | 
	
		
			
				|  |  |                         result  = getEmeWarn(result,deviceSn,null,page,pageSize);
 | 
	
		
			
				|  |  |                         break;
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | //            }
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             throw new Exception("设备未被绑定");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         result.put(ResponseContant.resultFlag,ResponseContant.success);
 | 
	
		
			
				|  |  |         result.put(ResponseContant.resultMsg,JSON.toJSONString(result,SerializerFeature.WriteMapNullValue));
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 |