From f7c748120263ee6fbed1b137cbd7dad64e249c02 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 11 一月 2025 12:41:34 +0800
Subject: [PATCH] 1、通信中间件中,取水口日取水量统计重新实现,统计数据来源只采用关阀报,不再采用工作报和开阀报了; 2、临时任务中,增加统计取水口是取水量统计。

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
index 6fe1f39..4e2d3ea 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
@@ -34,6 +34,39 @@
         where id = #{id, jdbcType=BIGINT}
     </update>
 
+    <update id="updateOneIntakeAmountDay1" >
+        update rm_intake_amount_day
+        set amount = #{amount, jdbcType=FLOAT},
+        money = #{money, jdbcType=FLOAT},
+        times = #{times, jdbcType=INTEGER}
+        where intake_id = #{intakeId, jdbcType=BIGINT}
+        and dt = #{dt, jdbcType=DATE}
+    </update>
+
+
+    <delete id="deleteAllIntakeAmountDay">
+        delete from rm_intake_amount_day
+    </delete>
+
+    <!--  -->
+    <select id="statisticAllIntakeAmountDayFromOpenCloseValveHistory" resultType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay">
+        select intake_id as intakeId ,
+        sum(cl_this_amount) as amount,
+        sum(cl_this_money) as money,
+        count(id) as times
+        from  rm_open_close_valve_history
+        where cl_dt <![CDATA[>=]]> #{startDt, jdbcType=DATE}
+        and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=DATE}
+        group by intake_id
+    </select>
+    <select id="selectStIntakeDayStatisticsByDate" resultType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay">
+        select *
+        from  rm_intake_amount_day
+        where rm_intake_amount_day.intake_id = #{intakeId, jdbcType=BIGINT}
+        and dt = #{date, jdbcType=DATE}
+    </select>
+
+
 
     <delete id="deleteAllIntakeAmountMonth">
         delete from st_intake_amount_month

--
Gitblit v1.8.0