From 67f5ae2d8557229ec8b74aecc7633d6d6c5c686e Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 13 Sep 2021 11:04:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=93=E7=AE=97=E5=8D=95?= =?UTF-8?q?=E4=B8=8B=E6=B8=B8=E7=89=B9=E6=AE=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 19 +++++++++++++------ .../CompanyStatementPoolController.class.php | 2 +- .../View/CompanyStatementPool/viewPuPool.html | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index e0b20c1b6..49f76ad34 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1199,6 +1199,7 @@ class CompanyStatementController extends ThinkController $count = []; $week_line = 2; + $withdraw_type = false; //获取对接人 foreach($infolist as $k=>&$v){ $infolist[$k]['reward'] = 0; @@ -1239,6 +1240,9 @@ class CompanyStatementController extends ThinkController $row += count($va['game_list']); foreach($va['game_list'] as $key=>&$val){ + if(!$withdraw_type){ + $withdraw_type = $v['withdraw_type']; + } $line ++; if($v['withdraw_type'] != 3) { if(isset($val['ratio'])){ @@ -1250,12 +1254,12 @@ class CompanyStatementController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)"; + $val['sum_money'] = "=ROUND((L{$line}-M{$line})*(N{$line}+O{$line}),2)"; } else { - $val['sum_money'] = "=ROUND((K{$line}-L{$line})*(N{$line}),2)"; + $val['sum_money'] = "=ROUND((L{$line}-M{$line})*(O{$line}),2)"; } // $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})"; - $v['statement_money'] .= "S{$line}+"; + $v['statement_money'] .= "T{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; $count['sum_money'] += $val['sum_money']; @@ -1274,14 +1278,17 @@ class CompanyStatementController extends ThinkController } if($is_export){ - $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; - $count["week_money"] = "=ROUND(SUM(S2:S".$line."),2)"; - $count["sum_money"] = "=ROUND(SUM(T2:T".$line."),2)"; + $count["platform_amount"] = "=ROUND(SUM(L2:L".$line."),2)"; + $count["week_money"] = "=ROUND(SUM(T2:T".$line."),2)"; + $count["sum_money"] = "=ROUND(SUM(U2:U".$line."),2)"; } $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); + $this->assign("withdraw_type",$withdraw_type); + + // dd($infolist); $this->display("CompanyStatementPool/viewPuPool"); } diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 80ec1f258..9d39a0f91 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -1054,7 +1054,7 @@ class CompanyStatementPoolController extends ThinkController $week_line += count($hv['game_list'])-1; } - $handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line})+SUM(P{$old_line}:P{$week_line})-SUM(Q{$old_line}:Q{$week_line})-SUM(R{$old_line}:R{$week_line}),2)"; + $handle_data[$hk]['week_amount'] = "=ROUND(SUM(P{$old_line}:P{$week_line})+SUM(Q{$old_line}:Q{$week_line})-SUM(R{$old_line}:R{$week_line})-SUM(S{$old_line}:S{$week_line}),2)"; if ($hk > 0) { $handle_data[0]['week_amount'] = str_replace($old_line,$week_line,$handle_data[0]['week_amount']); diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index e4b0cd140..4e3f9b294 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -318,7 +318,7 @@ - + 上周数据合计: {$count.pool_week_count} @@ -360,7 +360,7 @@ - 合计: + 合计: {$count.platform_amount}