|  |  |  | 
|---|
|  |  |  | 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> | 
|---|