diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index 8879eb6a5..e2bd1aecf 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -47,6 +47,9 @@ class CompanyStatementOfflineController extends ThinkController $time_end = strtotime($_REQUEST['time_end'])+ 86399; $map["_string"] = "(c.statement_begin_time <= {$time_end} ) OR (c.statement_end_time <= {$time_end})"; } + if(isset($_REQUEST['pay_status'])){ + $map['c.pay_status'] = $_REQUEST['pay_status']; + } //其他 if(isset($_REQUEST['company_type'])){ @@ -115,9 +118,12 @@ class CompanyStatementOfflineController extends ThinkController $v['oplist'] = $this->OpAuth($v); } - - $count = SM("company_statement_info","tab_")->alias("c")->field("count(c.id) count,sum(c.statement_money) statement_money")->join("tab_company_statement_pool as p ON c.pool_id = p.id")->where($map)->find(); - // dd($count); + //pay_status + $field = "count(c.id) count,IFNULL(SUM(CASE WHEN pay_status = 1 THEN c.statement_money ELSE 0 END),0) as success_money, + IFNULL(SUM(CASE WHEN pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money, + IFNULL(SUM(CASE WHEN pay_status = -1 THEN c.statement_money ELSE 0 END),0) as error_money"; + $count = SM("company_statement_info","tab_")->alias("c")->field($field)->join("tab_company_statement_pool as p ON c.pool_id = p.id")->where($map)->find(); + $params['p'] = $page; $params['row'] = $row; $page = set_pagination($count['count'], $row, $params); @@ -128,6 +134,7 @@ class CompanyStatementOfflineController extends ThinkController $this->assign('data',$data); $this->assign('count',$count); $this->assign('CompanyType',$this->CompanyType); + $this->assign("PayStatus", $this->PayStatus); $this->display(); } diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 58900f04d..76e2b3537 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -443,7 +443,7 @@ class PromoteController extends ThinkController $data['withdraw_show'] = $_POST['withdraw_show']; $data['withdraw_done'] = $_POST['withdraw_done']; $data['can_view_recharge'] = $_POST['can_view_recharge']; - + $data['ts_over_apply'] = $_POST['ts_over_apply'] ?? 0; if (empty($pwd)) { unset($data['password']); } diff --git a/Application/Admin/View/CompanyStatementOffline/lists.html b/Application/Admin/View/CompanyStatementOffline/lists.html index d7805a15b..b14365a3a 100644 --- a/Application/Admin/View/CompanyStatementOffline/lists.html +++ b/Application/Admin/View/CompanyStatementOffline/lists.html @@ -117,6 +117,14 @@
说明:公会相关统计不含不参与结算的订单数据
+说明:公会相关统计
+