|  | @ -361,13 +361,9 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                     patientHealthIndex.setRecordDate(recordDate);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setSortDate(recordDate);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setCzrq(new Date());
 | 
	
		
			
				|  |  |                     if (heartrate >= theshold_heartrate_h || heartrate <= theshold_heartrate_l) {
 | 
	
		
			
				|  |  |                         patientHealthIndex.setStatus(1);
 | 
	
		
			
				|  |  |                     } else {
 | 
	
		
			
				|  |  |                         patientHealthIndex.setStatus(0);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     patientHealthIndex.setStatus(0);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setDel("1");
 | 
	
		
			
				|  |  |                     healthIndexDao.save(patientHealthIndex);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     SystemMessageDO messageDO = new SystemMessageDO();
 | 
	
		
			
				|  |  |                     String typeName = "您有新的心率测量记录。心率:" + patientHealthIndex.getValue1() + "次/min";
 | 
	
	
		
			
				|  | @ -397,6 +393,9 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                     String content_notice = null;
 | 
	
		
			
				|  |  |                     for (int i=0;i<errorIndex.size();i++){
 | 
	
		
			
				|  |  |                         com.alibaba.fastjson.JSONObject tmp = errorIndex.getJSONObject(i);
 | 
	
		
			
				|  |  |                         if (0!=tmp.getInteger("error")){
 | 
	
		
			
				|  |  |                             patientHealthIndex.setStatus(1);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         if (1 == tmp.getInteger("error")){
 | 
	
		
			
				|  |  |                             content_notice += tmp.getString("indexName")+"、";
 | 
	
		
			
				|  |  |                         }
 | 
	
	
		
			
				|  | @ -406,6 +405,7 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                         message.put("content_notice","您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
 | 
	
		
			
				|  |  |                         messageDO.setContent("您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     healthIndexDao.save(patientHealthIndex);
 | 
	
		
			
				|  |  |                     systemMessageDao.save(messageDO);
 | 
	
		
			
				|  |  |                     imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(message,SerializerFeature.WriteMapNullValue));
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -445,14 +445,8 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                     patientHealthIndex.setRecordDate(recordDate);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setSortDate(recordDate);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setCzrq(new Date());
 | 
	
		
			
				|  |  |                     if (sbp>=sbp_h||dbp<=dbp_l){
 | 
	
		
			
				|  |  |                         patientHealthIndex.setStatus(1);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     else {
 | 
	
		
			
				|  |  |                         patientHealthIndex.setStatus(0);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     patientHealthIndex.setStatus(0);
 | 
	
		
			
				|  |  |                     patientHealthIndex.setDel("1");
 | 
	
		
			
				|  |  |                     healthIndexDao.save(patientHealthIndex);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     SystemMessageDO messageDO = new SystemMessageDO();
 | 
	
		
			
				|  |  |                     String typeName = "您有新的血压测量记录:收缩压:"+patientHealthIndex.getValue1()+"mmHg,收缩压:"
 | 
	
	
		
			
				|  | @ -481,6 +475,9 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                     String content_notice = "";
 | 
	
		
			
				|  |  |                     for (int i=0;i<errorIndex.size();i++){
 | 
	
		
			
				|  |  |                         com.alibaba.fastjson.JSONObject tmp = errorIndex.getJSONObject(i);
 | 
	
		
			
				|  |  |                         if (0!=tmp.getInteger("error")){
 | 
	
		
			
				|  |  |                             patientHealthIndex.setStatus(1);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         if (1 == tmp.getInteger("error")){
 | 
	
		
			
				|  |  |                             content_notice += tmp.getString("indexName")+"、";
 | 
	
		
			
				|  |  |                         }
 | 
	
	
		
			
				|  | @ -490,6 +487,8 @@ public class DeviceService {
 | 
	
		
			
				|  |  |                         message.put("content_notice","您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
 | 
	
		
			
				|  |  |                         messageDO.setContent("您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     healthIndexDao.save(patientHealthIndex);
 | 
	
		
			
				|  |  |                     systemMessageDao.save(messageDO);
 | 
	
		
			
				|  |  |                     imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(message,SerializerFeature.WriteMapNullValue));
 | 
	
		
			
				|  |  |                 }
 |