|
@ -90,7 +90,7 @@ async function list (ctx) { |
|
|
let alarmQueryOptionStr = ` |
|
|
let alarmQueryOptionStr = ` |
|
|
FROM |
|
|
FROM |
|
|
alarms |
|
|
alarms |
|
|
LEFT JOIN DeviceStatus |
|
|
LEFT JOIN (SELECT DeviceId, any(Status) AS Status,max(Time) FROM alarm.DeviceStatus GROUP BY DeviceId ) AS DeviceStatus |
|
|
ON DeviceStatus.DeviceId = alarms.SourceId |
|
|
ON DeviceStatus.DeviceId = alarms.SourceId |
|
|
LEFT JOIN ${anxinyun}.t_structure |
|
|
LEFT JOIN ${anxinyun}.t_structure |
|
|
ON ${anxinyun}.t_structure.id = alarms.StructureId |
|
|
ON ${anxinyun}.t_structure.id = alarms.StructureId |
|
|