id, controller_id, intake_id, rtu_addr, dt, rtu_dt, instant_amount, total_amount, 
    loss_amount, water_press, battery_volt, signal_value, water_price
  
  
  
    
    delete from rm_on_hour_report_history
    where id = #{id,jdbcType=BIGINT}
  
  
    
    insert into rm_on_hour_report_history (id, controller_id, intake_id, 
      rtu_addr, dt, rtu_dt, 
      instant_amount, total_amount, loss_amount, 
      water_press, battery_volt,
      signal_value, water_price)
    values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, 
      #{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP}, 
      #{instantAmount,jdbcType=FLOAT}, #{totalAmount,jdbcType=FLOAT}, #{lossAmount,jdbcType=FLOAT}, 
      #{waterPress,jdbcType=FLOAT}, #{batteryVolt,jdbcType=FLOAT},
      #{signalValue,jdbcType=INTEGER}, #{waterPrice,jdbcType=FLOAT})
  
  
    
    insert into rm_on_hour_report_history
    
      
        id,
      
      
        controller_id,
      
      
        intake_id,
      
      
        rtu_addr,
      
      
        dt,
      
      
        rtu_dt,
      
      
        instant_amount,
      
      
        total_amount,
      
      
        loss_amount,
      
      
        water_press,
      
      
        battery_volt,
      
      
        signal_value,
      
      
        water_price,
      
    
    
      
        #{id,jdbcType=BIGINT},
      
      
        #{controllerId,jdbcType=BIGINT},
      
      
        #{intakeId,jdbcType=BIGINT},
      
      
        #{rtuAddr,jdbcType=VARCHAR},
      
      
        #{dt,jdbcType=TIMESTAMP},
      
      
        #{rtuDt,jdbcType=TIMESTAMP},
      
      
        #{instantAmount,jdbcType=FLOAT},
      
      
        #{totalAmount,jdbcType=FLOAT},
      
      
        #{lossAmount,jdbcType=FLOAT},
      
      
        #{waterPress,jdbcType=FLOAT},
      
      
        #{batteryVolt,jdbcType=FLOAT},
      
      
        #{signalValue,jdbcType=INTEGER},
      
      
        #{waterPrice,jdbcType=FLOAT},
      
    
  
  
    
    update rm_on_hour_report_history
    
      
        controller_id = #{controllerId,jdbcType=BIGINT},
      
      
        intake_id = #{intakeId,jdbcType=BIGINT},
      
      
        rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      
      
        dt = #{dt,jdbcType=TIMESTAMP},
      
      
        rtu_dt = #{rtuDt,jdbcType=TIMESTAMP},
      
      
        instant_amount = #{instantAmount,jdbcType=FLOAT},
      
      
        total_amount = #{totalAmount,jdbcType=FLOAT},
      
      
        loss_amount = #{lossAmount,jdbcType=FLOAT},
      
      
        water_press = #{waterPress,jdbcType=FLOAT},
      
      
        battery_volt = #{batteryVolt,jdbcType=FLOAT},
      
      
        signal_value = #{signalValue,jdbcType=INTEGER},
      
      
        water_price = #{waterPrice,jdbcType=FLOAT},
      
    
    where id = #{id,jdbcType=BIGINT}
  
  
    
    update rm_on_hour_report_history
    set controller_id = #{controllerId,jdbcType=BIGINT},
      intake_id = #{intakeId,jdbcType=BIGINT},
      rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
      dt = #{dt,jdbcType=TIMESTAMP},
      rtu_dt = #{rtuDt,jdbcType=TIMESTAMP},
      instant_amount = #{instantAmount,jdbcType=FLOAT},
      total_amount = #{totalAmount,jdbcType=FLOAT},
      loss_amount = #{lossAmount,jdbcType=FLOAT},
      water_press = #{waterPress,jdbcType=FLOAT},
      battery_volt = #{batteryVolt,jdbcType=FLOAT},
      signal_value = #{signalValue,jdbcType=INTEGER},
      water_price = #{waterPrice,jdbcType=FLOAT}
    where id = #{id,jdbcType=BIGINT}