diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 50f3f3fba..fe264dc23 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -1710,6 +1710,8 @@ class CompanyStatementPoolController extends ThinkController $lreward = 0; $lfine = 0; + $handledata = []; + foreach ($increment_ratio as $key => $value) { @@ -1718,8 +1720,22 @@ class CompanyStatementPoolController extends ThinkController if ($st[$key][$akey] == 1) { $model = M("company_statement_info","tab_"); + + if (!$handledata[$key][1]) { + $handledata[$key][1] = 1; + } else { + continue; + } + + } else { $model = M("company_lack_statement_info","tab_"); + + if (!$handledata[$key][0]) { + $handledata[$key][0] = 1; + } else { + continue; + } } $statement_data = $model->where(['id'=>$key])->find(); @@ -1776,7 +1792,7 @@ 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]); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']); diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index d0e7b276e..cdb9aebdd 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -172,8 +172,8 @@ {$com['statement_info'][0]['game_list'][0]['sum_money']} - {$com['reward']} - {$com['fine']} + {$com['reward']} + {$com['fine']} @@ -232,7 +232,10 @@ % % - {$game['sum_money']} + + {$game['sum_money']} + + @@ -262,7 +265,17 @@ % % - {$account['game_list'][0]['sum_money']} + + {$account['game_list'][0]['sum_money']} + + + + + + {$account['reward']|default=0} + {$account['fine']|default=0} + + @@ -297,7 +310,10 @@ % % - {$game['sum_money']} + + {$game['sum_money']} + + @@ -545,12 +561,16 @@ for (var i =0;isubInSql($topPromote) . ')'; $map = $spendRepository->withIsCheck($map); - $historyGameIds = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->getField('game_id', true); - if (!$historyGameIds) { - $historyGameIds = []; + $historyGames = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->select(); + $historyGameIds = []; + if ($historyGames) { + $historyGameIds = array_column($historyGames, 'game_id'); } $nowGameIds = $topPromote['game_ids'] == '' ? [] : explode(',', $topPromote['game_ids']); return array_unique(array_merge($historyGameIds, $nowGameIds)); diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 21e662190..33305d090 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1298,9 +1298,9 @@ class QueryController extends BaseController $parameter['own_id'] = $ownId; $parameter['p'] = $page; $parameter['row'] = $row; - + $loginPromote = $this->getLoginPromote(); - + $map = []; $map = ['_string' => '1=1']; if ($ownId) { @@ -1323,7 +1323,7 @@ class QueryController extends BaseController $params['begin_time'] = $begTime; $params['end_time'] = $endTime - 1; - + $promoteService = new PromoteService(); $allGameIs = $promoteService->getHistoryGameIds($loginPromote); if ($allGameIs && count($allGameIs) > 0) { @@ -1334,7 +1334,6 @@ class QueryController extends BaseController $data = M('game', 'tab_')->where($map)->order('sort desc,id desc')->page($page, $row)->select(); $count = M('game', 'tab_')->where($map)->count(); - $records = []; $allData = []; if (!empty($data)) {