| | |
| | | select "ad_name" from SJZT_MD."att_ad_base" where "p_ad_code" = #{adCode} order by "guid" |
| | | </select> |
| | | |
| | | <!--按行政区code行政区--> |
| | | <select id="getAdNameListByAdCode" resultType="java.lang.String"> |
| | | select "ad_name" from SJZT_MD."att_ad_base" where "ad_code" = #{adCode} order by "guid" |
| | | </select> |
| | | |
| | | <!--查询告警统计数据--> |
| | | <select id="statisticAlarmRecord" resultType="cn.gistack.alerts.alarmRule.vo.StatisticAlarmRecord"> |
| | | select cityName as adName,rule_name as ruleName,count(*) num from ( |
| | | select |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 1 "> |
| | | cityName as adName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 2 "> |
| | | countyName as adName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 3 "> |
| | | townName as adName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 4 "> |
| | | townName as adName, |
| | | </if> |
| | | |
| | | rule_name as ruleName,count(*) num from ( |
| | | select |
| | | sar.id,sar.alarm_rule_id,sar.create_time,sar.reservoir_number, |
| | | arb."name", |
| | |
| | | and arb."interior_ad_guid" like concat('%',#{alarmRecord.adCode},'%') |
| | | </if> |
| | | ) f |
| | | group by cityName,rule_name |
| | | group by |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 1 "> |
| | | cityName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 2 "> |
| | | countyName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 3 "> |
| | | townName, |
| | | </if> |
| | | <if test="alarmRecord.adLevel !=null and alarmRecord.adLevel != '' and alarmRecord.adLevel == 4 "> |
| | | townName, |
| | | </if> |
| | | |
| | | |
| | | rule_name |
| | | </select> |
| | | |
| | | <!--查询告警统计数据-按三大类--> |