|
|
@ -3238,9 +3238,13 @@ class DownloadController extends BaseController {
|
|
|
|
$roles = M()->alias('record')
|
|
|
|
$roles = M()->alias('record')
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
$total = M('spend','tab_')->alias('uc')
|
|
|
|
$totalSql = M('spend', 'tab_')->alias('uc')
|
|
|
|
->field("$fieldS, $fieldToday as recharge_cost_today")
|
|
|
|
->field("$fieldS, $fieldToday as recharge_cost_today")
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
|
|
|
|
->buildSql();
|
|
|
|
|
|
|
|
$total = M()->table($totalSql)
|
|
|
|
|
|
|
|
->alias('total')
|
|
|
|
|
|
|
|
->field('sum(recharge_cost) as recharge_cost, sum(recharge_count) as recharge_count, sum(recharge_cost_today) as recharge_cost_today')
|
|
|
|
->find();
|
|
|
|
->find();
|
|
|
|
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
|
|
|
|
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
|
|
|
|
$csvFileName = $xlsName.'.csv';
|
|
|
|
$csvFileName = $xlsName.'.csv';
|
|
|
|