From a15a8cfd7b01ce4bba6fe9fd876f6704ca23a12d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 07 一月 2025 16:40:32 +0800
Subject: [PATCH] 1、取水口用水日统计表中增加金额、次数字段; 2、优化或重写“累计流量超过指定值的取水口”、“累计流量低于指定值的取水口”、“指定时间段内用水量超过指定值的取水口”、“指定时间段内消费金额超过指定值的取水口”几个统计查询; 3、改“指定时间段内用水时长超过指定值的取水口”为“指定时间段内用水次数超过指定值的取水口”

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml
index 96d940c..f025aee 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml
@@ -133,15 +133,15 @@
     FROM pr_intake_controller
     <where>
       <if test = "intakeId != null and intakeId > 0">
-        AND intakeId = ${intakeId}
+        AND intakeId = #{intakeId,jdbcType=BIGINT}
       </if>
 
       <if test = "controllerId != null and controllerId > 0">
-        AND controllerId = ${controllerId}
+        AND controllerId = #{controllerId,jdbcType=BIGINT}
       </if>
 
       <if test = "operateType != null and operateType > 0">
-        AND operateType = ${operateType}
+        AND operateType = #{operateType,jdbcType=BIGINT}
       </if>
     </where>
   </select>
@@ -153,16 +153,16 @@
         <!--con.code AS controllerCode,-->
         con.rtuAddr,
         (CASE
-            WHEN ic.operateType = 1 THEN "缁戝畾"
-            WHEN ic.operateType = 2 THEN "瑙g粦"
+            WHEN ic.operateType = 1 THEN '缁戝畾'
+            WHEN ic.operateType = 2 THEN '瑙g粦'
         END) AS operateType,
         ic.operateDt
     FROM pr_intake inta
         INNER JOIN pr_intake_controller ic ON inta.id= ic.intakeId
         INNER JOIN ba_user user ON ic.operator = user.id
         INNER JOIN pr_controller con ON ic.controllerId = con.id
-    <if test = "intakeId != null and intakeId > 0">
-      AND inta.id = ${intakeId}
+    <if test = "intakeId != null">
+      AND inta.id = #{intakeId,jdbcType=BIGINT}
     </if>
     ORDER BY ic.operateDt DESC
   </select>
@@ -171,8 +171,8 @@
   <select id="getBindsByControllerId" resultType="java.util.Map">
     SELECT
         (CASE
-            WHEN ic.operateType = 1 THEN "缁戝畾"
-            WHEN ic.operateType = 2 THEN "瑙g粦"
+            WHEN ic.operateType = 1 THEN '缁戝畾'
+            WHEN ic.operateType = 2 THEN '瑙g粦'
         END) AS operateType,
         inta.name AS intakeName,
         user.name AS userName,
@@ -181,11 +181,13 @@
         INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id
         INNER JOIN pr_intake inta ON ic.intakeId = inta.id
         INNER JOIN ba_user user ON ic.operator = user.id
-    <if test = "controllerId != null and controllerId > 0">
-      AND con.id = ${controllerId}
+    <if test = "controllerId != null">
+      AND con.id = #{controllerId,jdbcType=BIGINT}
     </if>
     ORDER BY ic.operateDt DESC
   </select>
+
+
   <!--鏍规嵁鍙栨按鍙g紪鍙蜂慨鏀圭粦瀹氳褰曞垪琛�-->
   <update id="updateByIntakeSelective">
     update pr_intake_controller

--
Gitblit v1.8.0