|
|
|
@ -166,6 +166,8 @@ class CompanyStatementOfflineController extends ThinkController
|
|
|
|
|
->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,12 +177,18 @@ 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'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$params['p'] = $page;
|
|
|
|
|
$params['row'] = $row;
|
|
|
|
|
$page = set_pagination($count['count'], $row, $params);
|
|
|
|
|