|
@@ -256,7 +256,7 @@ class dispose
|
|
|
$url_res= curl_http_post(json_encode($url_data),$url,false);
|
|
|
debug_log("InAndOUT","远程返回结果".$url_res);
|
|
|
debug_log("result","正常计算返回的结果".json_encode($url_data));
|
|
|
-
|
|
|
+
|
|
|
$this->temporary_label($this->redis,$data['label'],2);
|
|
|
$status['dirt']=$res;
|
|
|
$status['time']=$time;
|
|
@@ -367,11 +367,56 @@ class dispose
|
|
|
$redis->hSet($key,$label,2);
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 解析日志
|
|
|
+ */
|
|
|
+ public function analysisLog(){
|
|
|
+ $path="D:\公司项目\测试基站\station-test-api\runtime\log\2023-05-15\label_log.log";
|
|
|
+ $file = fopen($path, "rb");
|
|
|
+ debug_log("in_label","开始解析标签");
|
|
|
+ $array=[];
|
|
|
+ $readCvs=function($file){
|
|
|
+ while (feof($file)===false) {
|
|
|
+ # code...
|
|
|
+ yield fgets($file);
|
|
|
+ }
|
|
|
+ fclose($file);
|
|
|
+
|
|
|
+ };
|
|
|
+ debug_log("in_label","解析运行中");
|
|
|
+
|
|
|
+ foreach ($readCvs($file) as $key=>$data) {
|
|
|
+ debug_log("in_label",$data);
|
|
|
+ if(strstr($data,"xsj")){
|
|
|
+ $arr= explode("xsj:",$data);
|
|
|
+ $data= json_decode(trim($arr[1]),true);
|
|
|
+ debug_log("in_label",trim($arr[1]));
|
|
|
+ if(!in_array($data['label'],$array)&&$data["rssi1"]>$data["rssi2"]){
|
|
|
+ array_push($array,$data['label']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ foreach($array as $item){
|
|
|
+ debug_log("in_label",$item);
|
|
|
+ }
|
|
|
+ debug_log("in_label","标签总数".count($array));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|