cqp 1 month ago
parent
commit
44fdcbd07b
3 changed files with 41 additions and 0 deletions
  1. 26 0
      app/Http/Controllers/Api/EmployeeController.php
  2. 13 0
      app/Model/DepartWithDHF.php
  3. 2 0
      routes/api.php

+ 26 - 0
app/Http/Controllers/Api/EmployeeController.php

@@ -211,6 +211,32 @@ class EmployeeController extends BaseController
         }
     }
 
+    public function departSetDaHuangFengID(Request $request)
+    {
+        $service = new EmployeeService();
+        $user = $request->userData->toArray();
+        list($status,$data) = $service->departSetDaHuangFengID($request->all(),$user);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function getDepartDaHuangFengID(Request $request)
+    {
+        $service = new EmployeeService();
+        $user = $request->userData->toArray();
+        list($status,$data) = $service->getDepartDaHuangFengID($request->all(),$user);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
     public function departEdit(Request $request)
     {
         $service = new EmployeeService();

+ 13 - 0
app/Model/DepartWithDHF.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Model;
+
+use Illuminate\Database\Eloquent\Model;
+
+class DepartWithDHF extends Model
+{
+    protected $table = "depart_with_dhf"; //指定表
+    const CREATED_AT = 'crt_time';
+    const UPDATED_AT = 'upd_time';
+    protected $dateFormat = 'U';
+}

+ 2 - 0
routes/api.php

@@ -85,6 +85,8 @@ Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('departDel', 'Api\EmployeeController@departDel');
     $route->any('departList', 'Api\EmployeeController@departList');
     $route->any('departSetIndex', 'Api\EmployeeController@departSetIndex');
+    $route->any('departSetDaHuangFengID', 'Api\EmployeeController@departSetDaHuangFengID');
+    $route->any('getDepartDaHuangFengID', 'Api\EmployeeController@getDepartDaHuangFengID');
 
     $route->any('roleAdd', 'Api\EmployeeController@roleAdd');
     $route->any('roleEdit', 'Api\EmployeeController@roleEdit');