|
@@ -35,6 +35,7 @@ class TagHistory extends CatchController
|
|
|
$endtime = isset($data['endtime']) ? $data['endtime'] : "";
|
|
|
$meter = isset($data['meter']) ? $data['meter'] : "";
|
|
|
$where = [];
|
|
|
+ $onewhere=[];
|
|
|
$create_id = $request->user()->id;
|
|
|
//爬楼梯
|
|
|
$manage = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 2)->find();
|
|
@@ -121,13 +122,16 @@ class TagHistory extends CatchController
|
|
|
['mac', '=', $value['mac']],
|
|
|
['lable', '=', $value['lable']]
|
|
|
];
|
|
|
-
|
|
|
+ //上报时间
|
|
|
$value['addTime'] = $this->tagHistoryModel->
|
|
|
where($towwhere)->max('addTime');
|
|
|
|
|
|
$list[$key]['addTime'] = $value['addTime'];
|
|
|
+
|
|
|
$value['ave_rssi']= $this->tagHistoryModel->where($towwhere)->where($onewhere)->avg('rssi');
|
|
|
$list[$key]['ave_rssi'] = $value['ave_rssi'];
|
|
|
+ var_dump($onewhere);
|
|
|
+
|
|
|
$value['num']=$this->tagHistoryModel->where($onewhere)->where($towwhere)->count();
|
|
|
$list[$key]['num'] = $value['num'];
|
|
|
$wheres = [];
|