From d2b83e3617bfc819b2ceb4658b24124e6146bfa3 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期六, 21 十二月 2024 11:01:59 +0800 Subject: [PATCH] 优化接口 删除流浪控制器,没有删除内容也显示成功 rtu增加 梅江备份config.xml文件 --- 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