Ver código fonte

Merge branch 'master' of http://gogs.renlianiot.com:4000/zmcoding/smart-tool-api

tongshanglei 2 anos atrás
pai
commit
2d79a7f8cb
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      catch/worklocation/model/WorkLocation.php

+ 8 - 1
catch/worklocation/model/WorkLocation.php

@@ -50,7 +50,7 @@ class Worklocation extends Model
     {
             return $this->dataRange()
             ->catchSearch()
-            ->append(['department_name','wind_name','fan_number','work_local_name','parts_name','bolt_style_name','boit_type_name'])
+            ->append(['department_name','wind_name','fan_number','work_local_name','parts_name','bolt_style_name','boit_type_name','work_name'])
             ->field('*')
             ->catchOrder()
             ->creator()
@@ -76,6 +76,13 @@ class Worklocation extends Model
         return $wind_name;
 
     }
+    //获取操作人员
+    public function getWorkNameAttr()
+    {
+        $user_id = $this->creator_id;
+        $name =  Db::name("users")->where('id',$user_id)->value('realname');
+        return $name;
+    }
    
     /**
      * 获取风机机位号