Explorar o código

调整插入的数据

cqpCow hai 1 ano
pai
achega
9f956d2189
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Service/ThirdService.php

+ 2 - 2
app/Service/ThirdService.php

@@ -23,7 +23,7 @@ class ThirdService extends Service
             $jwkey = [];
             foreach ($list as $k=>$v){
                 $value = 0;
-                $point_name = '';
+                $point_name = $point_name1 = '';
                 switch ($v['device_type_id']){
                     case 1:
                         $value = $this->cgq_rand();
@@ -64,7 +64,7 @@ class ThirdService extends Service
                     'slave_name' => '',
                 ];
                 $insert[] = $detail;
-                if(isset($point_name1)){
+                if(! empty($point_name1)){
                     $detail['data_point_id'] = $k.$k;
                     $detail['data_point_name'] = $point_name1;
                     $detail['value'] = 1;