|
@@ -38,14 +38,6 @@ class TagHistory extends CatchController
|
|
|
$create_id = $request->user()->id;
|
|
|
|
|
|
$bool = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 3)->find();
|
|
|
- if ($bool) {
|
|
|
-
|
|
|
- $where[] = ['mac', 'in', '30B5F1013899'];
|
|
|
- $where[] = ['lable', 'in', "3543245626,3544976938,3544261098,1539178988,3544517098,3544959402,3542053498,3543226346,3544413306"];
|
|
|
- } else {
|
|
|
- $where[] = ['mac', 'not in', '30B5F1013899'];
|
|
|
- $where[] = ['lable', 'not in', "3543245626,3544976938,3544261098,1539178988,3544517098,3544959402,3542053498,3543226346,3544413306"];
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
@@ -85,6 +77,14 @@ class TagHistory extends CatchController
|
|
|
return CatchResponse::success('生成报告成功');
|
|
|
}
|
|
|
|
|
|
+ if ($bool) {
|
|
|
+ $where[] = ['mac', 'in', '30B5F1013899'];
|
|
|
+ $where[] = ['lable', 'in', "3543245626,3544976938,3544261098,1539178988,3544517098,3544959402,3542053498,3543226346,3544413306"];
|
|
|
+ } else {
|
|
|
+ $where[] = ['mac', 'not in', '30B5F1013899'];
|
|
|
+ $where[] = ['lable', 'not in', "3543245626,3544976938,3544261098,1539178988,3544517098,3544959402,3542053498,3543226346,3544413306"];
|
|
|
+ }
|
|
|
+
|
|
|
$list = $this->tagHistoryModel->group('mac,lable')->where($where)
|
|
|
->field('mac,lable,max(addTime) as addTime,format(AVG(rssi),2) as ave_rssi,count(*) as num')->select()->toArray();
|
|
|
|