wang jun 1 year ago
parent
commit
5948f6dbfb

+ 1 - 1
application/common/server/ShouhuanCommand.php

@@ -336,8 +336,8 @@ class ShouhuanCommand
             'LSSET' => [
                 'content' => [
                     'command' => 'LSSET',
-                    'content_custom' => true,
                 ],
+                'content_custom' => true,
                 'kind' => 'send',
                 'need_back' => 1,
             ],

+ 10 - 0
application/common/server/SouhuanAnalysis.php

@@ -2,6 +2,7 @@
 
 namespace app\common\server;
 
+use app\common\model\Devicelistmodel;
 use app\common\model\FacilityModel;
 use app\common\model\ShalarmlistModel;
 use app\common\model\ShinfoModel;
@@ -219,6 +220,7 @@ class SouhuanAnalysis
         ];
         return $data;
     }
+
     /**
      * 内容解析
      *
@@ -826,6 +828,14 @@ class SouhuanAnalysis
             $data['shinfo_id'] = $sshinfo_id;
             $data['facility_id'] = $facility_id;
             $data['createtime'] = date('Y-m-d H:i:s');
+            $result = $this->getmacforUD($original_str, $device_id_code);
+            $data['use_gps_long'] = $result['use_gps_long'];
+            $data['use_gps_lat'] = $result['use_gps_lat'];
+            $data['location'] = $result['address_desc'];
+            $m_dl = new Devicelistmodel();
+            $uid = $m_dl->getuidbydeviceid($device_id_code);
+            $uid = empty($uid) ? 0 : $uid;
+            $data['user_id'] = $uid;
             $said = $m_sa->insertData($data);
             if (empty($said)) {
                 $msg = "报警信息添加失败:" . $original_str;

+ 1 - 1
application/workerman/ShTcp.php

@@ -135,7 +135,7 @@ class ShTcp extends Server
                 Log::write($e->getMessage(), 'shouhuan');
                 Log::write($e->getTraceAsString(), 'shouhuan');
                 var_dump($e->getMessage());
-                var_dump($e->getTraceAsString());
+                //var_dump($e->getTraceAsString());
             }
         }
     }