From b6298cc7ce6dfa5dbc1193d640a860d44f09aee7 Mon Sep 17 00:00:00 2001 From: CODE <1650192445@qq.com> Date: Tue, 17 Oct 2023 14:48:45 +0800 Subject: [PATCH] dataAlarmStructureId --- api/app/lib/schedule/alarms_push.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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