| 
					
				 | 
			
			
				@ -724,37 +724,37 @@ public class DeviceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //更新患者在床状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    updatePatientSleepStatus(device,patient,time_begin,bed_status); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (!orderCreate){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if ("1".equals(bed_status)){//呼吸 心率检测 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Integer theshold_breath_h = 25; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Integer theshold_breath_l = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Integer theshold_heartrate_h = 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Integer theshold_heartrate_l = 50; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if (StringUtils.isNotBlank(breath)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                Integer breath1 = Integer.parseInt(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                if (breath1>theshold_breath_h||breath1<theshold_breath_l){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setBreath(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setHeartRate(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setBedStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setSleepNightRecordList(nightRecord.findBySnPaTime(device,patient,dayTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"心率和呼吸频率异常",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if (StringUtils.isNotBlank(heartrate)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                Integer heartrate1 = Integer.parseInt(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                if (heartrate1>theshold_heartrate_h||theshold_heartrate_h<theshold_heartrate_l){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setBreath(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setHeartRate(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setBedStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    planDetail.setSleepNightRecordList(nightRecord.findBySnPaTime(device,patient,dayTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"心率和呼吸频率异常",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    if (!orderCreate){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        if ("1".equals(bed_status)){//呼吸 心率检测 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            Integer theshold_breath_h = 25; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            Integer theshold_breath_l = 8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            Integer theshold_heartrate_h = 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            Integer theshold_heartrate_l = 50; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            if (StringUtils.isNotBlank(breath)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                Integer breath1 = Integer.parseInt(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                if (breath1>theshold_breath_h||breath1<theshold_breath_l){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setBreath(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setHeartRate(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setBedStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setSleepNightRecordList(nightRecord.findBySnPaTime(device,patient,dayTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"心率和呼吸频率异常",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            if (StringUtils.isNotBlank(heartrate)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                Integer heartrate1 = Integer.parseInt(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                if (heartrate1>theshold_heartrate_h||theshold_heartrate_h<theshold_heartrate_l){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setBreath(breath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setHeartRate(heartrate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setBedStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    planDetail.setSleepNightRecordList(nightRecord.findBySnPaTime(device,patient,dayTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"心率和呼吸频率异常",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                    return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 |