因修改被检设备表结构,调整sql

This commit is contained in:
caozehui
2025-02-10 14:19:54 +08:00
parent c045b2921c
commit 1c69b3010b

View File

@@ -9,10 +9,10 @@
<id column="IP" property="devIP" />
<result column="Port" property="port" />
<result column="Dev_Type" property="devType" />
<result column="" property="icdType" />
<result column="Series" property="devCode" />
<result column="Dev_Key" property="devKey" />
<result column="icdType" property="icdType" />
<result column="Dev_Chns" property="devChns" />
<result column="Dev_Volt" property="devVolt" />
<result column="Dev_Curr" property="devCurr" />
@@ -25,20 +25,21 @@
</resultMap>
<select id="selectDevInfo" resultMap="DevResultMap">
SELECT
d.Id,
d.Name,
d.IP,
( select name from pq_dev_type sd where d.Dev_Type= sd.id) as Dev_Type,
d.Port,
d.Dev_Chns as devChns,
d.Series,
d.Dev_Key,
d.Dev_Volt,
d.Dev_Curr,
p.name icdType
d.Id,
d.Name,
d.IP,
d.Port,
t.name as Dev_Type,
d.Series,
d.Dev_Key,
p.name as icdType,
t.Dev_Chns,
t.Dev_Volt,
t.Dev_Curr
FROM
pq_dev d
inner join pq_icd_path p on d.Icd_Id = p.id
pq_dev d
inner join pq_dev_type t on d.Dev_Type = t.id
inner join pq_icd_path p on t.icd = p.id
<where>
<if test="devIds !=null and devIds.size()!=0">
AND d.Id in