tongshanglei 2 years ago
parent
commit
b49c44527f
2 changed files with 21 additions and 10 deletions
  1. 20 9
      catch/hydraulic/model/HydEquipment.php
  2. 1 1
      catch/map/controller/RouteMap.php

+ 20 - 9
catch/hydraulic/model/HydEquipment.php

@@ -55,6 +55,26 @@ class HydEquipment extends Model
         // 软删除
         'deleted_at',
     );
+    public function getList()
+    {
+        $res =  $this->dataRange()
+            ->catchSearch()
+            ->append(['classification', 'equ_type_name', 'list', 'status1', 'check_status1'])
+            ->order($this->aliasField('id'), 'desc')
+            ->paginate();
+        return $res;
+    }
+    /**
+     * 获取轨迹地图列表定位不分页 只查询有定位时间的
+     */
+    public function queryLocationList()
+    {
+        $res = $this->dataRange()
+                    ->catchSearch()
+                   
+                    ->select();
+        return $res;
+    }
     //物料号搜索
     public function searchMaterialNumberAttr($query, $value, $data)
     {
@@ -88,15 +108,6 @@ class HydEquipment extends Model
         }
         return $query->where('equipment_type', 'in', $ids);
     }
-    public function getList()
-    {
-        $res =  $this->dataRange()
-            ->catchSearch()
-            ->append(['classification', 'equ_type_name', 'list', 'status1', 'check_status1'])
-            ->order($this->aliasField('id'), 'desc')
-            ->paginate();
-        return $res;
-    }
     public function getEquipmentTypeAttr()
     {
         $id = $this->getData('equipment_type');

+ 1 - 1
catch/map/controller/RouteMap.php

@@ -8,7 +8,7 @@ use catcher\base\CatchController;
 use Aliyun\OTS\OTSClient;
 
 
-use catchAdmin\hydraulic\model\Hydraulic as deviceModel;
+use catchAdmin\hydraulic\model\HydEquipment as deviceModel;
 use catchAdmin\fences\model\Fences as fencesModel;
 use catchAdmin\hydraulic\model\HydEquipment;
 use think\facade\Db;