$total['month'] = date('Y-m', $value['month']); $allProvince[] = $value['province_id']; $total['suc'] += $value['appealSuc']; $total['fail'] += $value['appealFail']; $total['not'] += $value['appealNot']; $total['valid'] += $value['valid']; $total['cost'] += $value['customCost']; $data['total'] = $total; } $allProvince = $province_id ? $province_id : $allProvince; $total['increase'] = $total['num'] - Complaint::getCustomTotal(strtotime($start_date . "-01 -1 month"), $allProvince); } $data['total'] = $total; $row_count = Complaint::customAnalayzeCount($param); $data['month'] = Complaint::customAnalayzeMonth($param); $data['provinces'] = Complaint::customAnalayzeArea($param); // $tmp = explode(',', $data['provinces']); $province = Info::getProvince(); foreach ($data['provinces'] as $key => $value) { $tmp[$key]['score'] = $value; $tmp[$key]['name'] = $province[$key]['name']; } foreach ($tmp as $key => $row) { $volume[$key] = $row['score']; $edition[$key] = $row['name']; } // 将数据根据 volume 降序排列,根据 edition 升序排列 // 把 $data 作为最后一个参数,以通用键排序 array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $tmp); $name = $score = array(); foreach ($tmp as $key => $value) {