Forráskód Böngészése

添加退货管理承运商权限访问

eric2h 4 éve
szülő
commit
8f7659e268

+ 1 - 1
app/Services/LogisticService.php

@@ -129,7 +129,7 @@ class LogisticService implements UserFilter
         $query = Logistic::query()->select("id");
         if (!app("UserService")->checkAdminIdentity($userId)){
             $query->whereHas("users",function ($query)use($userId){
-                $query->where("id",$userId);
+                $query->where("users.id",$userId);
             });
         }
         return $query;

+ 1 - 1
app/Services/RejectedService.php

@@ -39,7 +39,7 @@ class RejectedService
             ->where(function ($query)use ($owners){
                 /** @var Builder $query */
                 $query->whereIn('rejected_bills.id_owner', $owners)
-                    ->orWhereIn("id_logistic_return",app("LogisticService")->getQuery());
+                    ->orWhereIn("rejected_bills.id_logistic_return",app("LogisticService")->getQuery());
             });
         if (array_search("397",$owners)!==false){
             $rejectedBills->with(["items.barcode.commodity"=>function($query){

+ 1 - 1
app/Services/StorageService.php

@@ -311,7 +311,7 @@ SQL;
             $sum += (int)$task->fmqty;
             if ((int)$task->fmqty>$amount)$maxIndex = $i;
         }
-        if ($sum<$amount)return []; //上架数大于入库数
+            if ($sum<$amount)return []; //上架数大于入库数
         $result = $this->getMatch($nums,$amount);
         if (!$result)return $this->splitTask($tasks,$maxIndex,$amount);
         $arr = [];