公会统计去除

master
zhengyongxing 4 years ago
parent a8f4f16349
commit 2fae4219df

@ -120,21 +120,6 @@ class FinancePromoteController extends AdminController
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0; if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0; if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
$v['promote_account'] = get_promote_name($v['p_id']); $v['promote_account'] = get_promote_name($v['p_id']);
if ($v['admin_id']) {
$v['admin_id'] = get_admin_account($v['admin_id']);
} else {
$v['admin_id'] = '无';
}
if ($v['develop_type'] == 1) {
$v['develop_type'] = '自主开发';
} elseif($v['develop_type'] == 2) {
$v['develop_type'] = '自主开发及维护';
} elseif($v['develop_type'] == 3) {
$v['develop_type'] = '只维护';
} else {
$v['develop_type'] = '未设定';
}
$v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.',''); $v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.','');
$v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.',''); $v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.','');
@ -238,7 +223,7 @@ class FinancePromoteController extends AdminController
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count, SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id, IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,IFNULL(promote.company_belong,0) company_belong,admin_id,develop_type"; IFNULL(company_id,0) company_id,company_name,IFNULL(promote.company_belong,0) company_belong";
return M() return M()
->table("tab_spend s use index(promote_time)") ->table("tab_spend s use index(promote_time)")
->field($field) ->field($field)
@ -255,7 +240,7 @@ class FinancePromoteController extends AdminController
$map['s.source_id']=0; $map['s.source_id']=0;
$field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='', $field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',
s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id, s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,IFNULL(promote.company_belong,0) company_belong,admin_id,develop_type"; IFNULL(company_id,0) company_id,company_name,IFNULL(promote.company_belong,0) company_belong";
return M("promote_coin s","tab_") return M("promote_coin s","tab_")
->field($field) ->field($field)
->where($map) ->where($map)

@ -165,9 +165,7 @@
<tr> <tr>
<th>推广公司</th> <th>推广公司</th>
<th>会长渠道</th> <th>会长渠道</th>
<th>开发类型</th>
<th>内外团</th> <th>内外团</th>
<th>市场专员</th>
<th class="tooltip"><a class="paixu" data-order='cash_count'> <th class="tooltip"><a class="paixu" data-order='cash_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲ <if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'cash_count'">游戏现金金额▲
@ -217,9 +215,7 @@
<tr> <tr>
<td>{$data.company_name}</td> <td>{$data.company_name}</td>
<td>{$data['promote_account']}</td> <td>{$data['promote_account']}</td>
<td>{$data['develop_type']}</td>
<td>{$data['company_belong']}</td> <td>{$data['company_belong']}</td>
<td>{$data['admin_id']}</td>
<td>{$data.cash_count}</td> <td>{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}"> <td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
@ -252,7 +248,7 @@
</volist> </volist>
</empty> </empty>
<tr class="data_summary" style="text-align: center;"> <tr class="data_summary" style="text-align: center;">
<td colspan="5" style="text-align: center;">汇总:</td> <td colspan="3" style="text-align: center;">汇总:</td>
<td style="text-align: center;">{$all_count['cash_count']}</td> <td style="text-align: center;">{$all_count['cash_count']}</td>
<td style="text-align: center;">{$all_count['balance_coin_count']}</td> <td style="text-align: center;">{$all_count['balance_coin_count']}</td>
<td style="text-align: center;">{$all_count['bind_coin_count']}</td> <td style="text-align: center;">{$all_count['bind_coin_count']}</td>

Loading…
Cancel
Save