|
|
|
|
@ -267,7 +267,7 @@ public class RuleEngine {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!triggered) {
|
|
|
|
|
// 所有组条件都不满足 → 恢复该规则该设备对应的活跃报警
|
|
|
|
|
// 报警恢复
|
|
|
|
|
for (AlarmRecordsDO alarm : activeAlarms) {
|
|
|
|
|
recoverAlarm(alarm, ruleId,3);
|
|
|
|
|
}
|
|
|
|
|
@ -286,6 +286,7 @@ public class RuleEngine {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("[RuleEngine] 规则评估失败: ruleId={}, deviceId={}, error={}", rule.getId(), triggerDevice.getId(), e.getMessage());
|
|
|
|
|
}finally {
|
|
|
|
|
|
|
|
|
|
@ -445,7 +446,7 @@ public class RuleEngine {
|
|
|
|
|
//如果有报警灯,关闭报警灯
|
|
|
|
|
List<RuleActionsDO> actions = actionMapper.selectList(new QueryWrapper<RuleActionsDO>()
|
|
|
|
|
.eq("rule_id", ruleId)
|
|
|
|
|
.eq("action_type", "switch"));
|
|
|
|
|
.eq("action_param", "switch"));
|
|
|
|
|
|
|
|
|
|
for (RuleActionsDO action : actions) {
|
|
|
|
|
// 执行单个动作
|
|
|
|
|
|