From 32e68064fff92ec6fec188c2488a27162ed6e801 Mon Sep 17 00:00:00 2001 From: zengchaoxin Date: Fri, 18 Oct 2019 11:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=80=9A=E6=97=B6=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/controllers/PhoneCenterController.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/controllers/PhoneCenterController.php b/frontend/controllers/PhoneCenterController.php index f68228a..d9bec4a 100644 --- a/frontend/controllers/PhoneCenterController.php +++ b/frontend/controllers/PhoneCenterController.php @@ -561,6 +561,24 @@ public function actionDownload(){ $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); + $row['total_call_num'] = $item->totalCallNum($begin_date,$end_date); + $row['total_call_time_out'] = $item->totalCallTimeOut($begin_date,$end_date); + $row['total_call_time'] = $item->totalCallTime($begin_date,$end_date); + $row['call_in_total_num'] = $item->callInTotalNum($begin_date,$end_date); + $row['call_in_suc_num'] = $item->callInSucNum($begin_date,$end_date); + $row['call_in_suc_num_rate'] = number_format($item->callInTotalNum($begin_date,$end_date)? $item->callInSucNum($begin_date,$end_date)/$item->callInTotalNum($begin_date,$end_date) :0,2); + $row['call_out_total_num'] = $item->callOutTotalNum($begin_date,$end_date); + $row['call_out_suc_num'] = $item->callOutSucNum($begin_date,$end_date); + $row['call_out_suc_num_rate'] = number_format($item->callOutTotalNum($begin_date,$end_date)?$item->callOutSucNum($begin_date,$end_date)/$item->callOutTotalNum($begin_date,$end_date):0,2) ; + if($item->phoneStatus) { + if($item->phoneStatus->is_phone==1) { + $row['phone_status'] = '
通话中
'; + } else { + $row['phone_status'] = '
未通话
'; + } + } else { + $row['phone_status'] = '
未通话
'; + } $data['rows'][] = $row; }