ajun 4 rokov pred
rodič
commit
15ec3fc113
1 zmenil súbory, kde vykonal 10 pridanie a 10 odobranie
  1. 10 10
      app/Filters/WorkOrderFilters.php

+ 10 - 10
app/Filters/WorkOrderFilters.php

@@ -75,14 +75,14 @@ class WorkOrderFilters
             $this->getOrderQuery()->whereIn('owner_id', app('UserService')->getPermittingOwnerIds(Auth::user())??[]);
         }
 
-        $user = Auth::user();
-        $logistic_ids = App('LogisticService')->getPermittingLogisticIds($user);
-        $owner_id = app('UserService')->getPermittingOwnerIds($user);
-
-        $this->getOrderQuery()->where(function($query)use ($owner_id,$logistic_ids){
-            $query->whereIn('owner_id',$owner_id)->orWhereIn('logistic_id',$logistic_ids);
-        });
-//        $this->afterFilter();
+//        $user = Auth::user();
+//        $logistic_ids = App('LogisticService')->getPermittingLogisticIds($user);
+//        $owner_id = app('UserService')->getPermittingOwnerIds($user);
+//
+//        $this->getOrderQuery()->where(function($query)use ($owner_id,$logistic_ids){
+//            $query->whereIn('owner_id',$owner_id)->orWhereIn('logistic_id',$logistic_ids);
+//        });
+        $this->afterFilter();
     }
 
     private function afterFilter(){
@@ -94,9 +94,9 @@ class WorkOrderFilters
 
         $owner_ids = app('UserService')->getPermittingOwnerIds($user);
 
-//        $this->afterFilterLogistic($orderQuery,$owner_ids,$logistic_ids);
+        $this->afterFilterLogistic($orderQuery,$owner_ids,$logistic_ids);
 
-        $this->afterFilterOwner($orderQuery,$owner_ids,);
+        $this->afterFilterOwner($orderQuery,$owner_ids);
     }
 
     // 可见货主过滤