月结统计修改

master
zyx 5 years ago
parent 0ae24bf2cd
commit 4dfec50ba5

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

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

@ -131,9 +131,9 @@
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充消耗<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消费所产生的流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币流水+内充消耗</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币流水+公会内充支出</span></span></div></th>
<th >操作</th>
</tr>

@ -112,11 +112,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币流水+内充发放</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水</span></span></div></th>
<th >操作</th>
@ -141,6 +143,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['root_id']">
<a href="{:U('Finance/gameFinance',array('sign'=>1,'parent_id'=>$data['promote_id'],'root_id'=>$_GET['root_id'],'count_date'=>$_GET['count_date'],'from'=>'getParentUser'))}" >游戏查看</a>
@ -154,6 +157,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td >
<a href="{:U('Finance/gameFinance',array('sign'=>1,'count_date'=>$_GET['count_date'],'root_id'=>$_GET['root_id'],'parent_id'=>$_GET['root_name']?$data['promote_id']:'','from'=>'getParentUser'))}" >游戏查看</a>

@ -103,11 +103,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币流水+内充发放</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水/span></span></div></th>
<th >操作</th>
@ -132,6 +134,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><if condition="$data['promote_id'] neq $_GET['parent_id']">
<a href="{:U('Finance/gameFinance',array('promote_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getPromoteUser'))}" >游戏查看</a>
@ -144,6 +147,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'parent_id'=>$_GET['parent_id'],'sign'=>3,'from'=>'getPromoteUser'))}" >游戏查看</a>
</tr>

@ -113,11 +113,13 @@
<th><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)。</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">公会内充发放<span class="tooltiptext"><span style="margin-left: -10px">平台直接下放给公会的平台币</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币流水+内充发放</span></span></div></th>
<th ><div class="tooltip">公会内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑币消耗流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币支出+公会内充支出=总流水</span></span></div></th>
<th >操作</th>
@ -142,6 +144,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.all_count}</td>
<td ><a href="{:U('Finance/gameFinance',array('root_id'=>$data['promote_id'],'count_date'=>$_GET['count_date'],'from'=>'getRootUser','sign'=>1))}" >游戏查看</a>
<a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_id'=>$data['promote_id']))}" >组长渠道</a></td>
@ -151,6 +154,7 @@
<td ><span>{$sumData.cash_count}</span></td>
<td ><span>{$sumData.balance_coin_count}</span></td>
<td ><span>{$sumData.inside_cash_count}</span></td>
<td ><span>{$sumData.bind_coin_count}</span></td>
<td ><span>{$sumData.all_count}</span></td>
<td ><a href="{:U('Finance/gameFinance',array('count_date'=>$_GET['count_date'],'sign'=>1,'root_id'=>$_GET['root_name']?$data['promote_id']:'','from'=>'getRootUser'))}" >游戏查看</a>
<!-- <a href="{:U('Finance/getParentUser',array('count_date'=>$_GET['count_date'],'root_name'=>$_GET['root_name'],'sign'=>1))}" >渠道查看</a></td>-->

@ -137,6 +137,8 @@
<th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员)),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th>
<th ><div class="tooltip">内充支出<span class="tooltiptext"><span style="margin-left: -10px">绑定币流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">指示为玩家充值消耗平台,不计入总流水</span></span></div></th>
<th ><div class="tooltip">总流水<span class="tooltiptext"><span style="margin-left: -10px">游戏现金流水+平台币收入+内充流水</span></span></div></th>
@ -163,6 +165,7 @@
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_deposit}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.bind_coin_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.all_count}</td>
<td >
@ -179,6 +182,7 @@
<td ><span><if condition="$sumData.cash_count neq ''">{$sumData.cash_count}<else/>0</if></span></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_deposit}<else/>0</if></td>
<td><if condition="$sumData.inside_cash_count neq ''">{$sumData.inside_cash_count}<else/>0</if></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.bind_coin_count}<else/>0</if></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_count}<else/>0</if></td>
<td><if condition="$sumData.all_count neq ''">{$sumData.all_count}<else/>0</if></td>
<td>

Loading…
Cancel
Save