Browse Source

dataAlarmStructureId

dev
CODE 1 year ago
parent
commit
b6298cc7ce
  1. 4
      api/app/lib/schedule/alarms_push.js

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

@ -1168,7 +1168,7 @@ module.exports = function (app, opts) {
pLog('安心云项目结构物id', dataAlarmG1StructureId)
pLog('本地化项目结构物id', dataAlarmStructureId)
//查询结构物的监测因素(安心云)
let factorData = await clickHouse.anxinyun.query(
let factorData = dataAlarmStructureId.size ? await clickHouse.anxinyun.query(
`
SELECT
t_structure_factor.structure AS structureId,
@ -1181,7 +1181,7 @@ module.exports = function (app, opts) {
WHERE
t_structure_factor.structure IN (${[...dataAlarmG1StructureId].join(',')},-1)
`
).toPromise() || []
).toPromise() || [] : []
//查询结构物的监测因素(本地化项目)
let factorDataLocal = await clickHouse.dataAlarm.query(
` SELECT

Loading…
Cancel
Save