From 9c58ad1bbcff068694ea2fcd7fea468bf445a4d3 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 13 二月 2025 16:04:08 +0800
Subject: [PATCH] 通信中间件,启用消息推送测试代码
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml | 127 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 127 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 1380e68..e37d911 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
@@ -10,6 +10,11 @@
order by id ASC
</select>
+ <!-- ======================================= -->
+ <!-- -->
+ <!-- 鍙栨按閲� -->
+ <!-- -->
+ <!-- ====================================== -->
<!-- 鍙栨按鍙e彇姘撮噺鏃ョ粺璁$浉鍏�, 姝QL涓殑 鈥漮rder by id ASC 鈥滀笉鍙慨鏀� -->
<select id="selectOneIntakeAllAmountDay" resultType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay">
select id as id,
@@ -28,6 +33,39 @@
set amount = #{amount, jdbcType=FLOAT}
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="deleteSomeIntakeAmountDay">
+ delete from rm_intake_amount_day where times is null
+ </delete>
+
+ <!-- -->
+ <select id="statisticAllIntakeAmountDayFromOpenCloseValveHistory" resultType="com.dy.pipIrrGlobal.voTmp.VoRmIntakeAmountDay">
+ 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=TIMESTAMP}
+ and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=TIMESTAMP}
+ 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">
@@ -90,4 +128,93 @@
)
</insert>
+
+ <!-- ======================================= -->
+ <!-- -->
+ <!-- 婕忔崯 -->
+ <!-- -->
+ <!-- ====================================== -->
+ <!-- 鍙栨按鍙f紡鎹熸棩缁熻鐩稿叧, 姝QL涓殑 鈥漮rder by id ASC 鈥滀笉鍙慨鏀� -->
+ <select id="selectOneIntakeAllLossDay" resultType="com.dy.pipIrrGlobal.pojoRm.RmLossDay">
+ select id as id,
+ intake_id as intakeId ,
+ dt as dt,
+ loss_amount as lossAmount
+ from rm_loss_day
+ where intake_id = #{intakeId}
+ order by id ASC
+ </select>
+
+ <!-- 淇敼鍙栨按鍙f紡鎹熸棩缁熻 -->
+ <update id="updateOneIntakeLossDay" >
+ update rm_loss_day
+ set loss_amount = #{loss, jdbcType=FLOAT}
+ where id = #{id, jdbcType=BIGINT}
+ </update>
+
+
+
+ <delete id="deleteAllIntakeLossMonth">
+ delete from st_loss_month
+ </delete>
+
+ <!-- -->
+ <select id="statisticAllIntakeLossMonthFromLossDay" resultType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ select intake_id as intakeId ,
+ sum(loss_amount) as amount
+ from rm_loss_day
+ where dt <![CDATA[>=]]> #{startDt, jdbcType=DATE}
+ and dt <![CDATA[<=]]> #{endDt, jdbcType=DATE}
+ group by intake_id
+ </select>
+
+ <insert id="saveOneIntakeLossMonth" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossMonth">
+ <!--@mbg.generated-->
+ insert into st_loss_month (
+ id,
+ intake_id,
+ year,
+ month,
+ amount
+ )
+ values (#{id,jdbcType=BIGINT},
+ #{intakeId,jdbcType=BIGINT},
+ #{year,jdbcType=INTEGER},
+ #{month,jdbcType=INTEGER},
+ #{amount,jdbcType=FLOAT}
+ )
+ </insert>
+
+
+
+ <delete id="deleteAllIntakeLossYear">
+ delete from st_loss_year
+ </delete>
+
+ <!-- -->
+ <select id="statisticAllIntakeLossYearFromLossDay" resultType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ select intake_id as intakeId ,
+ sum(loss_amount) as amount
+ from rm_loss_day
+ where dt <![CDATA[>=]]> #{startDt, jdbcType=DATE}
+ and dt <![CDATA[<=]]> #{endDt, jdbcType=DATE}
+ group by intake_id
+ </select>
+
+ <insert id="saveOneIntakeLossYear" parameterType="com.dy.pipIrrGlobal.pojoSt.StLossYear">
+ <!--@mbg.generated-->
+ insert into st_loss_year (
+ id,
+ intake_id,
+ year,
+ amount
+ )
+ values (#{id,jdbcType=BIGINT},
+ #{intakeId,jdbcType=BIGINT},
+ #{year,jdbcType=INTEGER},
+ #{amount,jdbcType=FLOAT}
+ )
+ </insert>
+
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0