每日概况合计

master
sunke 5 years ago
parent bfb14a84f0
commit 9f60171191

@ -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);
}

Loading…
Cancel
Save