|
@ -15,10 +15,10 @@ async function groupList (ctx) { |
|
|
for (let g of groupRes) { |
|
|
for (let g of groupRes) { |
|
|
g.unit = await await clickHouse.anxinyun.query(` |
|
|
g.unit = await await clickHouse.anxinyun.query(` |
|
|
SELECT DISTINCT |
|
|
SELECT DISTINCT |
|
|
t_alarm_group_unit.id AS id,t_alarm_group_unit.name AS name,t_alarm_group_unit.group_id AS groupId |
|
|
t_alarm_group_unit.id AS id,t_alarm_group_unit.name AS name,t_alarm_group_unit.group_id AS groupId |
|
|
FROM t_alarm_group_unit |
|
|
FROM t_alarm_group_unit |
|
|
INNER JOIN ${dataAlarm}.alarms |
|
|
INNER JOIN ${dataAlarm}.alarms |
|
|
ON t_alarm_group_unit.id = ${dataAlarm}.alarms.AlarmGroupUnit |
|
|
ON t_alarm_group_unit.id = ${dataAlarm}.alarms.AlarmGroupUnit |
|
|
WHERE group_id = ${g.id} |
|
|
WHERE group_id = ${g.id} |
|
|
`).toPromise();
|
|
|
`).toPromise();
|
|
|
} |
|
|
} |
|
|