Esempio n. 1
0
$comp_id_value = array();
foreach ($components as $component) {
    $comp_id_value[$component->int] = $component->int;
}
$count_pc_component = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr, 'pc', 'component', $comp_id_value, 1);
//1=>新增线上bug
if (!$count_pc_component) {
    echo "insert count_id_pc component data error";
}
$count_mobile_component = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr, 'pc', 'component', $comp_id_value, 1);
//1=>新增线上bug
if (!$count_mobile_component) {
    echo "insert count_id_moblie resolution data error";
}
$count_pc_reason = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr, 'pc', 'reason', $reason_ids, 0);
if (!$count_pc_reason) {
    echo "insert count_id_pc reason data error";
}
$count_mobile_reason = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr, 'mobile_web', 'reason', $reason_ids, 0);
if (!$count_mobile_reason) {
    echo "insert count_id_mobile reason data error";
}
//$count_id_pc = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr,'pc','resolution', $reso_id_value, 0);
//if(!$count_id_pc){
//    echo "insert count_id_pc resolution data error";
//}
//$count_id_mobile = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_online_count_for_product_line($time_arr,'mobile_web','resolution', $reso_id_value, 0);
//if(!$count_id_mobile){
//    echo "insert count_id_mobile resolution data error";
//}
echo date('c ') . " Count Month online bugs ok \n";
 public function insert_online_all_for_product_line($time_arr, $product_line, $type, $createdORclosed)
 {
     $tickets_line_arr = Bll_TicketBiz::get_instance()->get_count_online_by_product_line($time_arr['begin'], $time_arr['end'], $createdORclosed);
     if ($tickets_line_arr[$product_line]) {
         $count = count($tickets_line_arr[$product_line]);
     } else {
         $count = 0;
     }
     $input_arr = array('month' => $time_arr['month'], 'department' => 10, 'type_key' => $product_line . '_' . $type, 'type_value' => '0', 'count' => $count, 'updated_time' => $time_arr['current_time']);
     $insert_id = Bll_ReportMonthOnlineNewBiz::get_instance()->insert_count_data($input_arr);
     if (!$insert_id) {
         echo " insert_online_all_for_product_line data error ";
     }
     return $insert_id;
 }