|
@ -303,6 +303,8 @@ public class PatientInfoPlatFormService {
|
|
|
list = jdbcTemplate.queryForList(sql);
|
|
|
if (list.size()>0){
|
|
|
healthIndex.put("lastXTHealthIndex",list.get(0));
|
|
|
}else{
|
|
|
healthIndex.put("lastXTHealthIndex",null);
|
|
|
}
|
|
|
sql = " select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) record_date, " +
|
|
|
" CAST(DATE_FORMAT(sort_date,'%Y-%m-%d %H:%i:%S') as char) sort_date, " +
|
|
@ -310,6 +312,8 @@ public class PatientInfoPlatFormService {
|
|
|
list = jdbcTemplate.queryForList(sql);
|
|
|
if (list.size()>0){
|
|
|
healthIndex.put("lastXYHealthIndex",list.get(0));
|
|
|
}else{
|
|
|
healthIndex.put("lastXYHealthIndex",null);
|
|
|
}
|
|
|
result.put("healthIndex",healthIndex);
|
|
|
return result;
|
|
@ -849,7 +853,14 @@ public class PatientInfoPlatFormService {
|
|
|
detailInfo.put("warnStatus",false);
|
|
|
}
|
|
|
//获取最新一次燃气浓度
|
|
|
sql = "";
|
|
|
sql = " select value,record_time from base_device_health_index where device_sn='"+deviceSn+"' ORDER BY record_time desc limit 1 ";
|
|
|
sqlResult = jdbcTemplate.queryForList(sql);
|
|
|
if (sqlResult.size()>0){
|
|
|
detailInfo.putAll(sqlResult.get(0));
|
|
|
}else {
|
|
|
detailInfo.put("value",null);
|
|
|
detailInfo.put("record_time",null);
|
|
|
}
|
|
|
break;
|
|
|
case "15"://烟感
|
|
|
sql = " select o.id,p.id patient,p.name,p.idcard,p.residential_area,'22' orderType,'1' type,o.serve_address,o.serve_desc, " +
|
|
@ -863,12 +874,13 @@ public class PatientInfoPlatFormService {
|
|
|
}else {
|
|
|
detailInfo.put("warnStatus",false);
|
|
|
}
|
|
|
//获取最新一次燃气浓度
|
|
|
sql = " select value,record_time from base_device_health_index where device_sn='"+deviceSn+"' ORDER BY record_time desc limit 1 ";
|
|
|
//获取最新一次烟雾浓度
|
|
|
sql = " select value,record_time from base_device_health_index where device_sn='"+deviceSn+"' ORDER BY record_time desc limit 1 ";
|
|
|
sqlResult = jdbcTemplate.queryForList(sql);
|
|
|
if (sqlResult.size()>0){
|
|
|
detailInfo.putAll(sqlResult.get(0));
|
|
|
}else {
|
|
|
}
|
|
|
else {
|
|
|
detailInfo.put("value",null);
|
|
|
detailInfo.put("record_time",null);
|
|
|
}
|