1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace catchAdmin\report\controller;
- use catcher\base\CatchRequest as Request;
- use catcher\CatchResponse;
- use catcher\base\CatchController;
- use catchAdmin\report\model\Report as ReportModel;
- class Report extends CatchController
- {
- protected $reportModel;
-
- public function __construct(ReportModel $reportModel)
- {
- $this->reportModel = $reportModel;
- }
-
- /**
- * 首页数量数据
- * @param Request $request
- */
- public function homePageCountData(Request $request)
- {
- // 基站数据
- // $station_data = $this->reportModel->getStationCountData() ?: [];
- $station_data =[];
- // 部门数据
- // $department_data = $this->reportModel->getDepartmentCountData() ?: [];
- // 用户数据
- $user_data = $this->reportModel->getDeviceUserCountData() ?: [];
- $data = array_merge($station_data, $user_data);
- return CatchResponse::success($data);
- }
- /**
- * 基站增长趋势数据
- * @param Request $request
- */
- public function stationGrowthTrendData(Request $request)
- {
- $data = $this->reportModel->getStationGrowthTrendData() ?: [];
-
- return CatchResponse::success($data);
- }
- /**
- * 用户设备增长趋势数据
- * @param Request $request
- */
- public function deviceGrowthTrendData(Request $request)
- {
- $data = $this->reportModel->getDeviceGrowthTrendData() ?: [];
-
- return CatchResponse::success($data);
- }
- }
|