소스 검색

Merge remote-tracking branch 'origin/main'

cqpCow 1 년 전
부모
커밋
06e9646180
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      .gitignore
  2. 3 2
      app/Service/ThirdService.php

+ 1 - 0
.gitignore

@@ -11,3 +11,4 @@ Homestead.yaml
 npm-debug.log
 yarn-error.log
 .idea
+.DS_Store

+ 3 - 2
app/Service/ThirdService.php

@@ -28,7 +28,7 @@ class ThirdService extends Service
                     case 1:
                         $value = $this->cgq_rand();
                         $point_name = strpos($v['title'], '温度') !== false ? '温度' : '湿度';
-                        if($this->zt_rand()) $point_name1 = $point_name.'异常';
+                        if($this->zt_rand() === 1) $point_name1 = $point_name.'异常';
                         break;
                     case 2:
                         $value = $this->kg_rand();
@@ -71,6 +71,7 @@ class ThirdService extends Service
                     $insert[] = $detail;
                 }
             }
+            unset($point_name1);
 //            var_dump($insert);die;
             $a = SystemL::insert($insert);
 //            var_dump($a);die;
@@ -94,6 +95,6 @@ class ThirdService extends Service
         return rand(0,1);
     }
     public function zt_rand(){
-        return rand(0,1);
+        return rand(0,5);
     }
 }