From 25e66d84ff9029a8f23a5369f3f5f0211e4128cd Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 17 Feb 2020 13:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/GameController.class.php | 16 +++++++--------- .../View/Settlement/generatesettlementsheet.html | 5 +++-- .../Admin/View/Settlement/sheetDetail.html | 5 +++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index d01dda2d4..a3929ff84 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -803,20 +803,18 @@ class GameController extends ThinkController $map['pdw.partner_id'] = $partner['partner_id']; } $list = M('partner_divide_warn', 'tab_') - ->alias('pdw')->field("pdw.*, p.partner, sum(s.pay_amount) as total_amount, group_concat(distinct(g.relation_game_name)) as game_name") + ->alias('pdw')->field("pdw.*, p.partner, group_concat(distinct(g.relation_game_name)) as game_name, group_concat(distinct(g.id)) as game_id") ->join("tab_partner p on p.id = pdw.partner_id") ->join("tab_game g on pdw.partner_id = g.partner_id", 'left') - ->join('tab_spend s on s.game_id = g.id', 'left') - ->where(array_merge($map, ['s.pay_status'=>1])) + ->where(array_merge($map)) ->group('pdw.id, p.partner') ->page($p, $row)->select(); $count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->where($map)->count(); - // if (!empty($list)) { - // foreach ($list as &$item) { - // $item['create_time'] = date('Y-m-d', $item['create_time']); - // $item['upt_time'] = date('Y-m-d', $item['upt_time']); - // } - // } + if (!empty($list)) { + foreach ($list as &$item) { + $item['total_amount'] = M('spend', 'tab_')->where(['pay_status'=>1, 'game_id'=>['in',explode(',', $item['game_id'])]])->sum('pay_amount'); + } + } $page = set_pagination($count, $row); if ($page) { $this->assign('_page', $page); diff --git a/Application/Admin/View/Settlement/generatesettlementsheet.html b/Application/Admin/View/Settlement/generatesettlementsheet.html index e4bdedc73..ac4057643 100644 --- a/Application/Admin/View/Settlement/generatesettlementsheet.html +++ b/Application/Admin/View/Settlement/generatesettlementsheet.html @@ -32,6 +32,7 @@ .data_game_list table td{ line-height:1; padding: 3px; + height: 30px; } @@ -167,7 +168,7 @@ {$item.company_name} - 123 + {$item['time_start']} 至 {$item['time_end']} {$channel['relation_game_name']} {$channel['amount']} {$channel['game_ratio']}% @@ -181,7 +182,7 @@ - 123 + {$item['time_start']} 至 {$item['time_end']} {$channel['relation_game_name']} {$channel['amount']} {$channel['game_ratio']}% diff --git a/Application/Admin/View/Settlement/sheetDetail.html b/Application/Admin/View/Settlement/sheetDetail.html index 350254730..ccd1f5ced 100644 --- a/Application/Admin/View/Settlement/sheetDetail.html +++ b/Application/Admin/View/Settlement/sheetDetail.html @@ -32,6 +32,7 @@ .data_game_list table td{ line-height:1; padding: 3px; + height: 30px; } @@ -119,7 +120,7 @@ {$item.company_name} - 123 + {$item['time_start']} 至 {$item['time_end']} {$channel['relation_game_name']} {$channel['amount']} {$channel['game_ratio']}% @@ -133,7 +134,7 @@ - 123 + {$item['time_start']} 至 {$item['time_end']} {$channel['relation_game_name']} {$channel['amount']} {$channel['game_ratio']}%