Browse Source

异常比率 得 * 100 啊!

dev
CODE 1 year ago
parent
commit
432350484a
  1. 2
      api/app/lib/schedule/alarms_push.js

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

@ -1087,7 +1087,7 @@ module.exports = function (app, opts) {
if (c.tactics == 'abnormal_rate') {
pLog(`异常设备数量 - ${deviceStatistic.size}`)
pLog(`异常视频告警数量 - ${videoAlarms.length}`)
let rate = ((deviceStatistic.size + videoAlarms.length) / (parseInt(deviceCount) + parseInt(cameraCount)));
let rate = ((deviceStatistic.size + videoAlarms.length) / (parseInt(deviceCount) + parseInt(cameraCount))) * 100;
pLog(`异常比率 ${rate} 设定值 ${deviceProportion}`)
if (rate < parseFloat(deviceProportion)) {
// 设备异常率低于设定值

Loading…
Cancel
Save