json.history_attendances @history_attendances.each_with_index.to_a do |attendance, index| json.(attendance, :name, :attendance_date, :start_time, :end_time, :normal_rate, :absence_rate, :leave_rate) json.index "签到#{index + 1}" end json.all_history_count @all_history_count json.avg_normal_rate @avg_normal_rate json.avg_absence_rate @avg_absence_rate json.avg_leave_rate @avg_leave_rate