|
|
@ -45,7 +45,7 @@ class Admins::SchoolDailyStatisticService < ApplicationService
|
|
|
|
courses = Course.where(is_delete: 0, school_id: ids).group('school_id')
|
|
|
|
courses = Course.where(is_delete: 0, school_id: ids).group('school_id')
|
|
|
|
course_map = courses.count
|
|
|
|
course_map = courses.count
|
|
|
|
Rails.logger.info("####courses_daiao: #{courses.inspect}")
|
|
|
|
Rails.logger.info("####courses_daiao: #{courses.inspect}")
|
|
|
|
nearly_course_time_map = courses.joins(:course_acts).maximum('course_activities.updated_at')
|
|
|
|
nearly_course_time_map = courses.joins(:course_activities).maximum('course_activities.updated_at')
|
|
|
|
active_course_map = courses.where(is_end: false).count
|
|
|
|
active_course_map = courses.where(is_end: false).count
|
|
|
|
|
|
|
|
|
|
|
|
shixun_map = Shixun.joins(user: :user_extension).where(user_extensions: { identity: :teacher, school_id: ids })
|
|
|
|
shixun_map = Shixun.joins(user: :user_extension).where(user_extensions: { identity: :teacher, school_id: ids })
|
|
|
|