From 6aeb73b759e9ea90f458ee7221a79527342c3feb Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 29 Dec 2020 15:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1=E6=B1=87?= =?UTF-8?q?=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancialSummaryController.class.php | 2 ++ .../Admin/Controller/FinancialSummarySetController.class.php | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 13387dd52..fd72fffe5 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -100,6 +100,7 @@ class FinancialSummaryController extends AdminController "type"=>array("IN","1,{$_REQUEST['type']},4,5,6") ); $dbres = SM("FinancialSummary","tab_")->field("*")->where($map)->select(); + // dd( $dbres); foreach ($dbres as $k => $v) { if($v['type'] == 1){ @@ -146,6 +147,7 @@ class FinancialSummaryController extends AdminController } ksort($senddata[$k]['count']); } + // dd($senddata); $this->assign('data', $senddata); } //获取历史年份 diff --git a/Application/Admin/Controller/FinancialSummarySetController.class.php b/Application/Admin/Controller/FinancialSummarySetController.class.php index 792850faa..d90368c36 100644 --- a/Application/Admin/Controller/FinancialSummarySetController.class.php +++ b/Application/Admin/Controller/FinancialSummarySetController.class.php @@ -626,7 +626,7 @@ class FinancialSummarySetController extends \Think\Controller $sql = "{$data} UNION ALL {$coinData} UNION ALL {$officalData} UNION ALL {$spreadData} UNION ALL {$superSignData} UNION ALL {$testOrder}"; - $data = M()->table("({$sql})a") + $data = M()->db(0)->table("({$sql})a") ->field("sum(cash_amount) cash_amount,sum(test_amount) test_amount, sum(coin_amount) coin_amount,sum(offcial_amount) offcial_amount, sum(spread_amount) spread_amount,sum(supersign_amount) supersign_amount, @@ -635,9 +635,7 @@ class FinancialSummarySetController extends \Think\Controller ->where("name is not null") ->group("merchant_id") ->select(); - foreach ($data as $key => $value) { - $sum = $value['cash_amount']+$value['test_amount']+$value['coin_amount']+ $value['offcial_amount']+$value['spread_amount']+$value['supersign_amount']+$value['test_order_amount']; $this->adddata[] = array(