From fe7d21943b86439e24136b8ad47e67a14f5d2bef Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 27 May 2020 18:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=982?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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); //获取游戏比例