内容(报警信息)

This commit is contained in:
2025-09-20 14:35:23 +08:00
parent 9058dcfcb1
commit 5f36c25550
2 changed files with 10 additions and 6 deletions

View File

@ -36,7 +36,7 @@ public class DeviceAlarmBo extends TenantEntity {
/** /**
* 报警事项 * 报警事项
* device_action * device_action
* 0-强制报警1-撞击闯入2-自动报警3-电子围栏告警 * 0-强制报警1-撞击闯入2-自动报警3-电子围栏告警
*/ */
private Integer deviceAction; private Integer deviceAction;
@ -63,7 +63,7 @@ public class DeviceAlarmBo extends TenantEntity {
private String dataSource; private String dataSource;
/** /**
* 内容 * 内容(报警信息)
*/ */
private String content; private String content;

View File

@ -6,17 +6,21 @@
<!-- 查询设备告警列表 --> <!-- 查询设备告警列表 -->
<select id="selectVoPage" resultType="com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo"> <select id="selectVoPage" resultType="com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo">
select da.*, d.device_mac as deviceMac, d.device_imei as deviceImei, select da.*, d.device_mac as deviceMac, d.device_imei as deviceImei,d.device_name as deviceName,
d.device_type as deviceType,
d.type_name as deviceTypeName, d.device_pic as devicePic d.type_name as deviceTypeName, d.device_pic as devicePic
from device_alarm da from device_alarm da
left join device d on da.device_id = d.id left join device d on da.device_id = d.id
left join device_type dt on dt.id = da.device_type left join device_type dt on dt.id = d.device_type
<where> <where>
<if test="bo.content != null">
and d.device_name like concat('%', #{bo.content}, '%') or dt.type_name like concat('%', #{bo.content}, '%')
</if>
<if test="bo.deviceName != null"> <if test="bo.deviceName != null">
and da.device_name = #{bo.deviceName} and d.device_name like concat('%', #{bo.deviceName}, '%')
</if> </if>
<if test="bo.deviceType != null"> <if test="bo.deviceType != null">
and da.device_type = #{bo.deviceType} and dt.id = #{bo.deviceType}
</if> </if>
<if test="bo.deviceAction != null"> <if test="bo.deviceAction != null">
and da.device_action = #{bo.deviceAction} and da.device_action = #{bo.deviceAction}