|
|
@ -8,15 +8,15 @@ async function deviceType (ctx) { |
|
|
|
const { clickHouse } = ctx.app.fs |
|
|
|
|
|
|
|
const kindRes = await clickHouse.vcmp.query(` |
|
|
|
SELECT DISTINCT |
|
|
|
camera_kind.id AS id,camera_kind.kind AS kind |
|
|
|
FROM camera_kind |
|
|
|
INNER JOIN camera |
|
|
|
ON camera_kind.id = camera.kind_id |
|
|
|
INNER JOIN camera_status_alarm |
|
|
|
ON camera.channel_no = camera_status_alarm.channel_no |
|
|
|
AND camera.serial_no = camera_status_alarm.serial_no |
|
|
|
`).toPromise()
|
|
|
|
SELECT DISTINCT |
|
|
|
camera_kind.id AS id,camera_kind.kind AS kind |
|
|
|
FROM camera_kind |
|
|
|
INNER JOIN camera |
|
|
|
ON camera_kind.id = camera.kind_id |
|
|
|
INNER JOIN camera_status_alarm |
|
|
|
ON camera.channel_no = camera_status_alarm.channel_no |
|
|
|
AND camera.serial_no = camera_status_alarm.serial_no |
|
|
|
`).toPromise()
|
|
|
|
ctx.status = 200; |
|
|
|
ctx.body = kindRes |
|
|
|
} catch (error) { |
|
|
|