|
|
@ -561,6 +561,24 @@ public function actionDownload(){ |
|
|
|
$data['rows'] = []; |
|
|
|
$data['rows'] = []; |
|
|
|
foreach($items as $item) { |
|
|
|
foreach($items as $item) { |
|
|
|
$row = $item->toArray(); |
|
|
|
$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'] = '<div style="background: #00B83F;width: 50px;">通话中</div>'; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$row['phone_status'] = '<div style="background: #b03d3d;width: 50px;">未通话</div>'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$row['phone_status'] = '<div style="background: #b03d3d;width: 50px;">未通话</div>'; |
|
|
|
|
|
|
|
} |
|
|
|
$data['rows'][] = $row; |
|
|
|
$data['rows'][] = $row; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|