2025-04-23 17:56:18 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.yfd.platform.modules.auxcontrol.mapper.DeviceSignalMapper">
|
|
|
|
|
|
|
|
<!-- 查询辅控设备信号表-->
|
|
|
|
<select id="selectDeviceSignalYx" resultType="com.yfd.platform.modules.auxcontrol.domain.DeviceSignal">
|
|
|
|
SELECT
|
|
|
|
b.*
|
|
|
|
FROM
|
2025-04-24 10:07:53 +08:00
|
|
|
fk_meter_device a
|
2025-04-23 17:56:18 +08:00
|
|
|
JOIN fk_device_signal b ON ( a.device_id = b.device_id )
|
2025-04-24 10:07:53 +08:00
|
|
|
JOIN fk_gateway_device c ON ( a.netdevice_ip = c.ip_addr )
|
2025-04-23 17:56:18 +08:00
|
|
|
WHERE
|
|
|
|
c.ip_addr = #{slave_ip}
|
|
|
|
|
|
|
|
AND b.yx_addr = #{address}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectDeviceSignalYc" resultType="com.yfd.platform.modules.auxcontrol.domain.DeviceSignal">
|
|
|
|
SELECT
|
|
|
|
b.*
|
|
|
|
FROM
|
2025-04-24 10:07:53 +08:00
|
|
|
fk_meter_device a
|
2025-04-23 17:56:18 +08:00
|
|
|
JOIN fk_device_signal b ON ( a.device_id = b.device_id )
|
2025-04-24 10:07:53 +08:00
|
|
|
JOIN fk_gateway_device c ON ( a.netdevice_ip = c.ip_addr )
|
2025-04-23 17:56:18 +08:00
|
|
|
WHERE
|
|
|
|
c.ip_addr = #{slave_ip}
|
|
|
|
|
|
|
|
AND b.yc_addr = #{address}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 查询辅控设备信号表-->
|
|
|
|
<select id="selectDeviceSignal_Map" resultType="java.util.Map">
|
|
|
|
SELECT
|
|
|
|
a.station_id,
|
|
|
|
a.systemcode,
|
|
|
|
a.device_name,
|
|
|
|
b.*
|
|
|
|
FROM
|
2025-04-24 10:07:53 +08:00
|
|
|
fk_meter_device a
|
2025-04-23 17:56:18 +08:00
|
|
|
JOIN fk_device_signal b ON ( a.device_id = b.device_id )
|
2025-04-24 10:07:53 +08:00
|
|
|
JOIN fk_gateway_device c ON ( a.netdevice_ip = c.ip_addr )
|
2025-04-23 17:56:18 +08:00
|
|
|
WHERE
|
|
|
|
c.ip_addr = #{slave_ip}
|
|
|
|
<if test="type=='yx'">
|
|
|
|
and b.yx_addr = #{address}
|
|
|
|
</if>
|
|
|
|
<if test="type=='yc'">
|
|
|
|
and b.yc_addr = #{address}
|
|
|
|
</if>
|
2025-04-24 10:07:53 +08:00
|
|
|
limit 1
|
2025-04-23 17:56:18 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 查询辅控设备信号表-->
|
|
|
|
<select id="selectDeviceSignal_Map2" resultType="java.util.Map">
|
|
|
|
SELECT
|
|
|
|
a.station_id,
|
|
|
|
a.systemcode,
|
|
|
|
a.device_name,
|
|
|
|
b.*
|
|
|
|
FROM
|
2025-04-24 10:07:53 +08:00
|
|
|
fk_meter_device a
|
2025-04-23 17:56:18 +08:00
|
|
|
JOIN fk_device_signal b ON ( a.device_id = b.device_id )
|
|
|
|
WHERE
|
|
|
|
1 =1
|
|
|
|
<if test="type=='yx'">
|
|
|
|
and b.yx_addr = #{address}
|
|
|
|
</if>
|
|
|
|
<if test="type=='yc'">
|
|
|
|
and b.yc_addr = #{address}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</mapper>
|