id, last_history_id, intake_id, dt, amount, money, times, dt_last, rtu_addr_last, controller_id_last, total_amount_last,
    rtu_dt_last
  
  
  
  
    
    delete from rm_intake_amount_day_last
    where id = #{id,jdbcType=BIGINT}
  
  
    
    insert into rm_intake_amount_day_last (id, last_history_id, intake_id, dt,
      amount, money, times, dt_last,
      rtu_addr_last, controller_id_last, total_amount_last, 
      rtu_dt_last)
    values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{dt,jdbcType=DATE},
      #{amount,jdbcType=DOUBLE}, #{money,jdbcType=DOUBLE},#{times,jdbcType=INTEGER},
      #{dtLast,jdbcType=TIMESTAMP},
      #{rtuAddrLast,jdbcType=VARCHAR}, #{controllerIdLast,jdbcType=BIGINT}, #{totalAmountLast,jdbcType=FLOAT}, 
      #{rtuDtLast,jdbcType=TIMESTAMP})
  
  
    
    insert into rm_intake_amount_day_last
    
      
        id,
      
      
        last_history_id,
      
      
        intake_id,
      
      
        dt,
      
      
        amount,
      
      
        money,
      
      
        times,
      
      
        dt_last,
      
      
        rtu_addr_last,
      
      
        controller_id_last,
      
      
        total_amount_last,
      
      
        rtu_dt_last,
      
    
    
      
        #{id,jdbcType=BIGINT},
      
      
        #{lastHistoryId,jdbcType=BIGINT},
      
      
        #{intakeId,jdbcType=BIGINT},
      
      
        #{dt,jdbcType=DATE},
      
      
        #{amount,jdbcType=DOUBLE},
      
      
        #{money,jdbcType=DOUBLE},
      
      
        #{times,jdbcType=INTEGER},
      
      
        #{dtLast,jdbcType=TIMESTAMP},
      
      
        #{rtuAddrLast,jdbcType=VARCHAR},
      
      
        #{controllerIdLast,jdbcType=BIGINT},
      
      
        #{totalAmountLast,jdbcType=FLOAT},
      
      
        #{rtuDtLast,jdbcType=TIMESTAMP},
      
    
  
  
    
    update rm_intake_amount_day_last
    
      
        last_history_id = #{lastHistoryId,jdbcType=BIGINT},
      
     
        intake_id = #{intakeId,jdbcType=BIGINT},
      
      
        dt = #{dt,jdbcType=DATE},
      
      
        amount = #{amount,jdbcType=DOUBLE},
      
      
        money = #{money,jdbcType=DOUBLE},
      
      
        times = #{times,jdbcType=INTEGER},
      
      
        dt_last = #{dtLast,jdbcType=TIMESTAMP},
      
      
        rtu_addr_last = #{rtuAddrLast,jdbcType=VARCHAR},
      
      
        controller_id_last = #{controllerIdLast,jdbcType=BIGINT},
      
      
        total_amount_last = #{totalAmountLast,jdbcType=FLOAT},
      
      
        rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP},
      
    
    where id = #{id,jdbcType=BIGINT}
  
  
    
    update rm_intake_amount_day_last
    set last_history_id = #{lastHistoryId,jdbcType=BIGINT},
      intake_id = #{intakeId,jdbcType=BIGINT},
      dt = #{dt,jdbcType=DATE},
      amount = #{amount,jdbcType=DOUBLE},
      money = #{money,jdbcType=DOUBLE},
      times = #{times,jdbcType=INTEGER},
      dt_last = #{dtLast,jdbcType=TIMESTAMP},
      rtu_addr_last = #{rtuAddrLast,jdbcType=VARCHAR},
      controller_id_last = #{controllerIdLast,jdbcType=BIGINT},
      total_amount_last = #{totalAmountLast,jdbcType=FLOAT},
      rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}