From 8bf5531fcc2566bd932216e1a8dafab2a59f4f78 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 23 十二月 2024 15:58:46 +0800
Subject: [PATCH] sampleInfo.setPlanMap 统一获取计划数据的信息,避免重复查询

---
 iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml
index a6cb801..8e67c76 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml
+++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml
@@ -68,6 +68,9 @@
             <if test="params.isEnable != null ">
                 and t1.is_enable = #{params.isEnable}
             </if>
+            <if test="params.collectQuality != null and params.collectQuality != ''">
+                and t6.collect_quality = #{params.collectQuality}
+            </if>
         </where>
         order by t1.create_time desc, t1.point_no desc
     </select>
@@ -95,9 +98,13 @@
         t3.source_name,
         t2.tag_no,
         t2.dimension,
-        t2.value_type
+        t2.value_type,
+        t6.collect_value,
+        t6.collect_quality,
+        t6.collect_time
         from t_da_point t1
         left join t_da_measure_point t2 on t2.point_id = t1.id
+        left join t_da_point_collect_status t6 on t6.point_no = t1.point_no
         left join (
         select id source_id,server_name source_name
         from t_channel_opcua_device
@@ -133,6 +140,9 @@
             <if test="isEnable != null ">
                 and t1.is_enable = #{isEnable}
             </if>
+            <if test="collectQuality != null and collectQuality != ''">
+                and t6.collect_quality = #{collectQuality}
+            </if>
         </where>
         order by t1.create_time desc, t1.point_no desc
     </select>

--
Gitblit v1.9.3