Browse Source

告警 alarmType

dev
巴林闲侠 2 years ago
parent
commit
00fd6f2e97
  1. 5
      api/app/lib/controllers/alarm/data.js

5
api/app/lib/controllers/alarm/data.js

@ -91,13 +91,16 @@ async function list (ctx) {
alarms.StructureId AS StructureId,
${anxinyun}.t_structure.name AS StructureName,
${anxinyun}.t_alarm_code.name AS AlarmCodeName,
AlarmContent
AlarmContent,
${anxinyun}.t_alarm_type.name AS alarmType
FROM
alarms
LEFT JOIN ${anxinyun}.t_structure
ON ${anxinyun}.t_structure.id = alarms.StructureId
LEFT JOIN ${anxinyun}.t_alarm_code
ON ${anxinyun}.t_alarm_code.code = alarms.AlarmTypeCode
LEFT JOIN ${anxinyun}.t_alarm_type
ON ${anxinyun}.t_alarm_type.id = alarms.AlarmTypeId
${whereOption.length ? 'WHERE ' + whereOption.join(' AND ') : ''}
ORDER BY alarms.StartTime DESC
${limit ? 'LIMIT ' + limit : ''}

Loading…
Cancel
Save