From c8c46d842ce7aedac070e9f0d69aa33d695c2cb6 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 14 Oct 2022 09:39:39 +0800 Subject: [PATCH] alarm not exist --- api/app/lib/controllers/alarm/data.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js index 92d170c..ae135b5 100644 --- a/api/app/lib/controllers/alarm/data.js +++ b/api/app/lib/controllers/alarm/data.js @@ -90,7 +90,9 @@ async function list (ctx) { let alarmQueryOptionStr = ` FROM alarms - LEFT JOIN (SELECT DeviceId, any(Status) AS Status,max(Time) FROM alarm.DeviceStatus GROUP BY DeviceId ) AS DeviceStatus + LEFT JOIN ( + SELECT DeviceId, any(Status) AS Status,max(Time) FROM DeviceStatus GROUP BY DeviceId + ) AS DeviceStatus ON DeviceStatus.DeviceId = alarms.SourceId LEFT JOIN ${anxinyun}.t_structure ON ${anxinyun}.t_structure.id = alarms.StructureId