From 24e4f77a98036153c34cfc47b34336a2cffa7ba5 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 8 Jun 2021 18:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=9B=E5=88=A9=E7=8E=B0=E5=9C=A8bug?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameMarginSetController.class.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/GameMarginSetController.class.php b/Application/Admin/Controller/GameMarginSetController.class.php index bf929db07..9b9b9a8ce 100644 --- a/Application/Admin/Controller/GameMarginSetController.class.php +++ b/Application/Admin/Controller/GameMarginSetController.class.php @@ -17,11 +17,12 @@ class GameMarginSetController extends Controller { private $year;//年份 private $adddata;//要添加的数据 private $inSideCompanyIds; - // public $result=''; + private $debugGame=false; + private $debugStr=''; /** * 更新某月数据 */ - public function setFreeMonth($count_date) + public function setFreeMonth($count_date,$debug_game=false) { //设置转换精度 ini_set('serialize_precision',14); @@ -37,6 +38,7 @@ class GameMarginSetController extends Controller { $this->month= $tarry[1]; $this->beginThismonth=mktime(0,0,0,$tarry[1],1,$tarry[0]); $this->endThismonth=mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1; + $this->debugGame=$debug_game; $this->reCount(); $this->setGameMargin(); @@ -66,6 +68,10 @@ class GameMarginSetController extends Controller { $this->getPuStatement(); $this->getPcStatement(); $this->setMarginCount(); + if($this->debugGame){ + $str = $this->debugGame . PHP_EOL."公司名称,团体归属,时间,流水,分成". $this->debugStr . PHP_EOL; + echo $str; + } echo "{$this->year}-{$this->month}生成成功".PHP_EOL; } /** @@ -223,6 +229,9 @@ class GameMarginSetController extends Controller { $this->adddata[$val['game_name']]['pu_pay_amount'] = $val['pay_amount']; $this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money']; } + if($this->debugGame && $this->debugGame == $val['game_name']){ + $this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$time['begin_time']}-{$time['end_time']},{$val['pay_amount']},{$val['sum_money']}"); + } } } } @@ -293,6 +302,10 @@ class GameMarginSetController extends Controller { $this->adddata[$val['game_name']]['pu_pay_amount'] = $val['pay_amount']; $this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money']; } + + if($this->debugGame && $this->debugGame == $val['game_name']){ + $this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$time['begin_time']}-{$time['end_time']},{$val['pay_amount']},{$val['sum_money']}"); + } } } } @@ -322,6 +335,13 @@ class GameMarginSetController extends Controller { }else{ $this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money']; } + + if($this->debugGame && $this->debugGame == $val['game_name']){ + $beginThismonth = date("Y.m.d",$this->beginThismonth); + $endThismonth = date("Y.m.d",$this->endThismonth); + $this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$beginThismonth}-{$endThismonth},0,{$val['sum_money']}"); + } + } } }