Browse Source

api debug

dev
wenlele 1 year ago
parent
commit
36645fc496
  1. 14
      api/app/lib/schedule/alarms_push.js

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

@ -94,6 +94,8 @@ module.exports = function (app, opts) {
return title return title
} }
console.log('EM推送列表', configListRes);
for (let { dataValues: c } of configListRes) { for (let { dataValues: c } of configListRes) {
if (c.tacticsParams && c.tactics) { if (c.tacticsParams && c.tactics) {
@ -136,6 +138,11 @@ module.exports = function (app, opts) {
} }
} }
console.log('corPomsProject', corPomsProject);
console.log('pepProjectName_', pepProjectName_);
console.log('pepProject_name', pepProject_name);
const anxinProjectId = [...curAnxinProjectId] const anxinProjectId = [...curAnxinProjectId]
// 查当前 poms 下的结构物 并把不包含的去掉 // 查当前 poms 下的结构物 并把不包含的去掉
// 可能有结构物已解绑 // 可能有结构物已解绑
@ -189,6 +196,8 @@ module.exports = function (app, opts) {
}) })
}) })
console.log('strucListRes', strucListRes);
let strucThingId = [] let strucThingId = []
let strucMap = {} let strucMap = {}
let searchStrucIds = strucListRes.map(s => { let searchStrucIds = strucListRes.map(s => {
@ -499,6 +508,10 @@ module.exports = function (app, opts) {
if (c.alarmSubType) dataAlarmSubType = dataAlarmSubType.concat(c.alarmSubType['device_exception']) if (c.alarmSubType) dataAlarmSubType = dataAlarmSubType.concat(c.alarmSubType['device_exception'])
} }
console.log('dataAlarmGroupOption', dataAlarmGroupOption);
console.log('searchStrucIds', searchStrucIds);
// 查数据告警 三警合一 // 查数据告警 三警合一
if (dataAlarmGroupOption.length && searchStrucIds.length) { if (dataAlarmGroupOption.length && searchStrucIds.length) {
dataAlarmGroupOption.push(-1) dataAlarmGroupOption.push(-1)
@ -507,6 +520,7 @@ module.exports = function (app, opts) {
dataAlarmSubType.push(-1) dataAlarmSubType.push(-1)
dataAlarmOption.push(`AlarmGroupUnit IN (${dataAlarmSubType.join(',')})`) dataAlarmOption.push(`AlarmGroupUnit IN (${dataAlarmSubType.join(',')})`)
} }
dataAlarms = dataAlarms =
!c.alarmSubType || dataAlarmSubType.length ? !c.alarmSubType || dataAlarmSubType.length ?
await clickHouse.dataAlarm.query(` await clickHouse.dataAlarm.query(`

Loading…
Cancel
Save