From 9f60171191ff16422c3a5e1a5a3113e12cba17bf Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 3 Dec 2019 18:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=A6=82=E5=86=B5=E5=90=88?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DownloadController.class.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 52500fe8a..699eced67 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2769,7 +2769,20 @@ class DownloadController extends BaseController { $spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params);//通用币充值 $params['pay_way'] = -1; $spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params);//绑定币充值 - + $allData['role_num'] = 0; + $allData['user_num'] = 0; + $allData['new_user_num'] = 0; + $allData['new_device_num'] = 0; + $allData['new_ip_num'] = 0; + $allData['login_user_num'] = 0; + $allData['spend_user_num'] = 0; + $allData['spend_num'] = 0; + $allData['spend_all_amount'] = 0; + $allData['spend_cash'] = 0; + $allData['spend_generic'] = 0; + $allData['spend_binding'] = 0; + $allData['spend_discount'] = 0; + $allData['spend_voucher'] = 0; foreach ($params['dayList'] as $day) { $date = date('Ymd', strtotime($day)); $records[] = [ @@ -2789,12 +2802,29 @@ class DownloadController extends BaseController { 'spend_discount' => 0, 'spend_voucher' => 0, ]; + $allData['role_num'] += $roleNumList[$day]; + $allData['user_num'] += $userNumList[$day]; + $allData['new_user_num'] += $newUserNumList[$day]; + $allData['new_device_num'] += $newDeviceNumList[$day]; + $allData['new_ip_num'] += $newIpNumList[$day]; + $allData['login_user_num'] += $loginUserNumList[$day]; + $allData['spend_user_num'] += $spendUserNumList[$day]; + $allData['spend_num'] += $spendNumList[$day]; + $allData['spend_all_amount'] = bcadd($allData['spend_all_amount'], $spendAllAmountList[$day], 2); + $allData['spend_cash'] = bcadd($allData['spend_cash'], $spendCashList[$day], 2); + $allData['spend_generic'] = bcadd($allData['spend_generic'], $spendGenericList[$day], 2); + $allData['spend_binding'] = bcadd($allData['spend_binding'], $spendBindingList[$day], 2); + $allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2); + $allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2); } + $allData['day'] = '合计'; + $records[] = $allData; $xlsData = []; foreach ($records as $key1 => $value1) { $xlsData[] = $value1; } + $this->exportExcel($xlsName, $xlsCell, $xlsData,$id); }