Browse Source

alarm push debug

dev
CODE 1 year ago
parent
commit
1b2b2975ae
  1. 12
      api/app/lib/schedule/alarms_push.js

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

@ -97,8 +97,7 @@ module.exports = function (app, opts) {
return title
}
pLog('EM推送列表',);
pLog(configListRes)
pLog('EM推送列表_' + configListRes.length,);
for (let { dataValues: c } of configListRes) {
@ -109,11 +108,13 @@ module.exports = function (app, opts) {
const { interval, deviceProportion } = c.tacticsParams
if (curMinOfYear % parseInt(interval) == 0 || isDev) {
pLog(`符合时间断点`)
const corPomsProject = pomsProjectRes.filter(poms => pomsProjectId.includes(poms.id))
let curAnxinProjectId = new Set()
let pepProjectName_ = []
let pepProject_name = [] //当前有关联的项目,后面往对应项目里面插入对应的结构物-监测因素-告警源
try {
for (let { dataValues: poms } of corPomsProject) {
if (poms.pepProjectId) {
// 找对应的项企项目
@ -139,6 +140,11 @@ module.exports = function (app, opts) {
curAnxinProjectId.add(axId)
}
}
} catch (error) {
console.error(error);
throw error
}
const anxinProjectId = [...curAnxinProjectId]
// 查当前 poms 下的结构物 并把不包含的去掉

Loading…
Cancel
Save