From bbe7acfbe5a4c08d6edc91eaf81dcecf9d630e18 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期日, 15 十二月 2024 15:10:50 +0800
Subject: [PATCH] collectQuality

---
 iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 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 9371aa9..344c0f9 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
@@ -26,9 +26,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
@@ -63,6 +67,9 @@
             </if>
             <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
@@ -236,4 +243,29 @@
         </where>
     </select>
 
+    <select id="getCumulatePoint" resultType="com.iailab.module.data.point.dto.DaPointDTO">
+        SELECT
+        t1.point_no,
+        t1.point_name,
+        t1.default_value,
+        t1.point_type,
+        t1.data_type,
+        t1.store_type,
+        t1.minfreqid,
+        t2.moment_point,
+        t2.length,
+        t2.divisor
+        FROM t_da_point t1
+        LEFT JOIN t_da_cumulate_point t2 ON t2.point_id = t1.id
+        <where>
+            t1.point_type =  #{pointType}
+            <if test="isEnable != null">
+                AND t1.is_enable = #{isEnable}
+            </if>
+            <if test="minfreqid != null and minfreqid != ''">
+                AND t1.minfreqid = #{minfreqid}
+            </if>
+        </where>
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3