json.data do json.array! @data do |item| json.id item['id'] json.staff_id item['staff_id'] json.name item['name'] json.school_tag_id item['school_tag_id'] json.school_tag_name item['school_tag_name'] json.target_clazz item['target_clazz'] json.target_1 item['target_1'].present? ? item['target_1'].round(2) : 0 json.target_2 item['target_2'].present? ? item['target_2'].round(2) : 0 json.target_3 item['target_3'].present? ? item['target_3'].round(2) : 0 json.target_4 item['target_4'].present? ? item['target_4'].round(2) : 0 json.target_5 item['target_5'].present? ? item['target_5'].round(2) : 0 json.target_6 item['target_6'].present? ? item['target_6'].round(2) : 0 json.target_7 item['target_7'].present? ? item['target_7'].round(2) : 0 json.target_8 item['target_8'].present? ? item['target_8'].round(2) : 0 json.target_9 item['target_9'].present? ? item['target_9'].round(2) : 0 json.target_10 item['target_10'].present? ? item['target_10'].round(2) : 0 json.target_11 item['target_11'].present? ? item['target_11'].round(2) : 0 json.target_12 item['target_12'].present? ? item['target_12'].round(2) : 0 json.finish_1 item['finish_1'].present? ? item['finish_1'].round(2) : 0 json.finish_2 item['finish_2'].present? ? item['finish_2'].round(2) : 0 json.finish_3 item['finish_3'].present? ? item['finish_3'].round(2) : 0 json.finish_4 item['finish_4'].present? ? item['finish_4'].round(2) : 0 json.finish_5 item['finish_5'].present? ? item['finish_5'].round(2) : 0 json.finish_6 item['finish_6'].present? ? item['finish_6'].round(2) : 0 json.finish_7 item['finish_7'].present? ? item['finish_7'].round(2) : 0 json.finish_8 item['finish_8'].present? ? item['finish_8'].round(2) : 0 json.finish_9 item['finish_9'].present? ? item['finish_9'].round(2) : 0 json.finish_10 item['finish_10'].present? ? item['finish_10'].round(2) : 0 json.finish_11 item['finish_11'].present? ? item['finish_11'].round(2) : 0 json.finish_12 item['finish_12'].present? ? item['finish_12'].round(2) : 0 json.plan_1 item['plan_1'].present? ? item['plan_1'].round(2) : 0 json.plan_2 item['plan_2'].present? ? item['plan_2'].round(2) : 0 json.plan_3 item['plan_3'].present? ? item['plan_3'].round(2) : 0 json.plan_4 item['plan_4'].present? ? item['plan_4'].round(2) : 0 json.plan_5 item['plan_5'].present? ? item['plan_5'].round(2) : 0 json.plan_6 item['plan_6'].present? ? item['plan_6'].round(2) : 0 json.plan_7 item['plan_7'].present? ? item['plan_7'].round(2) : 0 json.plan_8 item['plan_8'].present? ? item['plan_8'].round(2) : 0 json.plan_9 item['plan_9'].present? ? item['plan_9'].round(2) : 0 json.plan_10 item['plan_10'].present? ? item['plan_10'].round(2) : 0 json.plan_11 item['plan_11'].present? ? item['plan_11'].round(2) : 0 json.plan_12 item['plan_12'].present? ? item['plan_12'].round(2) : 0 json.year_target 0 json.year_clazz_target ((item['target_1'].present? ? item['target_1'].round(2) : 0)+(item['target_2'].present? ? item['target_2'].round(2) : 0)+(item['target_3'].present? ? item['target_3'].round(2) : 0)+(item['target_4'].present? ? item['target_4'].round(2) : 0)+(item['target_5'].present? ? item['target_5'].round(2) : 0)+(item['target_6'].present? ? item['target_6'].round(2) : 0)+(item['target_7'].present? ? item['target_7'].round(2) : 0)+(item['target_8'].present? ? item['target_8'].round(2) : 0)+(item['target_9'].present? ? item['target_9'].round(2) : 0)+(item['target_10'].present? ? item['target_10'].round(2) : 0)+(item['target_11'].present? ? item['target_11'].round(2) : 0)+(item['target_12'].present? ? item['target_12'].round(2) : 0)).round(2) json.year_plan item['year_plan'].round(2) json.year_finish ((item['finish_1'].present? ? item['finish_1'].round(2) : 0)+(item['finish_2'].present? ? item['finish_2'].round(2) : 0)+(item['finish_3'].present? ? item['finish_3'].round(2) : 0)+(item['finish_4'].present? ? item['finish_4'].round(2) : 0)+(item['finish_5'].present? ? item['finish_5'].round(2) : 0)+(item['finish_6'].present? ? item['finish_6'].round(2) : 0)+(item['finish_7'].present? ? item['finish_7'].round(2) : 0)+(item['finish_8'].present? ? item['finish_8'].round(2) : 0)+(item['finish_9'].present? ? item['finish_9'].round(2) : 0)+(item['finish_10'].present? ? item['finish_10'].round(2) : 0)+(item['finish_11'].present? ? item['finish_11'].round(2) : 0)+(item['finish_12'].present? ? item['finish_12'].round(2) : 0)).round(2) json.year_diff ((item['target_1'].present? ? item['target_1'].round(2) : 0)+(item['target_2'].present? ? item['target_2'].round(2) : 0)+(item['target_3'].present? ? item['target_3'].round(2) : 0)+(item['target_4'].present? ? item['target_4'].round(2) : 0)+(item['target_5'].present? ? item['target_5'].round(2) : 0)+(item['target_6'].present? ? item['target_6'].round(2) : 0)+(item['target_7'].present? ? item['target_7'].round(2) : 0)+(item['target_8'].present? ? item['target_8'].round(2) : 0)+(item['target_9'].present? ? item['target_9'].round(2) : 0)+(item['target_10'].present? ? item['target_10'].round(2) : 0)+(item['target_11'].present? ? item['target_11'].round(2) : 0)+(item['target_12'].present? ? item['target_12'].round(2) : 0)) - ((item['finish_1'].present? ? item['finish_1'].round(2) : 0)+(item['finish_2'].present? ? item['finish_2'].round(2) : 0)+(item['finish_3'].present? ? item['finish_3'].round(2) : 0)+(item['finish_4'].present? ? item['finish_4'].round(2) : 0)+(item['finish_5'].present? ? item['finish_5'].round(2) : 0)+(item['finish_6'].present? ? item['finish_6'].round(2) : 0)+(item['finish_7'].present? ? item['finish_7'].round(2) : 0)+(item['finish_8'].present? ? item['finish_8'].round(2) : 0)+(item['finish_9'].present? ? item['finish_9'].round(2) : 0)+(item['finish_10'].present? ? item['finish_10'].round(2) : 0)+(item['finish_11'].present? ? item['finish_11'].round(2) : 0)+(item['finish_12'].present? ? item['finish_12'].round(2) : 0)).round(2) end end json.code 0 json.count @total_count