From f7101138204559467c5fe2eca36465d46f10e979 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 26 Jan 2021 09:34:38 +0800 Subject: [PATCH] =?UTF-8?q?1.28=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 135 +++++------------- .../View/CompanyStatementPool/viewCpPool.html | 4 +- .../View/CompanyStatementPool/viewPcPool.html | 2 +- 3 files changed, 41 insertions(+), 100 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index d0a45faf6..411003d29 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -1073,33 +1073,27 @@ class CompanyStatementPoolController extends ThinkController foreach ($gv as $lk => $lv){ if ($lk > 0) { + unset($lv['time']); + + } else { + + $lv['row'] = count($gv); + $lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; for (;;) { - if (!$handle_data[$lk-$substract]['time']) { -// $nline++; - $substract++; + if (!$gv[$lk+$substract]) { + break; } else { - $handle_data[$lk-$substract]['row'] += 1; - $handle_data[$lk-$substract]['week_amount'] += $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; + $lv['week_amount'] += $gv[$lk+$substract]['sum_money'] - $gv[$lk+$substract]['withhold'] + $gv[$lk+$substract]['reward'] - $gv[$lk+$substract]['fine']; -// if ($is_export) { -// $handle_data[$lk-$substract]['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)"; -// } - unset($lv['time']); - break; + $substract++; + unset($gv[$lk+$substract]['time']); } } + $substract = 1; - } else { - - $lv['row'] = 1; - $lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; -// $nline++; -// if ($is_export) { -// $lv['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)"; -// } } array_push($handle_data,$lv); @@ -1111,11 +1105,13 @@ class CompanyStatementPoolController extends ThinkController foreach($handle_data as $hk => $hv) { $substract = 1; if ($is_export) { -// dump($hv); + if (!$hv['time']) { + continue; + } + for (;;) { if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) { -// dump($handle_data[$hk+$substract]); $cline++; $substract++; @@ -1125,40 +1121,15 @@ class CompanyStatementPoolController extends ThinkController } -// if (count($handle_data)>1) { -// $cline += count($handle_data)-1; -// } - - if ($hv['time']&&$hk!=0) { - $nline =+ $cline+1; - $cline = $nline; - } - $handle_data[$hk]['week_amount'] = "=ROUND(SUM(J{$nline}:J{$cline})-SUM(K{$nline}:K{$cline})+SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline}),2)"; -// if ($hk > 0) { -// $handle_data[0]['week_amount'] = str_replace($nline,$cline,$handle_data[0]['week_amount']); -// } - -// if (count($handle_data)>1) { -// -// $nline += count($handle_data); -// -// } else { -// $nline++; -// } -// -// if(count($handle_data)>1) { -// -// $cline = $nline ; -// } else { -// $cline = $nline; -// } + $cline++; + $nline = $cline; } } -// die(); + return $handle_data; } @@ -1185,32 +1156,26 @@ class CompanyStatementPoolController extends ThinkController if ($lk > 0) { + unset($lv['time']); + + } else { + + $lv['row'] = count($gv); + $lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; + for (;;) { - if (!$handle_data[$lk-$substract]['time']) { -// $nline++; - $substract++; + if (!$gv[$lk+$substract]) { + break; } else { - $handle_data[$lk-$substract]['row'] += 1; - $handle_data[$lk-$substract]['week_amount'] += $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; + $lv['week_amount'] += $gv[$lk+$substract]['sum_money'] - $gv[$lk+$substract]['withhold'] + $gv[$lk+$substract]['reward'] - $gv[$lk+$substract]['fine']; -// if ($is_export) { -// $handle_data[$lk-$substract]['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)"; -// } - unset($lv['time']); - break; + $substract++; + unset($gv[$lk+$substract]['time']); } } - - } else { - - $lv['row'] = 1; - $lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine']; -// $nline++; -// if ($is_export) { -// $lv['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)"; -// } + $substract = 1; } array_push($handle_data,$lv); @@ -1222,11 +1187,13 @@ class CompanyStatementPoolController extends ThinkController foreach($handle_data as $hk => $hv) { $substract = 1; if ($is_export) { -// dump($hv); + if (!$hv['time']) { + continue; + } + for (;;) { if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) { -// dump($handle_data[$hk+$substract]); $cline++; $substract++; @@ -1236,40 +1203,14 @@ class CompanyStatementPoolController extends ThinkController } -// if (count($handle_data)>1) { -// $cline += count($handle_data)-1; -// } - - if ($hv['time']&&$hk!=0) { - $nline =+ $cline+1; - $cline = $nline; - } - $handle_data[$hk]['week_amount'] = "=ROUND(SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline})+SUM(N{$nline}:N{$cline})-SUM(O{$nline}:O{$cline}),2)"; -// if ($hk > 0) { -// $handle_data[0]['week_amount'] = str_replace($nline,$cline,$handle_data[0]['week_amount']); -// } - -// if (count($handle_data)>1) { -// -// $nline += count($handle_data); -// -// } else { -// $nline++; -// } -// -// if(count($handle_data)>1) { -// -// $cline = $nline ; -// } else { -// $cline = $nline; -// } + $cline++; + $nline = $cline; } } -// die(); return $handle_data; } diff --git a/Application/Admin/View/CompanyStatementPool/viewCpPool.html b/Application/Admin/View/CompanyStatementPool/viewCpPool.html index a588fc36c..c4268d24f 100644 --- a/Application/Admin/View/CompanyStatementPool/viewCpPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewCpPool.html @@ -161,8 +161,8 @@ {$com['statement_info'][0]['fax_ratio']|showNumPercent} {$com['statement_info'][0]['d_statement_money']} - {$com['fine']-0} - {$com['reward']-0} + {$com['fine']-0} + {$com['reward']-0} {$com['statement_info'][0]['withhold']|default=0} diff --git a/Application/Admin/View/CompanyStatementPool/viewPcPool.html b/Application/Admin/View/CompanyStatementPool/viewPcPool.html index 8453a8da8..40a9e3ad7 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPcPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPcPool.html @@ -193,7 +193,7 @@ {$it['game_name']} {$it['pay_amount']} - + {$it['refund']|default=0} {$it['ratio']|showNumPercent}