|  |  |  | 
|---|
|  |  |  | 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"> | 
|---|
|  |  |  | delete from st_intake_amount_month | 
|---|