apf_require_class('DealTime');
$resolutions = Bll_DdCommonBiz::get_instance()->get_resolutions();
$reso_id_value = array();
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
//$current_time = date("Y-m-d H:i:s");
$resolutions = Bll_DdCommonBiz::get_instance()->get_resolutions();
$reso_id_value = array();
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:用户端,客户端
$month_arr = array(1, 2, 3);
//1=>上月, 2=>本月,
$time_class = new DealTime();
$current_time = date("Y-m-d H:i:s");
foreach ($month_arr as $month_count) {
    $time_arr = $time_class->get_past_month_time($month_count);
    $time_arr['current_time'] = $current_time;
    $month = $time_arr['month'];
    $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;
        }
        $tickets_all_created = Bll_TicketBiz::get_instance()->get_created_counts_online_tickets($begin, $end, 'all', $depart->id);
Esempio n. 3
0
<?php

/**
 * Created by PhpStorm.
 * User: lanqiyi
 * Date: 14-7-24
 * Time: 下午3:27
 */
apf_require_class('Bll_TicketBiz');
apf_require_class('Bll_ReportMonthOnlineNewBiz');
apf_require_class('Bll_DdCommonBiz');
apf_require_class('Bll_DdComponentBiz');
apf_require_class('DealTime');
$time_class = new DealTime();
$current_time = date("Y-m-d H:i:s");
$time_arr = $time_class->get_past_month_time(1);
//1=>上月
$time_arr['current_time'] = $current_time;
$month = $time_arr['month'];
$begin = $time_arr['begin'];
$end = $time_arr['end'];
$resolutions = Bll_DdCommonBiz::get_instance()->get_resolutions();
$reso_id_value = array();
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;
}
Esempio n. 4
0
<?php

apf_require_class('Bll_TicketBiz');
apf_require_class('Bll_ReportMonthDevBiz');
apf_require_class('Bll_PMTProjectBiz');
apf_require_class('DealTime');
//$time = strtotime('now');
//$begin = date('Y-m-01 00:00:00', $time);
//$end = date('Y-m-t 23:59:59', $time);
//$month = date('Ym', $time);
$timeObj = new DealTime();
$time_arr = $timeObj->get_past_month_time(1);
//1=>上月,2,3,4,5,6
$begin = $time_arr['begin'];
$end = $time_arr['end'];
$month = $time_arr['month'];
$current_time = date("Y-m-d H:i:s");
$depart_array = array(12, 13, 14, 7, 6, 4);
//12=>用户事业部,13=>经纪人事业部,14=>开发商事业部,7=>CRM,6=>移动,4=>anjuke inc
$depart_map_pmt = array(12 => 51, 13 => 52, 14 => 53, 7 => 54);
//51=>用户端,52=>客户端,53=>开发商,54=>CRM
//$depart_array = array(12);
$product_lines = array('pc' => 50, 'mobile' => 51);
//51=>touch-web,pad-web的项目也选择的是touch-web
foreach ($depart_array as $depart) {
    if ($depart == 12) {
        foreach ($product_lines as $key => $product_line) {
            $projects = Bll_PMTProjectBiz::get_instance()->get_project_by_user_and_time($depart, $product_line, $begin, $end);
            if ($projects) {
                $count = count($projects);
                $pmt_ids_init = array();