金额错误bug修改

master
zhengyongxing 4 years ago
parent b58bdab705
commit b1c82bfd69

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

Loading…
Cancel
Save