|
|
|
@ -26,13 +26,13 @@ class StatisticSchoolDailyReportTask
|
|
|
|
|
.where(homework_type: 4, created_at: yesterday).count
|
|
|
|
|
|
|
|
|
|
# 新增实训评测数量
|
|
|
|
|
# shixun_evaluate_count = EvaluateRecord.joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id')
|
|
|
|
|
# .joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4')
|
|
|
|
|
# .joins('LEFT JOIN members ON members.user_id = evaluate_records.user_id')
|
|
|
|
|
# .joins('LEFT JOIN courses ON members.course_id = courses.id AND hc.course_id = courses.id')
|
|
|
|
|
# .where(courses: { school_id: school.id })
|
|
|
|
|
# .where(created_at: yesterday).reorder(nil).count
|
|
|
|
|
shixun_evaluate_count = 0
|
|
|
|
|
shixun_evaluate_count = EvaluateRecord.joins('LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id')
|
|
|
|
|
.joins('LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4')
|
|
|
|
|
.joins('LEFT JOIN members ON members.user_id = evaluate_records.user_id')
|
|
|
|
|
.joins('LEFT JOIN courses ON members.course_id = courses.id AND hc.course_id = courses.id')
|
|
|
|
|
.where(courses: { school_id: school.id })
|
|
|
|
|
.where(created_at: yesterday).reorder(nil).count
|
|
|
|
|
# shixun_evaluate_count = 0
|
|
|
|
|
|
|
|
|
|
# 无有效数据时不记录
|
|
|
|
|
data = [teacher_count, student_count, professional_count, course_count, shixun_count, active_user_count,
|
|
|
|
|