结算单功能优化 / 下游结算单:列表展示游戏不区分安卓IOS,直接展示汇总信息

master
zyx 5 years ago
parent 0fba64c6f1
commit fea720339b

@ -251,7 +251,7 @@ class AjaxController extends ThinkController{
}
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->where($map)
@ -332,16 +332,42 @@ class AjaxController extends ThinkController{
}
$data['address'] = $address;
$gameStr = [];
$game_ratio = [];
if (is_array($data['game_ratio'])) {
foreach ($data['game_ratio'] as $key => &$value) {
foreach ($value as $k => &$v) {
$v['game_name'] = substr(get_gamename($key),0,strpos(get_gamename($key), '('));
if (!in_array($v['game_name'],$gameStr)) {
array_push($gameStr,$v['game_name']);
} else {
$game_ratio[$v['game_name']] = $v;
unset($data['game_ratio'][$key]);
}
}
}
// dump($data['game_ratio']);die();
foreach ($data['game_ratio'] as $key => &$value) {
foreach ($value as $k => &$v) {
$v['game_name'] = get_gamename($key);
if ($game_ratio[$v['game_name']]) {
$v['sum_amount'] = number_format($v['sum_amount'] + $game_ratio[$v['game_name']]['sum_amount'],2,'.','');
}
}
}
}
$yfData = M('tool','tab_')->where(['name'=>'company_info'])->find();
@ -371,7 +397,7 @@ class AjaxController extends ThinkController{
// $map['widthdraw_number'] = ['neq',''];
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,tab_promote_company.company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,tab_promote_company.company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->join("left join tab_statement as statement on tab_withdraw.widthdraw_number = statement.ext_field")

Loading…
Cancel
Save