From b1c82bfd695e2ee4bde60c6db1f79b36c9c6714a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 May 2021 11:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E9=A2=9D=E9=94=99=E8=AF=AFbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementOfflineController.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index 2d7797e19..cc1da063f 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -165,7 +165,9 @@ class CompanyStatementOfflineController extends ThinkController ->join("tab_company_statement_pool as p ON c.pool_id = p.id") ->where($map) ->find(); + unset($map['c.pay_status']); + $countSuccess = SM("company_statement_info_part","tab_")->alias("c") ->field("IFNULL(SUM(CASE WHEN c.pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money, IFNULL(SUM(CASE WHEN c.pay_status = 1 THEN c.statement_money ELSE 0 END),0) as success_money") @@ -175,8 +177,13 @@ class CompanyStatementOfflineController extends ThinkController ->where(['i.pay_status'=>['neq',1]]) ->find(); + if ($_REQUEST['pay_status'] == 1) { + $countSuccess = []; + } + // dump($countPart); // dump($countSuccess);die(); +// dump($count);die(); $count['success_money'] += $countSuccess['success_money']; $count['statement_money'] -= $countSuccess['success_money']; $count['error_money'] += $countPart['error_money'];