|
@ -937,12 +937,30 @@ public class PatientInfoPlatFormService {
|
|
detailInfo.put("warnStatus",false);
|
|
detailInfo.put("warnStatus",false);
|
|
}
|
|
}
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
|
|
|
|
detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
|
|
|
|
if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
|
|
|
|
} else {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
|
|
|
|
|
|
if(bl){
|
|
|
|
//取之前时间的监控
|
|
|
|
try {
|
|
|
|
JSONObject tmp = ysDeviceService.deviceVideoTimeList(patient, deviceSn, 1,beforeTime.substring(0,10)+" 00:00:00",beforeTime.substring(0,10)+" 23:59:59",0, null);
|
|
|
|
//JSONObject tmp = ysDeviceService.deviceVideoUrlByTime(deviceSn, 1,"3","2",beforeTime,afterTime,1000, null);
|
|
|
|
detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
|
|
|
|
if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
|
|
|
|
} else {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
detailInfo.put("monitorInfoStatus", 0);
|
|
|
|
detailInfo.put("monitorInfo", "未获取到当天录像信息");
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
|
|
|
|
detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
|
|
|
|
if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
|
|
|
|
} else {
|
|
|
|
detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
break;
|
|
break;
|
|
@ -1247,7 +1265,7 @@ public class PatientInfoPlatFormService {
|
|
" INNER JOIN base_patient p ON ord.patient = p.id \n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id \n" +
|
|
" AND p.del = 1 \n" +
|
|
" AND p.del = 1 \n" +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" ord.STATUS = 1 "+filter;
|
|
|
|
|
|
" ord.STATUS = 1 AND NOT EXISTS ( SELECT 1 FROM base_emergency_warn_log log WHERE log.order_id = ord.id ) "+filter;
|
|
String sql2 = " SELECT \n" +
|
|
String sql2 = " SELECT \n" +
|
|
" '22' AS 'OrderType',\n" +
|
|
" '22' AS 'OrderType',\n" +
|
|
" p.archive_type archiveType,\n" +
|
|
" p.archive_type archiveType,\n" +
|
|
@ -1269,7 +1287,7 @@ public class PatientInfoPlatFormService {
|
|
" FROM\n" +
|
|
" FROM\n" +
|
|
" base_security_monitoring_order ord \n" +
|
|
" base_security_monitoring_order ord \n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id \n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id \n" +
|
|
" where ord.status = 1"+filter;
|
|
|
|
|
|
" where ord.status = 1 AND NOT EXISTS ( SELECT 1 FROM base_emergency_warn_log log WHERE log.order_id = ord.id ) "+filter;
|
|
|
|
|
|
String sql = "select * FROM (" +
|
|
String sql = "select * FROM (" +
|
|
" "+sql1+" UNION "+sql2 +
|
|
" "+sql1+" UNION "+sql2 +
|
|
@ -1362,13 +1380,13 @@ public class PatientInfoPlatFormService {
|
|
" base_emergency_assistance_order ord " +
|
|
" base_emergency_assistance_order ord " +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id and p.del=1 \n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id and p.del=1 \n" +
|
|
" WHERE\n" +
|
|
" WHERE\n" +
|
|
" ord.STATUS = 1"+filter;
|
|
|
|
|
|
" ord.STATUS = 1 AND NOT EXISTS ( SELECT 1 FROM base_emergency_warn_log log WHERE log.order_id = ord.id ) "+filter;
|
|
//安防监护
|
|
//安防监护
|
|
String securitySql = "SELECT count( ord.id ) warningCount \n" +
|
|
String securitySql = "SELECT count( ord.id ) warningCount \n" +
|
|
" FROM\n" +
|
|
" FROM\n" +
|
|
" base_security_monitoring_order ord\n" +
|
|
" base_security_monitoring_order ord\n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id and p.del=1 \n" +
|
|
" INNER JOIN base_patient p ON ord.patient = p.id and p.del=1 \n" +
|
|
" AND ord.STATUS = 1"+filter;
|
|
|
|
|
|
" AND ord.STATUS = 1 AND NOT EXISTS ( SELECT 1 FROM base_emergency_warn_log log WHERE log.order_id = ord.id ) "+filter;
|
|
String sqlCount = "SELECT\n" +
|
|
String sqlCount = "SELECT\n" +
|
|
" sum( warningCount ) warningCount\n" +
|
|
" sum( warningCount ) warningCount\n" +
|
|
" FROM\n" +
|
|
" FROM\n" +
|