| | |
| | | |
| | | <!--自定义分页列表查询--> |
| | | <select id="selectAlarmRecordPage" resultType="cn.gistack.sm.alarmRule.vo.AlarmRecordVO"> |
| | | select sar.* from sm_alarm_record sar left join sm_alarm_rule sar1 on sar.alarm_rule_id = sar1.id |
| | | where is_deleted = 0 |
| | | select |
| | | sar.*, |
| | | sar1.type,sar1.alarm_rule_type as alarmRuleType,sar1.create_alarm_type as createAlarmType |
| | | from sm_alarm_record sar left join sm_alarm_rule sar1 on sar.alarm_rule_id = sar1.id and sar1.is_deleted = 0 |
| | | where sar.is_deleted = 0 |
| | | <if test="alarmRecord.alarmSurveyStationName!=null and alarmRecord.alarmSurveyStationName!=''"> |
| | | and alarm_survey_station_name like concat(concat('%',#{alarmRecord.alarmSurveyStationName}),'%') |
| | | </if> |
| | | <if test="alarmRecord.reservoirName!=null and alarmRecord.reservoirName!=''"> |
| | | and reservoir_name like concat(concat('%',#{alarmRecord.reservoirName}),'%') |
| | | </if> |
| | | <if test="alarmRecord.type!=null and alarmRecord.type!=''"> |
| | | and sar1.type = #{alarmRule.type} |
| | | and sar1.type = #{alarmRecord.type} |
| | | </if> |
| | | <if test="alarmRecord.alarmRuleType!=null and alarmRecord.alarmRuleType!=''"> |
| | | and sar1.alarm_rule_type = #{alarmRecord.alarmRuleType} |