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

Loading…
Cancel
Save