| 
					
				 | 
			
			
				@ -1068,9 +1068,9 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param deviceSn 设备sn码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getPatientDeviceData(String patient,String deviceSn,Integer page,Integer pageSize)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public com.alibaba.fastjson.JSONObject getPatientDeviceData(String patient,String deviceSn,Integer page,Integer pageSize)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        page = page>0?page-1:0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject result = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        com.alibaba.fastjson.JSONObject result = new com.alibaba.fastjson.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<DevicePatientDevice> devices = patientDeviceDao.findByDeviceSn(deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (devices.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            DevicePatientDevice device = devices.get(0); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1097,7 +1097,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getHealthIndex(JSONObject result,Integer type,String deviceSn,String patient,Integer page,Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public com.alibaba.fastjson.JSONObject getHealthIndex(com.alibaba.fastjson.JSONObject result,Integer type,String deviceSn,String patient,Integer page,Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        page = page>0?page-1:0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Long count =0l; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        PageRequest pageRequest = new PageRequest(page, pageSize); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1199,7 +1199,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getEmeWarn(JSONObject result,String deviceSn,String patient,Integer page,Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public com.alibaba.fastjson.JSONObject getEmeWarn(com.alibaba.fastjson.JSONObject result,String deviceSn,String patient,Integer page,Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlCount = "select SUM(total) from( \n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "select count(ord.id) as total from base_emergency_assistance_order ord  where ord.device_sn='"+deviceSn+"' " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1224,10 +1224,13 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        long count = jdbcTemplate.queryForObject(sqlCount,long.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String str = JSON.toJSONString(list,SerializerFeature.WriteMapNullValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        com.alibaba.fastjson.JSONArray arr = com.alibaba.fastjson.JSONArray.parseArray(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("total",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("page",page+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("pageSize",pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("dataList",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("dataList", arr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |