diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index f8b4e8ceb..b9d6d174f 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -182,6 +182,7 @@ class FinanceController extends BaseController $parameter['endtime'] = $initEndTime; $data = []; + $total = []; $count = 0; if (intval($endTime - $begTime) / (24 * 3600) <= 31) { $withdrawIds = []; @@ -222,6 +223,10 @@ class FinanceController extends BaseController ->page($page, $row) ->select(); $count = $model->where($map)->count(); + $total = $model->field('sum(pay_amount) as pay_amount,pay_way,sum(if(selle_ratio >= 0,selle_ratio * pay_amount,0)) as income') + ->where($map) + ->find(); + $total['income'] = bcdiv($total['income'], 100, 2); //ζηŽ°ηŠΆζ€ if (empty($withdrawIds)) { @@ -264,6 +269,7 @@ class FinanceController extends BaseController $this->assign('listData', $data); $this->assign('count', $count); + $this->assign('total', $total); $this->assign('initBegTime', $initBegTime); $this->assign('initEndTime', $initEndTime); $this->assign('_page', $page);