You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
<?php
|
|
namespace app\api\controller\library;
|
|
|
|
use app\api\controller\Controller;
|
|
|
|
class Pass extends Controller
|
|
{
|
|
|
|
protected $url = 'http://balib.cn:8999';
|
|
|
|
/**
|
|
* 图书管数据接口
|
|
* @return array
|
|
* 返回数据:today.incount=今天进 month.incount=本月进 year.incount=今年进 day30.incount=近30天近 outcount=出
|
|
* 不传参数就是所有摄像头,传cameraid就是按传的摄像头ID
|
|
* cameraid = 宝安图书馆9,7,6,4,2,1,67,3 1990分馆134、 135
|
|
*/
|
|
public function allFlowTrends()
|
|
{
|
|
$data = \app\common\model\Pass::getBaoAnLibData();
|
|
|
|
return $this->renderSuccess(compact('data'));
|
|
}
|
|
|
|
/**
|
|
* 借阅,办证
|
|
* 分馆年借还,今日借、还,今日办证
|
|
* @return array
|
|
*/
|
|
public function getLibraryService()
|
|
{
|
|
|
|
$library = $this->request->param('library') ?: '044007';
|
|
$url = $this->url . "/SSBusiness/monitor/getLibraryService?library={$library}";
|
|
|
|
$result = curlPost($url);
|
|
$data = json_decode($result,true);
|
|
|
|
return $this->renderSuccess(compact('data'));
|
|
}
|
|
|
|
}
|