From 4d5a0213352c1e5fd9410241668cbd06ea47e4c6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 18 四月 2025 14:56:30 +0800
Subject: [PATCH] 拉力机数采

---
 cnas-device/src/main/resources/mapper/DataConfigMapper.xml |   38 +++++++++++++++++++++++++++++++++++---
 1 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/cnas-device/src/main/resources/mapper/DataConfigMapper.xml b/cnas-device/src/main/resources/mapper/DataConfigMapper.xml
index c9c97e9..660ff9d 100644
--- a/cnas-device/src/main/resources/mapper/DataConfigMapper.xml
+++ b/cnas-device/src/main/resources/mapper/DataConfigMapper.xml
@@ -19,8 +19,6 @@
                d.storage_url,
                d.ip,
                d.port,
-               d.imported_channel,
-               d.imported_parts,
                d.channel,
                d.entrust_code,
                d.sample_code,
@@ -38,7 +36,9 @@
                ddc.another_name,
                ddc.matching_name,
                ddc.id,
-               ip.id                                                                          structureItemParameterId
+               ip.id                                                                          structureItemParameterId ,
+               ddc.imported_parts,
+               ddc.imported_channel
         FROM device d
                  left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids)
                  left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
@@ -51,4 +51,36 @@
                  left join structure_item_parameter ip on not FIND_IN_SET(ip.id, d.ins_product_ids)
                  inner join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
     </select>
+    <select id="selectDataConfigListTwo" resultType="com.ruoyi.device.dto.DeviceConfigDtoPage">
+        SELECT d.device_name,
+               d.file_type,
+               d.collect_url,
+               d.storage_url,
+               d.ip,
+               d.port,
+               d.channel,
+               d.entrust_code,
+               d.sample_code,
+               d.db_file_name,
+               ip.inspection_item,
+               ip.inspection_item_class,
+               if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '',
+                  ip.inspection_item_subclass, ip.inspection_item)                            inspection_item_subclass,
+               ip.sample,
+               ddc.formula,
+               ddc.referx,
+               ddc.refery,
+               ddc.x,
+               ddc.y,
+               ddc.another_name,
+               ddc.matching_name,
+               ddc.id,
+               ip.id                                                                          structureItemParameterId ,
+               ddc.imported_parts,
+               ddc.imported_channel
+        FROM device d
+                 left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids)
+                 left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
+        where d.device_name = #{deviceName} and d.management_number = #{managementNumber}
+    </select>
 </mapper>

--
Gitblit v1.9.3