| | |
| | | <if test="alarmRecord.endTime!=null and alarmRecord.endTime!=''"> |
| | | and date_format(sar.create_time,'%Y-%m-%d') <= #{alarmRecord.endTime} |
| | | </if> |
| | | <if test="alarmRecord.adCode!=null and alarmRecord.adCode!=''"> |
| | | and a."interior_ad_guid" like concat('%',#{alarmRecord.adCode},'%') |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | |
| | | <if test="alarmRecord.endTime!=null and alarmRecord.endTime!=''"> |
| | | and date_format(sar.create_time,'%Y-%m-%d') <= #{alarmRecord.endTime} |
| | | </if> |
| | | <if test="alarmRecord.adCode!=null and alarmRecord.adCode!=''"> |
| | | and arb."interior_ad_guid" like concat('%',#{alarmRecord.adCode},'%') |
| | | </if> |
| | | ) f |
| | | group by cityName,rule_name |
| | | </select> |
| | |
| | | select type,count(*) num |
| | | from YWXT.sm_alarm_record sar |
| | | left join YWXT.sm_alarm_rule e on e.id = sar.alarm_rule_id |
| | | left join SJZT_MD."att_res_base" a on a."guid" = sar.reservoir_number |
| | | left join SJZT_MD."att_ad_base" b on b."guid" = a."interior_ad_guid" |
| | | where sar.is_deleted = 0 |
| | | <if test="alarmRecord.startTime!=null and alarmRecord.startTime!=''"> |
| | | and date_format(sar.create_time,'%Y-%m-%d') >= #{alarmRecord.startTime} |
| | |
| | | <if test="alarmRecord.endTime!=null and alarmRecord.endTime!=''"> |
| | | and date_format(sar.create_time,'%Y-%m-%d') <= #{alarmRecord.endTime} |
| | | </if> |
| | | <if test="alarmRecord.adCode!=null and alarmRecord.adCode!=''"> |
| | | and a."interior_ad_guid" like concat('%',#{alarmRecord.adCode},'%') |
| | | </if> |
| | | group by type |
| | | ) b on a.dict_value = b.type |
| | | </select> |