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(