diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 03fabdad1..8b2c68a29 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -210,18 +210,20 @@ class CompanyStatementSetController extends Controller { $add_data['pay_amount'] = 0; $add_data['verify_log'] = $verify_log; $add_data['op_time'] =time(); + $add_data['statement_info'] =[]; foreach($v['list'] as $ke=>$va){ $game =[]; $game['pay_amount'] =$va['pay_money']; + $game['game_name'] =$ke; //获取游戏id及比例 - $game_id = $GameDb->where("game_name='{$ke}' OR relation_game_name='{$ke}'")->field("id")->find(); + $game_id = $GameDb->where("game_name='{$ke}' OR relation_game_name='{$ke}'")->field("id,relation_game_id")->find(); if(empty($game_id)){ - $game['id']=0; + $game['relation_game_id']=0; // $game['sum_money']=0; $tratio = 0; }else{ //获取比例 - $game['id']=$game_id['id']; + $game['relation_game_id']=$game_id['relation_game_id']; if($type > 0){ $tratio = getGameCpRadio($game_id['id'],$va['pay_money'],true); }else{ @@ -236,19 +238,22 @@ class CompanyStatementSetController extends Controller { $game['first_ratio']=100-$tratio; $game['second_ratio']=$tratio; } + $add_data['pay_amount'] += $va['pay_money']; $game['sum_money']=round($va['pay_money']*$tratio/100,2); + + $add_data['statement_money'] += $game['sum_money']; $game['fax_ratio']=0; $game['promote_ratio']=0; $game['statement_begin_time']=$statement_begin_time; $game['statement_end_time']=$statement_end_time; $game['statement_type']=0; - dump($game); + $add_data['statement_info'][] = $game; } - dd($v['list']); + dd($add_data); dd($v); //获取游戏比例