| | |
| | | |
| | | <!-- 查询大坝安全告警统计数据 --> |
| | | <select id="statisticAlarmRecordByAlarmRuleType" resultType="cn.gistack.alerts.alarmRule.vo.StatisticAlarmRecord"> |
| | | select case when alarm_rule_type='大坝安全监测告警' then '告警数量' else '预警数量' end as ruleName, |
| | | select |
| | | case |
| | | when alarm_rule_type='渗压监测告警' then '告警数量' |
| | | when alarm_rule_type='渗压监测预警' then '预警数量' |
| | | when alarm_rule_type='变形监测告警' then '告警数量' |
| | | when alarm_rule_type='变形监测预警' then '预警数量' |
| | | when alarm_rule_type='渗流监测告警' then '告警数量' |
| | | when alarm_rule_type='渗流监测预警' then '预警数量' |
| | | else alarm_rule_type |
| | | end as ruleName, |
| | | sum( |
| | | ( |
| | | select count(*) from YWXT.sm_alarm_record cha |
| | |
| | | ) |
| | | ) as num |
| | | from YWXT.sm_alarm_rule a |
| | | where type = '大坝安全监测' |
| | | <where> |
| | | <if test="alarmRecord.type!=null and alarmRecord.type!=''"> |
| | | and type = #{alarmRecord.type} |
| | | </if> |
| | | </where> |
| | | group by alarm_rule_type |
| | | </select> |
| | | |