class Ecs::ReachEvaluationsController < Ecs::BaseController def show preload = { ec_graduation_subitems: { ec_course_support: [:ec_course, :ec_graduation_requirement_calculation] } } @graduation_requirements = current_year.ec_graduation_requirements.includes(preload) respond_to do |format| format.json format.xlsx do filename = "#{current_year.year}届达成度-毕业要求综合评价报表_#{Time.current.strftime('%Y%m%d%H%M%S')}.xlsx" render xlsx: 'show', filename: filename end end end def create end end