设备告警

This commit is contained in:
2025-08-29 18:58:16 +08:00
parent e17a64ad57
commit d66fb7d2c2
8 changed files with 35 additions and 34 deletions

View File

@ -6,27 +6,28 @@
<!-- 查询设备告警列表 -->
<select id="selectVoPage" resultType="com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo">
select *, d.device_mac as deviceMac, d.device_imei as deviceImei,
select *, d.device_mac as deviceMac, d.device_imei as deviceImei,
d.type_name as deviceTypeName
from device_alarm da
left join device d on da.device_id = d.id
left join device_type dt on dt.id = da.device_type
<where>
<if test="bo.deviceName != null">
and da.device_name = #{deviceName}
and da.device_name = #{bo.deviceName}
</if>
<if test="bo.deviceType != null">
and da.device_type = #{deviceType}
and da.device_type = #{bo.deviceType}
</if>
<if test="bo.deviceAction != null">
and da.device_action = #{deviceAction}
and da.device_action = #{bo.deviceAction}
</if>
<if test="bo.treatmentState != null">
and da.treatmentState = #{bo.treatment_state}
and da.treatment_state = #{bo.treatmentState}
</if>
<if test="bo.queryTime1 != null and bo.queryTime2 != null ">
and da.startTime between #{bo.queryTime1} and #{bo.queryTime2}
and da.start_time between #{bo.queryTime1} and #{bo.queryTime2}
</if>
</where>
</select>
</mapper>