From f4b840c5374dd3cd916a656396818a96d25a631b Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期一, 16 十二月 2024 10:24:58 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml |   93 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 93 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
new file mode 100644
index 0000000..1380e68
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/Temp4ChangeMapper.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoTmp.ChangeMapper">
+
+    <!-- 鏌ヨ鍑烘墍鏈夊彇姘村彛 -->
+    <select id="selectAllPrIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoIntake">
+        select id as intakeId,
+               name as intakeNum
+        from  pr_intake
+        order by id ASC
+    </select>
+
+    <!-- 鍙栨按鍙e彇姘撮噺鏃ョ粺璁$浉鍏�, 姝QL涓殑 鈥漮rder by id ASC 鈥滀笉鍙慨鏀� -->
+    <select id="selectOneIntakeAllAmountDay" resultType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmountDay">
+        select id as id,
+               intake_id as intakeId ,
+               dt as dt,
+               amount as amount,
+               total_amount_last as totalAmountLast
+        from  rm_intake_amount_day
+        where intake_id = #{intakeId}
+        order by id ASC
+    </select>
+
+    <!-- 淇敼鍙栨按鍙e彇姘撮噺鏃ョ粺璁� -->
+    <update id="updateOneIntakeAmountDay" >
+        update rm_intake_amount_day
+        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