|
@@ -136,18 +136,6 @@ class Api extends CatchController
|
|
$rssiIn = 60;
|
|
$rssiIn = 60;
|
|
}
|
|
}
|
|
|
|
|
|
- //资产盘点调测代码
|
|
|
|
- if ($mac = '634669') {
|
|
|
|
- # code...
|
|
|
|
- $assetData = [
|
|
|
|
- 'label' => $label,
|
|
|
|
- 'ant' => 1,
|
|
|
|
- 'rssi' => $DA['rssi1'],
|
|
|
|
- 'time' => $time,
|
|
|
|
- ];
|
|
|
|
- $ues_redis->lpush('asset_after_handle',json_encode($deDa));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if($DA['rssi1']<=$rssiIn||$DA['rssi2']<=$rssiIn||$DA['rssi3']<=$rssiIn||$DA['rssi4']<=$rssiIn){
|
|
if($DA['rssi1']<=$rssiIn||$DA['rssi2']<=$rssiIn||$DA['rssi3']<=$rssiIn||$DA['rssi4']<=$rssiIn){
|
|
//原始数据只要其中有一条信号小于72 都参与计算
|
|
//原始数据只要其中有一条信号小于72 都参与计算
|
|
$vs=true;
|
|
$vs=true;
|
|
@@ -1129,13 +1117,23 @@ class Api extends CatchController
|
|
$flagIn = $avg["front"] < $config["front_in"] || $avg["behind"] < $config["behind_in"] || $avg["left"] < $config["left_in"] || $avg["right"] < $config["right_in"];
|
|
$flagIn = $avg["front"] < $config["front_in"] || $avg["behind"] < $config["behind_in"] || $avg["left"] < $config["left_in"] || $avg["right"] < $config["right_in"];
|
|
$flagOut = $avg["front"] > $config["front_out"] && $avg["behind"] > $config["behind_out"] && $avg["left"] > $config["left_out"] && $avg["right"] > $config["right_out"];
|
|
$flagOut = $avg["front"] > $config["front_out"] && $avg["behind"] > $config["behind_out"] && $avg["left"] > $config["left_out"] && $avg["right"] > $config["right_out"];
|
|
|
|
|
|
|
|
+ if ($info['mac'] == '638101') {
|
|
|
|
+ # code...
|
|
|
|
+ echo '-------------label:'.$info['id'].'------------------'.PHP_EOL;
|
|
|
|
+ var_dump($info['first_in_time'],$info['time'], $info['pushTime'], $flagIn, $flagOut);
|
|
|
|
+ }
|
|
|
|
|
|
- if($flagIn){
|
|
|
|
|
|
+ if($flagIn && $status == 2){
|
|
// if($flagIn && ($status == 2 || $status == 3) ){
|
|
// if($flagIn && ($status == 2 || $status == 3) ){
|
|
// if($flagIn){
|
|
// if($flagIn){
|
|
$inoutIntFilter = $ues_redis->hget("anbang_four_wire", "anbang_4rssi_intFilter");
|
|
$inoutIntFilter = $ues_redis->hget("anbang_four_wire", "anbang_4rssi_intFilter");
|
|
- $inoutIntFilter = $inoutIntFilter ? $inoutIntFilter : 20;
|
|
|
|
- if ($info["pushTime"] && (time()-$info['pushTime']) < $inoutIntFilter ) {
|
|
|
|
|
|
+ $inoutIntFilter = $inoutIntFilter ? $inoutIntFilter : 120;
|
|
|
|
+
|
|
|
|
+ if(!$info['first_in_time']){
|
|
|
|
+ $info['first_in_time'] = time();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($info["pushTime"] && (time()-$info['pushTime']) < 120 ) {
|
|
# code...
|
|
# code...
|
|
return $info;
|
|
return $info;
|
|
}
|
|
}
|
|
@@ -1159,9 +1157,9 @@ class Api extends CatchController
|
|
// }
|
|
// }
|
|
|
|
|
|
// }
|
|
// }
|
|
- $expInt =$info["time"]-$info["first_time"];
|
|
|
|
|
|
+ $expInt =$info["time"]-$info["first_in_time"];
|
|
|
|
|
|
- if ($expInt >= 120 && !key_exists('pushTime', $info)) {
|
|
|
|
|
|
+ if ($expInt >= 100 ) {
|
|
//推送进
|
|
//推送进
|
|
$info['status'] = 1;
|
|
$info['status'] = 1;
|
|
# code...
|
|
# code...
|
|
@@ -1190,6 +1188,7 @@ class Api extends CatchController
|
|
// var_dump($flagIn, $flagOut, $status, $avg["front"],$avg["behind"],$avg["left"], $avg["right"]);
|
|
// var_dump($flagIn, $flagOut, $status, $avg["front"],$avg["behind"],$avg["left"], $avg["right"]);
|
|
// }
|
|
// }
|
|
if($flagOut && $status == 1){
|
|
if($flagOut && $status == 1){
|
|
|
|
+ $info["first_in_time"] = null;
|
|
if ($info["pushTime"] && (time()-$info['pushTime']) < 2 ) {
|
|
if ($info["pushTime"] && (time()-$info['pushTime']) < 2 ) {
|
|
# code...
|
|
# code...
|
|
return $info;
|
|
return $info;
|