From fc127750a0fb5433cc4bf12700ffe0482ce819c9 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 25 十月 2024 10:33:33 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
index 9d8fc5e..42a788f 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -1270,7 +1270,12 @@
         SELECT COUNT(*) AS recordCount
         FROM rm_open_close_valve_history his
                  LEFT JOIN pr_intake inta ON inta.id = his.intake_id
-        WHERE op_type  = 1
+        <where>
+            AND op_type  = 1
+            <if test = "clientId != null">
+                AND his.client_id = #{clientId}
+            </if>
+        </where>
     </select>
 
     <!--鑾峰彇鐗╃悊鍗″紑鍏抽榾璁板綍锛屽井淇″皬绋嬪簭浣跨敤-->
@@ -1286,7 +1291,12 @@
             '鍒峰崱寮�闃�' AS openType
         FROM rm_open_close_valve_history his
                  LEFT JOIN pr_intake inta ON inta.id = his.intake_id
-        WHERE op_type  = 1
+        <where>
+            AND op_type  = 1
+            <if test = "clientId != null">
+                AND his.client_id = #{clientId}
+            </if>
+        </where>
         ORDER BY open_dt DESC
         <trim prefix="limit " >
             <if test="start != null and count != null">
@@ -1300,7 +1310,12 @@
         SELECT COUNT(*) AS recordCount
         FROM rm_open_close_valve_history his
                  LEFT JOIN pr_intake inta ON inta.id = his.intake_id
-        WHERE op_type  = 8
+        <where>
+            AND op_type  = 8
+            <if test = "clientId != null">
+                AND his.client_id = #{clientId}
+            </if>
+        </where>
     </select>
 
     <!--鑾峰彇铏氭嫙鍗″紑鍏抽榾璁板綍锛屽井淇″皬绋嬪簭浣跨敤-->
@@ -1320,7 +1335,12 @@
                 END AS openType
         FROM rm_open_close_valve_history his
                  LEFT JOIN pr_intake inta ON inta.id = his.intake_id
-        WHERE op_type  = 8
+        <where>
+            AND op_type  = 8
+            <if test = "clientId != null">
+                AND his.client_id = #{clientId}
+            </if>
+        </where>
         ORDER BY open_dt DESC
         <trim prefix="limit " >
             <if test="start != null and count != null">

--
Gitblit v1.8.0