|
|
@ -87,7 +87,9 @@ async function alarmList (ctx) { |
|
|
|
camera_status.describe AS statusDescribe, |
|
|
|
camera_status_resolve.resolve AS resolve, |
|
|
|
"gbCamera".online AS cameraOnline, |
|
|
|
anxinIpc.t_video_ipc.name, |
|
|
|
anxinIpc.t_video_ipc.name AS anxinIpcPosition, |
|
|
|
anxinStation.id AS anxinStationId, |
|
|
|
anxinStation.name AS anxinStationName, |
|
|
|
anxinStruc.name AS strucName, |
|
|
|
anxinStruc.id AS strucId |
|
|
|
FROM |
|
|
@ -144,6 +146,10 @@ async function alarmList (ctx) { |
|
|
|
AND anxinIpc.serial_no = cameraAlarm.cameraSerialNo |
|
|
|
LEFT JOIN ${anxinyun}.t_structure AS anxinStruc |
|
|
|
ON anxinStruc.id = anxinIpc.structure |
|
|
|
LEFT JOIN ${anxinyun}.t_video_ipc_station AS anxinIpcStation |
|
|
|
ON anxinIpcStation.ipc = anxinIpc.id |
|
|
|
LEFT JOIN ${anxinyun}.t_sensor AS anxinStation |
|
|
|
ON anxinStation.id = anxinIpcStation.station |
|
|
|
` |
|
|
|
).toPromise() |
|
|
|
|
|
|
@ -165,6 +171,13 @@ async function alarmList (ctx) { |
|
|
|
name: a.strucName |
|
|
|
}) |
|
|
|
} |
|
|
|
if (a.anxinStationId && !curD.station.some(s => s.id == a.anxinStationId)) { |
|
|
|
curD.station.push({ |
|
|
|
id: a.anxinStationId, |
|
|
|
name: a.anxinStationName, |
|
|
|
position: a.anxinIpcPosition |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
let d = { |
|
|
|
cameraId: a.cameraId, |
|
|
@ -185,7 +198,8 @@ async function alarmList (ctx) { |
|
|
|
cameraKindId: a.cameraKindId, |
|
|
|
|
|
|
|
resolve: [], |
|
|
|
struc: [] |
|
|
|
struc: [], |
|
|
|
station: [] |
|
|
|
} |
|
|
|
if (a.resolveId) { |
|
|
|
d.resolve.push({ |
|
|
@ -199,6 +213,13 @@ async function alarmList (ctx) { |
|
|
|
name: a.strucName |
|
|
|
}) |
|
|
|
} |
|
|
|
if (a.anxinStationId) { |
|
|
|
d.station.push({ |
|
|
|
id: a.anxinStationId, |
|
|
|
name: a.anxinStationName, |
|
|
|
position: a.anxinIpcPosition |
|
|
|
}) |
|
|
|
} |
|
|
|
returnD.push(d) |
|
|
|
positionD[a.cameraId] = { |
|
|
|
positionReturnD: returnD.length - 1 |
|
|
|