diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 89918cb2a..392ec9170 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5444,6 +5444,8 @@ if ($key == 'model'){ foreach ($xlsData as $key => $value) { $xlsData[$key]['inside_cash_count'] = number_format($insideDataSum[$value['game_id']],2,'.',''); + $xlsData[$key]['all_cash_count'] = number_format($insideDataSum[$value['game_id']]+$xlsData[$key]['all_cash_count'],2,'.',''); + } $sumCash = D("spend_count")->sumSpendCountField($map,"cash_count"); diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index e0ca919c0..9f94d658c 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -85,7 +85,7 @@ class FinanceController extends ThinkController $order = "id DESC"; $data = M('spend_month_count','tab_') - ->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date,balance_coin_deposit") + ->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date,balance_coin_deposit,bind_coin_count") ->where($map) ->page($page,$row) ->order($order) @@ -98,7 +98,7 @@ class FinanceController extends ThinkController ->select(); $sumData = M('spend_month_count','tab_') - ->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit") + ->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit,sum(bind_coin_count) as bind_coin_count") ->where($map) ->order($order) ->find(); @@ -202,6 +202,7 @@ class FinanceController extends ThinkController foreach ($data as $key => $value) { $data[$key]['inside_cash_count'] = number_format($insideDataSum[$value['game_id']],2,'.',''); + $data[$key]['all_cash_count'] = number_format($insideDataSum[$value['game_id']]+$data[$key]['all_cash_count'],2,'.',''); } $sumCash = D("spend_count")->sumSpendCountField($map,"cash_count"); @@ -328,14 +329,14 @@ class FinanceController extends ThinkController $map['parent_id'] = 0; $map['root_id'] = 0; $subQueryAll = M('spend_user_count','tab_') - ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->group('promote_id') ->page($page,$row) ->select(); $sumData = M('spend_user_count','tab_') - ->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->find(); @@ -395,7 +396,7 @@ class FinanceController extends ThinkController $subQueryAll = M('spend_user_count','tab_') - ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->group('promote_id') ->page($page,$row) @@ -405,7 +406,7 @@ class FinanceController extends ThinkController } $sumData = M('spend_user_count','tab_') - ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->find(); if (empty(I("root_name"))) { @@ -413,6 +414,7 @@ class FinanceController extends ThinkController $sumData['balance_coin_count'] = number_format($sumData['balance_coin_count'] + $parentData[0]['balance_coin_count'], 2, '.', ''); $sumData['inside_cash_count'] = number_format($sumData['inside_cash_count'] + $parentData[0]['inside_cash_count'], 2, '.', ''); $sumData['all_count'] = number_format($sumData['all_count'] + $parentData[0]['all_count'], 2, '.', ''); + $sumData['bind_coin_count'] = number_format($sumData['bind_coin_count'] + $parentData[0]['bind_coin_count'], 2, '.', ''); } $count = M('spend_user_count','tab_') @@ -466,7 +468,7 @@ class FinanceController extends ThinkController // var_dump($map);die(); $subQueryAll = M('spend_user_count','tab_') - ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->group('promote_id') ->page($page,$row) @@ -475,13 +477,14 @@ class FinanceController extends ThinkController $subQueryAll = array_merge($parentData,$subQueryAll); $sumData = M('spend_user_count','tab_') - ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') + ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map) ->find(); $sumData['cash_count'] = number_format($sumData['cash_count']+$parentData[0]['cash_count'],2,'.',''); $sumData['balance_coin_count'] = number_format($sumData['balance_coin_count']+$parentData[0]['balance_coin_count'],2,'.',''); $sumData['inside_cash_count'] = number_format($sumData['inside_cash_count']+$parentData[0]['inside_cash_count'],2,'.',''); $sumData['all_count'] = number_format($sumData['all_count']+$parentData[0]['all_count'],2,'.',''); + $sumData['bind_coin_count'] = number_format($sumData['bind_coin_count']+$parentData[0]['bind_coin_count'],2,'.',''); $count = M('spend_user_count','tab_') ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') @@ -544,19 +547,20 @@ class FinanceController extends ThinkController } $data = M('spend_user_count','tab_') - ->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count') + ->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map)->select(); $map1['parent_id'] = $data[0]['promote_id']; $map1['count_date'] = $date; $sunData = M('spend_user_count','tab_') - ->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count') + ->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count') ->where($map1)->find(); $data[0]['cash_count'] = number_format($data[0]['cash_count']-$sunData['cash_count'],2,'.',''); $data[0]['balance_coin_count'] = number_format($data[0]['balance_coin_count']-$sunData['balance_coin_count'],2,'.',''); $data[0]['inside_cash_count'] = number_format($data[0]['inside_cash_count']-$sunData['inside_cash_count'],2,'.',''); $data[0]['all_count'] = number_format($data[0]['all_count']-$sunData['all_count'],2,'.',''); + $data[0]['bind_coin_count'] = number_format($data[0]['bind_coin_count']-$sunData['bind_coin_count'],2,'.',''); // $map['inside_cash_count'] = ['neq',0]; // $insideData = D("spend_count")->getSpendCountData($map,"promote_id,inside_cash_count as count","promote_id,count_date"); diff --git a/Application/Admin/View/Finance/gameFinance.html b/Application/Admin/View/Finance/gameFinance.html index 21ad29c6d..dec28f5a5 100644 --- a/Application/Admin/View/Finance/gameFinance.html +++ b/Application/Admin/View/Finance/gameFinance.html @@ -131,9 +131,9 @@