json.data do json.array! @sale_plans do |d| json.id d.id json.staff d.staff.user.real_name json.business_name d.business.name json.department d.business.department&.name json.school d.business.department&.school&.name json.month d.month.strftime("%Y-%m") json.weekly d.weekly json.business_id d.business_id json.content d.content.truncate(30) json.follow_ups_count d.business.follow_ups_count json.finish_rate "#{d.finish_rate}%" json.updated_at d.updated_at.to_s end end json.code 0 json.count @sale_plans.total_count