|
@ -1430,24 +1430,28 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
|
|
|
info.put("info2","超时时长: 3小时");
|
|
|
}
|
|
|
if ("午睡超时未起床".equals(orderDO.getServeDesc())){
|
|
|
if (null!=orderDO.getServeDesc()) {
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("siestaTimeBegin") && null != jsonObject.get("siestaTimeBegin")) {
|
|
|
String siestaTimeBegin = jsonObject.getString("siestaTimeBegin");
|
|
|
info.put("info1", "预计午休起床时间: " +DateUtil.getPreTime(siestaTimeBegin,60*5+""));
|
|
|
if (null!=orderDO.getWarnInfo()) {
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(orderDO.getWarnInfo())){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("siestaTimeBegin") && null != jsonObject.get("siestaTimeBegin")) {
|
|
|
String siestaTimeBegin = jsonObject.getString("siestaTimeBegin");
|
|
|
info.put("info1", "预计午休起床时间: " +DateUtil.getPreTime(siestaTimeBegin,60*5+""));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
info.put("info2","超时时长: 5小时");
|
|
|
}
|
|
|
if ("起夜超时未回床".equals(orderDO.getServeDesc())){
|
|
|
if (null!=orderDO.getServeDesc()){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("sleepNightRecordList")&&null!=jsonObject.get("sleepNightRecordList")){
|
|
|
com.alibaba.fastjson.JSONArray nightArr = jsonObject.getJSONArray("sleepNightRecordList");
|
|
|
if (nightArr.size()>0){
|
|
|
com.alibaba.fastjson.JSONObject tmp = nightArr.getJSONObject(0);
|
|
|
String time = tmp.getString("createTime");
|
|
|
info.put("info1","离床时间: "+time);
|
|
|
if (null!=orderDO.getWarnInfo()){
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(orderDO.getWarnInfo())){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("sleepNightRecordList")&&null!=jsonObject.get("sleepNightRecordList")){
|
|
|
com.alibaba.fastjson.JSONArray nightArr = jsonObject.getJSONArray("sleepNightRecordList");
|
|
|
if (nightArr.size()>0){
|
|
|
com.alibaba.fastjson.JSONObject tmp = nightArr.getJSONObject(0);
|
|
|
String time = tmp.getString("createTime");
|
|
|
info.put("info1","离床时间: "+time);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -1469,40 +1473,50 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
|
|
|
}
|
|
|
if ("疑似发生火灾".equals(orderDO.getServeDesc())){
|
|
|
//烟雾浓度
|
|
|
if (null!=orderDO.getServeDesc()){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
String value = jsonObject.getString("smoke");
|
|
|
if (!value.contains("%")){
|
|
|
value+="%";
|
|
|
if (null!=orderDO.getWarnInfo()){
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(orderDO.getWarnInfo())){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("smoke")&&null!=jsonObject.get("smoke")){
|
|
|
String value = jsonObject.getString("smoke");
|
|
|
if (!value.contains("%")){
|
|
|
value+="%";
|
|
|
}
|
|
|
info.put("info1","烟雾浓度: "+value);
|
|
|
}
|
|
|
}
|
|
|
info.put("info1","烟雾浓度: "+value);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if ("疑似燃气泄漏".equals(orderDO.getServeDesc())){
|
|
|
//燃气浓度
|
|
|
if (null!=orderDO.getServeDesc()) {
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
String value = jsonObject.getString("gas");
|
|
|
if (!value.contains("%")) {
|
|
|
value += "%";
|
|
|
if (null!=orderDO.getWarnInfo()) {
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(orderDO.getWarnInfo())){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if (jsonObject.containsKey("gas")&&null!=jsonObject.get("gas")){
|
|
|
String value = jsonObject.getString("gas");
|
|
|
if (!value.contains("%")) {
|
|
|
value += "%";
|
|
|
}
|
|
|
info.put("info1", "燃气浓度: "+value);
|
|
|
}
|
|
|
}
|
|
|
info.put("info1", "燃气浓度: "+value);
|
|
|
}
|
|
|
}
|
|
|
if("心率和呼吸频率异常".equals(orderDO.getServeDesc())){
|
|
|
if (null!=orderDO.getServeDesc()){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if(null!=jsonObject.get("breath")){
|
|
|
String breath = jsonObject.getString("breath");
|
|
|
if (StringUtils.isNotBlank(breath)){
|
|
|
info.put("info1", "预警频率 "+breath+"次/分钟");
|
|
|
if (null!=orderDO.getWarnInfo()){
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(orderDO.getWarnInfo())){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(orderDO.getWarnInfo());
|
|
|
if(null!=jsonObject.get("breath")){
|
|
|
String breath = jsonObject.getString("breath");
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(breath)){
|
|
|
info.put("info1", "预警频率 "+breath+"次/分钟");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if(null!=jsonObject.get("heartRate")){
|
|
|
String heartRate = jsonObject.getString("heartRate");
|
|
|
if (StringUtils.isNotBlank(heartRate)){
|
|
|
info.put("info1", "预警心率: "+heartRate+"次/分钟");
|
|
|
if(null!=jsonObject.get("heartRate")){
|
|
|
String heartRate = jsonObject.getString("heartRate");
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(heartRate)){
|
|
|
info.put("info2", "预警心率: "+heartRate+"次/分钟");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|