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/RmOnHourReportLastMapper.xml |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
index d6dbe83..7f1859a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
@@ -285,11 +285,13 @@
 
     <!--鑾峰彇绱娴侀噺瓒呰繃鎸囧畾鍊肩殑鍙栨按鍙�-->
     <select id="getLargeFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow">
-        SELECT inta.id                                  AS intakeId,
-               inta.name                                AS intakeNum,
-               blo.name                                 AS blockName,
-               CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow,
-               hou.dt                                   AS getDate
+        SELECT inta.id            AS intakeId,
+               inta.name          AS intakeNum,
+               inta.lng           AS lng,
+               inta.lat           AS lat,
+               blo.name           AS blockName,
+               hou.total_amount   AS cumulativeFlow,
+               hou.dt             AS getDate
         FROM pr_intake inta
                  INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
                  INNER JOIN ba_block blo ON blo.id = inta.blockId
@@ -317,10 +319,11 @@
     <select id="getSmallFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow">
         SELECT inta.id   AS intakeId,
                inta.name AS intakeNum,
+               inta.lng  AS lng,
+               inta.lat  AS lat,
                blo.name  AS blockName,
-        <!--    FORMAT(hou.total_amount,2) AS cumulativeFlow,-->
-        CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow,
-        hou.dt                                   AS getDate
+               hou.total_amount AS cumulativeFlow,
+               hou.dt    AS getDate
         FROM pr_intake inta
                  INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id
                  INNER JOIN ba_block blo ON blo.id = inta.blockId
@@ -450,5 +453,10 @@
 <!--            OR rohrl.rtu_dt &gt; #{timeStop}-->
 <!--        </if>-->
         ORDER BY rtu_dt ASC
+        <trim prefix="limit ">
+            <if test="start != null and count != null">
+                #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+            </if>
+        </trim>
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0