diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js index 813ac59..4239f05 100644 --- a/api/app/lib/controllers/alarm/data.js +++ b/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 : ''}