* @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function allGroupTimeNum() { $granularity = $this->request->param('granularity'); $groupsId = $this->request->param('groupsId'); $res = PassFlow::allGroupTimeNum(['granularity' => $granularity, 'groupsId' => $groupsId]); if (empty($res['code'])) $this->renderError($res['msg']); $data = $res['data']; return $this->renderSuccess(compact('data')); } /** * 总览总数据接口 <首页-中间部分总览> * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function allGroupNum() { $returnData = PassFlow::allGroupNum(); return $this->renderSuccess(compact('returnData')); } /** * 查询最新客流统计组实时数据 <各场管实施实时进馆人数> * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function realTimeData() { $returnData = PassFlow::realTimeData(); return $this->renderSuccess(compact('returnData')); } /** * 今日各场馆人数趋势 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function toDayGroupsEnterNum() { $data = PassFlow::toDayGroupsEnterNum(); return $this->renderSuccess(compact('data')); } }