$menus = MenuUrl::getMenuByIds($user_info['shortcuts']);
foreach ($arr as $key => $value) {
    if (${$value}) {
        $param[$value] = ${$value};
    }
}
$start_date = $param['start_date'] = $_GET['start_date'] = $_GET['start_date'] ? $_GET['start_date'] : date('Y-m');
// if (Common::isPost ()) {
// if($start_date != '' && $end_date !=''){
$page_size = PAGE_SIZE;
$page_no = $page_no < 1 ? 1 : $page_no;
$start = ($page_no - 1) * $page_size;
if ($_GET['download'] == 1) {
    $data['result'] = Complaint::complaintsAnalayze($param, $start, 0);
} else {
    $data['result'] = Complaint::complaintsAnalayze($param, $start, $page_size);
    foreach ($data['result'] as $key => $value) {
        $total['num'] += $value['num'];
        $total['cos'] += $value['cos'];
        $total['wan'] += $value['wan'];
        $total['month'] = date('Y-m', $value['month']);
    }
}
$total['increase'] = $total['num'] - Complaint::getComplaintTotal(strtotime($start_date . "-01 -1 month"), $province_id);
$data['total'] = $total;
$row_count = Complaint::customAnalayzeCount($param);
$data['month'] = Complaint::complaintsAnalayzeMonth($param);
// $data['provinces'] = implode(',',Complaint::complaintsAnalayzeProvince($param)['province']);
// $data['complaints'] = implode(',',Complaint::complaintsAnalayzeProvince($param)['complaints']);
$tmp = Complaint::complaintsAnalayzeProvince($param);
$provincesData = $tmp['province'];