|
@ -67,7 +67,7 @@ async function alarmList (ctx) { |
|
|
) |
|
|
) |
|
|
`)
|
|
|
`)
|
|
|
} |
|
|
} |
|
|
const alarmRes = await clickHouse.vcmp.query( |
|
|
const alarmRes = anxinStrucIds.length ? await clickHouse.vcmp.query( |
|
|
` |
|
|
` |
|
|
SELECT |
|
|
SELECT |
|
|
cameraAlarm.cameraId AS cameraId, |
|
|
cameraAlarm.cameraId AS cameraId, |
|
@ -83,8 +83,7 @@ async function alarmList (ctx) { |
|
|
cameraAlarm.platform AS platform, |
|
|
cameraAlarm.platform AS platform, |
|
|
cameraAlarm.confirmContent AS confirmContent, |
|
|
cameraAlarm.confirmContent AS confirmContent, |
|
|
cameraAlarm.confirmTime AS confirmTime, |
|
|
cameraAlarm.confirmTime AS confirmTime, |
|
|
${//'cameraAlarm.autoRestore AS autoRestore,'
|
|
|
${'cameraAlarm.autoRestore AS autoRestore,'} |
|
|
''} |
|
|
|
|
|
camera_status_resolve.id AS resolveId, |
|
|
camera_status_resolve.id AS resolveId, |
|
|
camera_status.describe AS statusDescribe, |
|
|
camera_status.describe AS statusDescribe, |
|
|
camera_status_resolve.resolve AS resolve, |
|
|
camera_status_resolve.resolve AS resolve, |
|
@ -113,12 +112,8 @@ async function alarmList (ctx) { |
|
|
camera_status_alarm.serial_no AS cameraSerialNo, |
|
|
camera_status_alarm.serial_no AS cameraSerialNo, |
|
|
camera_status_alarm.channel_no AS cameraChannelNo, |
|
|
camera_status_alarm.channel_no AS cameraChannelNo, |
|
|
camera_status_alarm.confirm AS confirmContent, |
|
|
camera_status_alarm.confirm AS confirmContent, |
|
|
${ |
|
|
${'camera_status_alarm.auto_restore AS autoRestore,'} |
|
|
//' camera_status_alarm.auto_restore AS autoRestore,'
|
|
|
|
|
|
'' |
|
|
|
|
|
} |
|
|
|
|
|
camera_status_alarm.confirm_time AS confirmTime |
|
|
camera_status_alarm.confirm_time AS confirmTime |
|
|
|
|
|
|
|
|
FROM camera_status_alarm |
|
|
FROM camera_status_alarm |
|
|
INNER JOIN camera |
|
|
INNER JOIN camera |
|
|
ON camera.serial_no = camera_status_alarm.serial_no |
|
|
ON camera.serial_no = camera_status_alarm.serial_no |
|
@ -157,12 +152,14 @@ async function alarmList (ctx) { |
|
|
AND anxinIpc.serial_no = cameraAlarm.cameraSerialNo |
|
|
AND anxinIpc.serial_no = cameraAlarm.cameraSerialNo |
|
|
LEFT JOIN ${anxinyun}.t_structure AS anxinStruc |
|
|
LEFT JOIN ${anxinyun}.t_structure AS anxinStruc |
|
|
ON anxinStruc.id = anxinIpc.structure |
|
|
ON anxinStruc.id = anxinIpc.structure |
|
|
|
|
|
AND anxinStruc.id IN (${anxinStrucIds.join(',')}) |
|
|
|
|
|
${keywordTarget == 'struc' && keyword ? `AND anxinStruc.name LIKE '%${keyword}%'` : ''} |
|
|
LEFT JOIN ${anxinyun}.t_video_ipc_station AS anxinIpcStation |
|
|
LEFT JOIN ${anxinyun}.t_video_ipc_station AS anxinIpcStation |
|
|
ON anxinIpcStation.ipc = anxinIpc.id |
|
|
ON anxinIpcStation.ipc = anxinIpc.id |
|
|
LEFT JOIN ${anxinyun}.t_sensor AS anxinStation |
|
|
LEFT JOIN ${anxinyun}.t_sensor AS anxinStation |
|
|
ON anxinStation.id = anxinIpcStation.station |
|
|
ON anxinStation.id = anxinIpcStation.station |
|
|
` |
|
|
` |
|
|
).toPromise() |
|
|
).toPromise() : [] |
|
|
|
|
|
|
|
|
let returnD = [] |
|
|
let returnD = [] |
|
|
let positionD = {} |
|
|
let positionD = {} |
|
@ -179,6 +176,7 @@ async function alarmList (ctx) { |
|
|
if (a.strucId && !curD.struc.some(s => s.id == a.strucId)) { |
|
|
if (a.strucId && !curD.struc.some(s => s.id == a.strucId)) { |
|
|
curD.struc.push({ |
|
|
curD.struc.push({ |
|
|
id: a.strucId, |
|
|
id: a.strucId, |
|
|
|
|
|
projectId: a.projectId, |
|
|
name: a.strucName |
|
|
name: a.strucName |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -234,6 +232,7 @@ async function alarmList (ctx) { |
|
|
if (a.strucId) { |
|
|
if (a.strucId) { |
|
|
d.struc.push({ |
|
|
d.struc.push({ |
|
|
id: a.strucId, |
|
|
id: a.strucId, |
|
|
|
|
|
projectId: a.projectId, |
|
|
name: a.strucName |
|
|
name: a.strucName |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|