From 00fd6f2e970a310c718fa483c851ed639fffece3 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Mon, 26 Sep 2022 14:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=20alarmType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/data.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 : ''}