|
|
|
@ -7,41 +7,40 @@
|
|
|
|
|
|
|
|
|
|
<select id="page" resultType="com.yingji.entity.Alarm">
|
|
|
|
|
select * from alarm
|
|
|
|
|
<where>
|
|
|
|
|
<if test="req.startTime != null ">
|
|
|
|
|
emergency_event_time >= #{req.startTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.endTime != null ">
|
|
|
|
|
and emergency_event_time <= #{req.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.endTime != null ">
|
|
|
|
|
and emergency_event_time <= #{req.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.emergencyEventDesc != null and req.emergencyEventDesc != ''">
|
|
|
|
|
and emergency_event_desc like concat('%', #{req.emergencyEventDesc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.emergencyEventAddress != null and req.emergencyEventAddress != ''">
|
|
|
|
|
and emergency_event_address like concat('%', #{req.emergencyEventAddress}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.alarmPhoneNumber != null and req.alarmPhoneNumber != ''">
|
|
|
|
|
and alarm_phone_number like concat('%', #{req.alarmPhoneNumber}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiClass != null and req.aiClass != ''">
|
|
|
|
|
and ai_class like concat('%', #{req.aiClass}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiClass2 != null and req.aiClass2 != ''">
|
|
|
|
|
and ai_class2 like concat('%', #{req.aiClass2}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiLevel != null and req.aiLevel != ''">
|
|
|
|
|
and ai_level like concat('%', #{req.aiLevel}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiNumMin != null ">
|
|
|
|
|
and ai_num <= #{req.aiNumMin}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiNumMax != null ">
|
|
|
|
|
and ai_num <= #{req.aiNumMax}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
where ai_class is not null
|
|
|
|
|
<if test="req.startTime != null ">
|
|
|
|
|
and emergency_event_time >= #{req.startTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.endTime != null ">
|
|
|
|
|
and emergency_event_time <= #{req.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.endTime != null ">
|
|
|
|
|
and emergency_event_time <= #{req.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.emergencyEventDesc != null and req.emergencyEventDesc != ''">
|
|
|
|
|
and emergency_event_desc like concat('%', #{req.emergencyEventDesc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.emergencyEventAddress != null and req.emergencyEventAddress != ''">
|
|
|
|
|
and emergency_event_address like concat('%', #{req.emergencyEventAddress}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.alarmPhoneNumber != null and req.alarmPhoneNumber != ''">
|
|
|
|
|
and alarm_phone_number like concat('%', #{req.alarmPhoneNumber}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiClass != null and req.aiClass != ''">
|
|
|
|
|
and ai_class like concat('%', #{req.aiClass}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiClass2 != null and req.aiClass2 != ''">
|
|
|
|
|
and ai_class2 like concat('%', #{req.aiClass2}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiLevel != null and req.aiLevel != ''">
|
|
|
|
|
and ai_level like concat('%', #{req.aiLevel}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiNumMin != null ">
|
|
|
|
|
and ai_num <= #{req.aiNumMin}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.aiNumMax != null ">
|
|
|
|
|
and ai_num <= #{req.aiNumMax}
|
|
|
|
|
</if>
|
|
|
|
|
order by update_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|