foreach ($resolutions as $resolution) { $reso_id_value[$resolution->id] = $resolution->value; } $reasons = Bll_DdCommonBiz::get_instance()->get_reasons(); $reason_ids = array(); foreach ($reasons as $reason) { $reason_ids[$reason->id] = $reason->id; } $departments = Bll_DdCommonBiz::get_instance()->get_departments_new(); //get the department,eg:用户端,客户端 $days_arr = array(7, 14, 21, 28); //7=>上周, 14=>上上周, $time_class = new DealTime(); $current_time = date("Y-m-d H:i:s"); foreach ($days_arr as $days) { $time_arr = $time_class->get_past_week_time_by_days($days); $time_arr['current_time'] = $current_time; $week = $time_arr['week']; $begin = $time_arr['begin']; $end = $time_arr['end']; foreach ($departments as $depart) { //component counts,according to the department_id $components = Bll_DdComponentBiz::get_instance()->get_components($depart->id); $comp_id_value = array(); foreach ($components as $component) { $comp_id_value[$component->int] = $component->int; } //get all created at production and test counts $tickets_all_created = Bll_TicketBiz::get_instance()->get_created_counts_online_tickets($begin, $end, 'all', $depart->id); if ($tickets_all_created) { $count_created = count($tickets_all_created);