作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

interface

... ... @@ -32,8 +32,9 @@ class AdminAllStatisticsController extends AdminBaseController{
public function index(){
$Order=new OrderModel();
$data=$Order->alias('a')
->field('a.*,b.serial_number,b.hospital,count(a.eq_name) as num,sum(a.time) as sumTime')
->join('equipment b','a.eq_name=b.name')
->field('a.*,count(a.eq_name) as num,sum(a.time) as sumTime')
// ->join('equipment b','a.eq_name=b.name')
->join('users c','a.users_id=c.id')
->group('a.eq_name')
->order('start_time','desc')
->paginate(10)->each(function ($item){
... ...
... ... @@ -41,7 +41,7 @@ class AdminEquipmentController extends AdminBaseController{
$where['name']=['like','%'.$param['name'].'%'];
}
if (!empty($param['hospital'])){
$where['hospital']=$param['hospital'];
$where['hospital']=['like','%'.$param['hospital'].'%'];
}
if (!empty($param['note'])){
$where['note']=['like','%'.$param['note'].'%'];
... ...
... ... @@ -85,7 +85,6 @@ class AesController extends HomeBaseController{
}else{
$this->apiResponse(301,'MAC地址未认证');
}
}
public function macToStr($mac){
... ...
... ... @@ -29,9 +29,7 @@
<thead>
<tr>
<th width="50">ID</th>
<th>设备名称</th>
<th>设备锁编号</th>
<th>所在医院</th>
<th>用户ID</th>
<th>使用总时长</th>
<th>使用次数</th>
<th>平均每次使用时长</th>
... ... @@ -45,9 +43,7 @@
<foreach name="data" item="vo">
<tr>
<td><b>{$vo.id}</b></td>
<td>{$vo.eq_name}</td>
<td>{$vo.serial_number}</td>
<td>{$vo.hospital}</td>
<td>{$vo.users_id}</td>
<td>{$vo.sumTime}小时</td>
<td>{$vo.num}次</td>
<td>{$vo.average}小时</td>
... ...