1
0

web端控制中心3

This commit is contained in:
2025-08-27 08:59:29 +08:00
parent 74cefe9cc3
commit 364574eeae
13 changed files with 196 additions and 44 deletions

View File

@ -4,4 +4,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuyuanshen.equipment.mapper.DeviceLogMapper">
<select id="getInstructionRecord" resultType="com.fuyuanshen.equipment.domain.vo.InstructionRecordVo">
SELECT
a.id,
a.device_name AS deviceName,
c.type_name deviceType,
a.device_action AS deviceAction,
a.content,
a.create_time AS createTime
FROM
device_log a left join device b on a.device_id = b.id
left join device_type c on b.device_type = c.id
WHERE 1 = 1
<if test="bo.deviceType != null">
AND c.id = #{bo.deviceType}
</if>
<if test="bo.deviceName != null and bo.deviceName != ''">
AND a.device_name like concat('%',#{bo.deviceName},'%')
</if>
<if test="bo.deviceMac != null and bo.deviceMac != ''">
AND b.device_mac = #{bo.deviceMac}
</if>
<if test="bo.deviceImei != null and bo.deviceImei != ''">
AND b.device_imei = #{bo.deviceImei}
</if>
<if test="bo.startTime != null and bo.startTime != ''">
AND create_time <![CDATA[>=]]> #{bo.startTime}
</if>
<if test="bo.endTime != null and bo.endTime != ''">
AND create_time <![CDATA[<=]]> #{bo.startTime}
</if>
ORDER BY
a.create_time DESC
</select>
</mapper>

View File

@ -151,7 +151,7 @@
dt.type_name,
dt.communication_mode,
d.bluetooth_name,
dt.model_dictionary detailPageUrl,
dt.app_model_dictionary detailPageUrl,
c.binding_time
from device d
inner join device_type dt on d.device_type = dt.id
@ -181,7 +181,7 @@
d.device_pic,
dt.type_name,
dt.communication_mode,
dt.model_dictionary detailPageUrl,
dt.app_model_dictionary detailPageUrl,
d.bluetooth_name
from device d
inner join device_type dt on d.device_type = dt.id
@ -227,7 +227,7 @@
dt.type_name,
dt.communication_mode,
d.bluetooth_name,
dt.model_dictionary detailPageUrl
dt.app_model_dictionary detailPageUrl
from device d
inner join device_type dt on d.device_type = dt.id
where d.device_mac = #{deviceMac}
@ -242,7 +242,7 @@
dt.type_name,
dt.communication_mode,
d.bluetooth_name,
dt.model_dictionary detailPageUrl,
dt.pc_model_dictionary detailPageUrl,
ap.name personnelBy,
d.device_status,
c.binding_time
@ -254,7 +254,7 @@
<if test="criteria.deviceType != null">
and d.device_type = #{criteria.deviceType}
</if>
<if test="criteria.deviceName != null">
<if test="criteria.deviceName != null and criteria.deviceName != ''">
and d.device_name like concat('%', #{criteria.deviceName}, '%')
</if>
<if test="criteria.deviceMac != null">
@ -270,7 +270,10 @@
and ap.name like concat('%', #{criteria.personnelBy}, '%')
</if>
<if test="criteria.communicationMode != null">
and dt.communication_mode, = #{criteria.communicationMode}
and dt.communication_mode = #{criteria.communicationMode}
</if>
<if test="criteria.groupId != null">
and d.group_id = #{criteria.groupId}
</if>
</select>