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

interface

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