|
|
|
@ -4,8 +4,8 @@ class Managements::SchoolsController < Managements::BaseController
|
|
|
|
|
|
|
|
|
|
def statistics
|
|
|
|
|
@sub_type = 1
|
|
|
|
|
params[:sort_by] = :teacher_count if params[:sort_by].blank?
|
|
|
|
|
params[:sort_direction] = :desc if params[:sort_direction].blank?
|
|
|
|
|
params[:sort_by] = params[:sort_by].presence || :teacher_count
|
|
|
|
|
params[:sort_direction] = params[:sort_direction].presence || :desc
|
|
|
|
|
|
|
|
|
|
service = Management::SchoolReportService.new(params)
|
|
|
|
|
@obj_count, @schools = service.call
|
|
|
|
@ -20,8 +20,8 @@ class Managements::SchoolsController < Managements::BaseController
|
|
|
|
|
def data_grow
|
|
|
|
|
@sub_type = 2
|
|
|
|
|
params[:data_type] ||= 'grow'
|
|
|
|
|
params[:sort_by] = :teacher_increase_count if params[:sort_by].blank?
|
|
|
|
|
params[:sort_direction] = :desc if params[:sort_direction].blank?
|
|
|
|
|
params[:sort_by] = params[:sort_by].presence || :teacher_increase_count
|
|
|
|
|
params[:sort_direction] = params[:sort_direction].presence || :desc
|
|
|
|
|
|
|
|
|
|
service = Management::SchoolDataGrowService.new(params)
|
|
|
|
|
@grow_summary = service.grow_summary
|
|
|
|
@ -31,7 +31,7 @@ class Managements::SchoolsController < Managements::BaseController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def data_contrast
|
|
|
|
|
params[:contrast_column] = :teacher_increase_count if params[:contrast_column].blank?
|
|
|
|
|
params[:contrast_column] = params[:contrast_column].presence || :teacher_increase_count
|
|
|
|
|
params[:sort_direction] ||= :desc
|
|
|
|
|
params[:sort_by] = :percentage
|
|
|
|
|
|
|
|
|
|