From fcfda1f9a273088aa0de118b44542244a58a9e9c Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 10 May 2019 17:11:53 +0800 Subject: [PATCH] fix export school statistic xls empty bug --- app/views/managements/schools/statistics_xlsx.xlsx.axlsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/managements/schools/statistics_xlsx.xlsx.axlsx b/app/views/managements/schools/statistics_xlsx.xlsx.axlsx index 85f28531..a451586d 100644 --- a/app/views/managements/schools/statistics_xlsx.xlsx.axlsx +++ b/app/views/managements/schools/statistics_xlsx.xlsx.axlsx @@ -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 \ No newline at end of file