From 325180b7de27e486b5427d1918078b0e4f5bbab9 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期一, 16 十二月 2024 10:31:54 +0800
Subject: [PATCH] 优化接口 获得全部取水口 重构返回结构,增加片区名称字段、增加县镇村名称字段
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml | 62 +++++++++++++++++++++++++++++++
1 files changed, 62 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 2c0bfcd..1380e68 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
@@ -28,4 +28,66 @@
set amount = #{amount, jdbcType=FLOAT}
where id = #{id, jdbcType=BIGINT}
</update>
+
+
+ <delete id="deleteAllIntakeAmountMonth">
+ delete from st_intake_amount_month
+ </delete>
+
+ <!-- -->
+ <select id="statisticAllIntakeAmountMonthFromAmountDay" resultType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ select intake_id as intakeId ,
+ sum(amount) as amount
+ from rm_intake_amount_day
+ where dt <![CDATA[>=]]> #{startDt, jdbcType=DATE}
+ and dt <![CDATA[<=]]> #{endDt, jdbcType=DATE}
+ group by intake_id
+ </select>
+
+ <insert id="saveOneIntakeAmountMonth" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_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="deleteAllIntakeAmountYear">
+ delete from st_intake_amount_year
+ </delete>
+
+ <!-- -->
+ <select id="statisticAllIntakeAmountYearFromAmountDay" resultType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ select intake_id as intakeId ,
+ sum(amount) as amount
+ from rm_intake_amount_day
+ where dt <![CDATA[>=]]> #{startDt, jdbcType=DATE}
+ and dt <![CDATA[<=]]> #{endDt, jdbcType=DATE}
+ group by intake_id
+ </select>
+
+ <insert id="saveOneIntakeAmountYear" parameterType="com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear">
+ <!--@mbg.generated-->
+ insert into st_intake_amount_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