likang hace 2 años
padre
commit
92e1322e9e
Se han modificado 1 ficheros con 9 adiciones y 10 borrados
  1. 9 10
      catch/api/service/dispose.php

+ 9 - 10
catch/api/service/dispose.php

@@ -520,6 +520,14 @@ public function second_create_direction($mac,$label){
    }else{
         $res=2;
    }
+
+   $frontMax= $this->get_label_history(4,$mac,$label);
+   debug_log("second_dirt","标签.$label.的最朝外的最大值".$frontMax);
+   if($frontMax>65){
+       debug_log("second_dirt","标签.$label.的最朝外的最小值大于65不参与计算");
+       return false;
+   }
+
    //早上对"进寝室不做二次计算
 
    $start_time=strtotime(date("Y-m-d",time()));
@@ -541,22 +549,13 @@ public function second_create_direction($mac,$label){
             debug_log("second_dirt","间隔时间第一个小时,且方向相同 不做二次计算".$interval_time);
             if($interval_time<1*60*60){
                 return false;
-            }else{
-                $frontMax= $this->get_label_history(4,$mac,$label);
-                //$backMax=$this->get_label_history(5,$mac,$label);
-                debug_log("second_dirt","标签.$label.的最朝外的最大值".$frontMax);
-                if($frontMax>65){
-                    debug_log("second_dirt","标签.$label.的最朝外的最小值大于65不参与计算");
-                    return false;
-                }
-
-
             }
         }
 
     }else{
         debug_log("second_dirt","数据为空,进行生成");
     }
+