class ReachCriteriaController < Ecs::BaseController
  before_action :check_major_manager_permission!, only: [:create]

  def create
    reach_criteria = params[:reach_criteria].to_f

    if reach_criteria.zero?
      render_error('必须大于0')
      return
    end

    current_year.update!(calculation_value: reach_criteria)

    render_ok
  end
end