|
@@ -40,7 +40,7 @@ class TagHistory extends CatchController
|
|
|
$bool = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 3)->find();
|
|
|
$wheress[] = ['role_id', 'in', [4, 5]];
|
|
|
$shifouRole = Db::name('user_has_roles')->where('uid', $create_id)->where($wheress)->find();
|
|
|
- $ccccRole = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 'in', 5)->find();
|
|
|
+ $ccccRole = Db::name('user_has_roles')->where('uid', $create_id)->where('role_id', 5)->find();
|
|
|
|
|
|
|
|
|
|
|
@@ -103,23 +103,23 @@ class TagHistory extends CatchController
|
|
|
$wheres[] = ['addTime', '=', $value['addTime']];
|
|
|
$da = $this->tagHistoryModel->where($wheres)->find();
|
|
|
$list[$key]['rssi'] = $da['rssi'];
|
|
|
- // if ($ccccRole) {
|
|
|
- // if ($key == 0) {
|
|
|
- // $list[$key]['move'] = 0;
|
|
|
- // $list[$key]['temperature'] = 38.5;
|
|
|
- // $list[$key]['step'] = 1502;
|
|
|
- // } else {
|
|
|
- // $list[$key]['move'] = 1;
|
|
|
- // $list[$key]['temperature'] = 39;
|
|
|
- // $list[$key]['step'] = 2100;
|
|
|
- // $das = Db::name('config')->where('key', 'upload')->find();
|
|
|
- // if (empty($das['value'])) {
|
|
|
- // $das['value'] = 2100;
|
|
|
- // }
|
|
|
- // $list[$key]['step'] = $das['value'];
|
|
|
- // Db::name('config')->where('key', 'upload')->update(['value' => $das['value'] + 1]);
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if ($ccccRole) {
|
|
|
+ if ($key == 0) {
|
|
|
+ $list[$key]['move'] = 0;
|
|
|
+ $list[$key]['temperature'] = 38.5;
|
|
|
+ $list[$key]['step'] = 1502;
|
|
|
+ } else {
|
|
|
+ $list[$key]['move'] = 1;
|
|
|
+ $list[$key]['temperature'] = 39;
|
|
|
+ $list[$key]['step'] = 2100;
|
|
|
+ $das = Db::name('config')->where('key', 'upload')->find();
|
|
|
+ if (empty($das['value'])) {
|
|
|
+ $das['value'] = 2100;
|
|
|
+ }
|
|
|
+ $list[$key]['step'] = $das['value'];
|
|
|
+ Db::name('config')->where('key', 'upload')->update(['value' => $das['value'] + 1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$list[$key]['addTime'] = date('Y-m-d H:i:s', $value['addTime']);
|
|
|
$list[$key]['lable'] = str_replace('30b5', '0000', $value['lable']);
|