fix export school statistic xls empty bug

dev_ec
p31729568 6 years ago
parent fbf86d64dc
commit fcfda1f9a2

@ -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
Loading…
Cancel
Save