|
|
@ -165,7 +165,9 @@ class CompanyStatementOfflineController extends ThinkController
|
|
|
|
->join("tab_company_statement_pool as p ON c.pool_id = p.id")
|
|
|
|
->join("tab_company_statement_pool as p ON c.pool_id = p.id")
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
->find();
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
|
|
unset($map['c.pay_status']);
|
|
|
|
unset($map['c.pay_status']);
|
|
|
|
|
|
|
|
|
|
|
|
$countSuccess = SM("company_statement_info_part","tab_")->alias("c")
|
|
|
|
$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,
|
|
|
|
->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")
|
|
|
|
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]])
|
|
|
|
->where(['i.pay_status'=>['neq',1]])
|
|
|
|
->find();
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_status'] == 1) {
|
|
|
|
|
|
|
|
$countSuccess = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// dump($countPart);
|
|
|
|
// dump($countPart);
|
|
|
|
// dump($countSuccess);die();
|
|
|
|
// dump($countSuccess);die();
|
|
|
|
|
|
|
|
// dump($count);die();
|
|
|
|
$count['success_money'] += $countSuccess['success_money'];
|
|
|
|
$count['success_money'] += $countSuccess['success_money'];
|
|
|
|
$count['statement_money'] -= $countSuccess['success_money'];
|
|
|
|
$count['statement_money'] -= $countSuccess['success_money'];
|
|
|
|
$count['error_money'] += $countPart['error_money'];
|
|
|
|
$count['error_money'] += $countPart['error_money'];
|
|
|
|