diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index 6bebb25..dabdc3f 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/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