Browse Source

邮件优化

dev
wenlele 1 year ago
parent
commit
d9b37842cf
  1. 2
      api/app/lib/controllers/alarm/video.js
  2. 2
      api/app/lib/controllers/control/toolLink.js
  3. 5
      api/app/lib/schedule/alarms_push.js

2
api/app/lib/controllers/alarm/video.js

@ -227,7 +227,7 @@ async function alarmList (ctx) {
const alarmRes = anxinStrucIds.length ? await clickHouse.vcmp.query(
queryStr
).toPromise() : []
console.log(queryStr);
let returnD = []
let positionD = {}
// 每个设备一个告警

2
api/app/lib/controllers/control/toolLink.js

@ -307,7 +307,7 @@ async function count (ctx) {
WHERE
camera.delete = '0'
AND camera.recycle_time is null
AND camera_status_alarm.create_time >= '${moment().startOf("day").format('YYYY-MM-DD HH:mm:ss')}'
-- AND camera_status_alarm.create_time >= '${moment().startOf("day").format('YYYY-MM-DD HH:mm:ss')}'
AND alarmId IN (
SELECT camera_status_alarm.id AS alarmId
FROM camera_status_alarm

5
api/app/lib/schedule/alarms_push.js

@ -567,6 +567,7 @@ module.exports = function (app, opts) {
AND alarms.SourceTypeId = 2
WHERE
${`State NOT IN (3, 4) AND `}
PlatformStructureId IN (${searchStrucIds.join(',')})
${dataAlarmOption.length ? ' AND ' + dataAlarmOption.join(' AND ') : ''}
AND Project IS NOT null
@ -1297,10 +1298,10 @@ module.exports = function (app, opts) {
alarms.StructureId In (${[...dataAlarmG1StructureId, ...dataAlarmStructureId, -1].join(',')
// 3025
})
AND
alarms.AlarmGroup IN (1,4,5)
AND
alarms.State < 3
${dataAlarmOption.length ? ' AND ' + dataAlarmOption.join(' AND ') : ''}
`
).toPromise() || []

Loading…
Cancel
Save