From 86eba8eaec4494bf29657333ea7b0385cb818578 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 29 七月 2025 14:38:51 +0800
Subject: [PATCH] 修改用水户年用水量统计查询中的bug

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 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 f27912b..303e180 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -696,11 +696,9 @@
             FROM rm_open_close_valve_history his
             WHERE his.client_id = cli.id
             <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
-                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
+                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
             </if>
-            <if test="openCount != null">
-                > #{openCount}
-            </if>
+            ) > #{openCount}
         </where>
     </select>
 
@@ -725,12 +723,10 @@
             (SELECT COUNT(*)
             FROM rm_open_close_valve_history his
             WHERE his.client_id = cli.id
-            <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
-                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
+            <if test="timeStart != null and timeStart != '' and timeStop != null">
+                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
             </if>
-            <if test="openCount != null">
-                > #{openCount}
-            </if>
+            ) > #{openCount}
         </where>
         ORDER BY cli.id
         <trim prefix="limit ">
@@ -749,10 +745,10 @@
             FROM rm_open_close_valve_history his
             WHERE his.client_id = cli.id
             <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
-                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
+                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
             </if>
             <if test="openCount != null">
-                &lt; #{openCount}
+                ) &lt; #{openCount}
             </if>
         </where>
     </select>
@@ -779,7 +775,7 @@
             FROM rm_open_close_valve_history his
             WHERE his.client_id = cli.id
             <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
-                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
+                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
             </if>
             <if test="openCount != null">
                 &lt; #{openCount}

--
Gitblit v1.8.0