diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index 58a5983..e87bcea 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -23,6 +23,13 @@ module.exports = function (app, opts) { const { database: dataAlarm } = clickHouse.dataAlarm.opts.config const { pushBySms, pushByEmail, sendNoticeToWeb } = app.fs.utils const curMinOfYear = moment().diff(moment().startOf('year'), 'minutes') + + const pLog = (msg) => { + if (proDebug) { + console.log(msg) + } + } + const configListRes = await models.AlarmPushConfig.findAll({ where: { del: false, @@ -1220,6 +1227,7 @@ module.exports = function (app, opts) { } // console.log('数据组合', JSON.stringify(pepProject_name)); + pLog('数据组合' + JSON.stringify(pepProject_name)) pepProject_name.forEach(h => { let rowspan1 = 0 @@ -1287,6 +1295,7 @@ module.exports = function (app, opts) { function packageAlarmData2Table ({ titlePrefix, alarmData, alarmTitleArr, keyOfStartTime = 'StartTime', type }) { + pLog(`${titlePrefix} ${alarmData.length}`) if (!alarmData.length) { return '' } @@ -1299,8 +1308,6 @@ module.exports = function (app, opts) { let accumulate = 0 if (type == 1) { - - alarmData.map((h, hi) => { accumulate += h.rowspan || 0 if (h.projects && h.projects.length) {