From 79b161aff2a917da831bcc4711cc33e6bdb9f6f1 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期一, 28 十月 2024 10:36:10 +0800
Subject: [PATCH] 2024-10-28 程序优化
---
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