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'];