likang vor 2 Jahren
Ursprung
Commit
00cd43ee49
1 geänderte Dateien mit 4 neuen und 5 gelöschten Zeilen
  1. 4 5
      catch/tag_history/controller/TagHistory.php

+ 4 - 5
catch/tag_history/controller/TagHistory.php

@@ -35,7 +35,7 @@ class TagHistory extends CatchController
         $endtime = isset($data['endtime']) ? $data['endtime'] : "";
         $meter = isset($data['meter']) ? $data['meter'] : "";
         $where = [];
-        $onewhere=[];
+         $onewhere=[];
         $create_id = $request->user()->id;
         //爬楼梯
         $manage = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 2)->find();
@@ -130,9 +130,8 @@ class TagHistory extends CatchController
             
             $value['ave_rssi']= $this->tagHistoryModel->where($towwhere)->where($onewhere)->avg('rssi');
             $list[$key]['ave_rssi'] =  $value['ave_rssi'];
-            
-
-            $value['num']=$this->tagHistoryModel->where($towwhere)->count();
+          
+            $value['num']=$this->tagHistoryModel->where($onewhere)->where($towwhere)->count();
             $list[$key]['num'] = $value['num'];
             $wheres = [];
             $wh = [];
@@ -153,7 +152,7 @@ class TagHistory extends CatchController
             if($shifouRole)
             {
                 $time = $this->tagHistoryModel->where($wh)->max('addTime');
-                
+               
                 if(($value['addTime']-$time)<=90)
                 {
                     $list[$key]['status']=1;