From 79588d52e8dc09ded6020c161b9c20e8de1d82ee Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 22 Dec 2020 13:47:47 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index faec62a22..c389f9d8a 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -498,7 +498,6 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] = "=ROUND("; } $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); -// dump($handle_data); $v['statement_info'] = $handle_data; $row = 0; foreach($v['statement_info'] as $ke=>&$va){ @@ -523,13 +522,9 @@ class CompanyStatementPoolController extends ThinkController } //本周未结算流水合计 if(!$is_statement){ - $count['pool_lack_count'] += $val['pay_amount']; - $count['st_lack_count'] += $val['sum_money']; if($is_export){ $this->setlackCount($line); } - }else{ - $count['st_count'] += $val['sum_money']; } } @@ -547,6 +542,12 @@ class CompanyStatementPoolController extends ThinkController } $count['week_money'] += $va['week_amount']; $count['sum_money'] += $va['week_amount']; + if(!$is_statement){ + $count['pool_lack_count'] += $va['week_amount']; + $count['st_lack_count'] += $va['week_amount']; + }else{ + $count['st_count'] += $va['week_amount']; + } } $v['row'] = $row; From fc75b7d81da71aef4e06c6e2216932d02fffcf88 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 22 Dec 2020 15:23:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index c389f9d8a..031290dda 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -522,6 +522,7 @@ class CompanyStatementPoolController extends ThinkController } //本周未结算流水合计 if(!$is_statement){ + $count['pool_lack_count'] += $val['pay_amount']; if($is_export){ $this->setlackCount($line); } @@ -542,12 +543,12 @@ class CompanyStatementPoolController extends ThinkController } $count['week_money'] += $va['week_amount']; $count['sum_money'] += $va['week_amount']; - if(!$is_statement){ - $count['pool_lack_count'] += $va['week_amount']; - $count['st_lack_count'] += $va['week_amount']; - }else{ - $count['st_count'] += $va['week_amount']; - } + } + + if(!$is_statement){ + $count['st_lack_count'] += $v['statement_money']; + }else{ + $count['st_count'] += $v['statement_money']; } $v['row'] = $row; From 32abdbb390cf4f88013754b3b95aacde519a5716 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 22 Dec 2020 21:06:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B1=87=E6=80=BB=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 42 +++++++++++------- .../View/CompanyStatementPool/editPuPool.html | 44 +++++++++---------- 2 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index b64383c74..badadd7d2 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -550,6 +550,7 @@ class CompanyStatementPoolController extends ThinkController } } } +// die(); if($is_export){ @@ -684,6 +685,9 @@ class CompanyStatementPoolController extends ThinkController $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)"; + if ($hk > 0) { + $handle_data[0]['week_amount'] = str_replace($old_line,$week_line,$handle_data[0]['week_amount']); + } if (count($hv['game_list'])>1) { @@ -1759,9 +1763,13 @@ class CompanyStatementPoolController extends ThinkController $lfine = 0; $handledata = []; -// dump($st);die(); - - +// dump($sum_money); +// dump($ratio); +// dump($refund); +// dump($withhold); +// dump($increment_ratio); +// dump($st); +//die(); foreach ($increment_ratio as $key => $value) { $statement_info = array(); @@ -1789,7 +1797,6 @@ class CompanyStatementPoolController extends ThinkController $statement_data = $model->where(['id'=>$key])->find(); - $statement_info = json_decode($statement_data['statement_info'],true); foreach ($statement_info as $k => $v) { @@ -1798,29 +1805,35 @@ class CompanyStatementPoolController extends ThinkController foreach ($game_list as $gk => $gv) { - if ($ratio[$key][$v['account']][$gk]) { - $statement_info[$k]['game_list'][$gk]['ratio'] = (int)$ratio[$key][$v['account']][$gk]; + if ($ratio[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]) { + $statement_info[$k]['game_list'][$gk]['ratio'] = (int)$ratio[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]; } - $statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk]; - $statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gv['statement_begin_time']]; - $withhold[$key][$v['account']][$gv['statement_begin_time']] = 0; + $statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]; +// dump($gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']); +// dump($withhold[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']][$gv['statement_begin_time']]); + $statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']][$gv['statement_begin_time']]; + $withhold[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']][$gv['statement_begin_time']] = 0; - $statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]; - $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]; - $amount += $sum_money[$key][$v['account']][$gk] - $statement_info[$k]['game_list'][$gk]['withhold']; + $amount += $sum_money[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']] - $statement_info[$k]['game_list'][$gk]['withhold']; if ($st[$key][$akey] == 1) { - $statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; + $statement_amount += $sum_money[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]-$statement_info[$k]['game_list'][$gk]['withhold']; } else { - $statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; + $statement_lack_amount += $sum_money[$key][$gv['game_name'].$gv['statement_begin_time'].'-'.$gv['statement_end_time'].$v['account']]-$statement_info[$k]['game_list'][$gk]['withhold']; } } } +// if ($key == 2312) { +// dump($statement_info); +// } + $statement_info_data = json_encode($statement_info); $r_data = $model->field("fine,reward")->where(['id'=>$key])->find(); @@ -1838,7 +1851,6 @@ class CompanyStatementPoolController extends ThinkController } - } //die(); M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]); diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index cb44a615d..fe4f57542 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -166,18 +166,18 @@ {$com['statement_info'][0]['time']} {$com['statement_info'][0]['game_list'][0]['pay_amount']} - - % - % + + % + % {$com['statement_info'][0]['game_list'][0]['sum_money']} - - + + {$com['statement_info'][0]['reward']||default="0"} {$com['statement_info'][0]['fine']||default="0"} - + {$com['statement_info'][0]['week_amount']} @@ -231,12 +231,12 @@ {$game['game_type_name']} {$game['pay_amount']} - - % - % + + % + % - {$game['sum_money']} - + {$game['sum_money']} + @@ -264,13 +264,13 @@ {$account['game_list'][0]['pay_amount']} - - % - % + + % + % {$account['game_list'][0]['sum_money']} - - + + @@ -280,7 +280,7 @@ - + {$account['week_amount']} @@ -309,12 +309,12 @@ {$game['pay_amount']} - - % - % + + % + % - {$game['sum_money']} - + {$game['sum_money']} + From 699449a702afdcebf4251bd7da951278795390f5 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 22 Dec 2020 21:42:17 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9C=AA=E7=BB=93=E7=AE=97=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 1 + .../View/CompanyStatementPool/editPuPool.html | 20 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 3d6be41fa..5a8e9f60a 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -357,6 +357,7 @@ class CompanyStatementPoolController extends ThinkController } } } +// dump($infolist);die(); if($is_export){ $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index fe4f57542..80a882d6c 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -264,13 +264,13 @@ {$account['game_list'][0]['pay_amount']} - - % - % + + % + % {$account['game_list'][0]['sum_money']} - - + + @@ -309,12 +309,12 @@ {$game['pay_amount']} - - % - % + + % + % - {$game['sum_money']} - + {$game['sum_money']} + From 87c6c71d0a4c0a741275de90efd341ab00752c7b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 22 Dec 2020 22:00:28 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=B1=87=E6=80=BBbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatementPool/editPuPool.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index 80a882d6c..ee6569fe4 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -309,12 +309,12 @@ {$game['pay_amount']} - - % - % + + % + % - {$game['sum_money']} - + {$game['sum_money']} +