|
|
|
@ -4,9 +4,9 @@ wb.add_worksheet(name: '统计总表') do |sheet|
|
|
|
|
|
|
|
|
|
|
@schools.each do |school|
|
|
|
|
|
sheet.add_row([
|
|
|
|
|
school['id'].to_s, school['name'].to_s, (school['teacher_count'] || 0).to_s, (school['student_count'] || 0).to_s,
|
|
|
|
|
(school['course_count'] || 0).to_s, (school['active_course_count'] || 0).to_s, (school['homework_count'] || 0).to_s,
|
|
|
|
|
(school['other_homework_count'] || 0).to_s, format_time(school['nearly_course_time'])
|
|
|
|
|
school[:id].to_s, school[:name].to_s, (school[:teacher_count] || 0).to_s, (school[:student_count] || 0).to_s,
|
|
|
|
|
(school[:course_count] || 0).to_s, (school[:active_course_count] || 0).to_s, (school[:homework_count] || 0).to_s,
|
|
|
|
|
(school[:other_homework_count] || 0).to_s, format_time(school[:nearly_course_time])
|
|
|
|
|
])
|
|
|
|
|
end
|
|
|
|
|
end
|