Jelajahi Sumber

推单修复

Zhouzhendong 4 tahun lalu
induk
melakukan
a1805a9661

+ 4 - 5
app/Http/Controllers/TestController.php

@@ -6,8 +6,10 @@ use App\Components\AsyncResponse;
 use App\Components\ErrorPush;
 use App\ErrorTemp;
 use App\Feature;
+use App\Jobs\OrderCreateWaybill;
 use App\MaterialBox;
 use App\MaterialBoxModel;
+use App\Order;
 use App\Owner;
 use App\OwnerFeeDetail;
 use App\OwnerPriceOperation;
@@ -59,11 +61,8 @@ class TestController extends Controller
     private $key = "CACHE_SHELF_AVAILABLE";
     public function test()
     {
-        $a = new Collection(["a","b"]);
-        dd($a->filter(function ($b){
-            if ($b=="a")return true;
-            else return false;
-        }));
+        $order = Order::query()->find(3767159);
+        app("WaybillService")->createDbBill($order);
     }
 
 }

+ 2 - 0
app/Providers/AppServiceProvider.php

@@ -107,6 +107,7 @@ use App\Services\UserOwnerGroupService;
 use App\Services\UserService;
 use App\Services\WarehouseService;
 use App\Services\WaybillFinancialService;
+use App\Services\WaybillService;
 use App\Services\WeighExceptedService;
 use App\Services\OrderFreezeService;
 use App\Services\RegionService;
@@ -378,6 +379,7 @@ class AppServiceProvider extends ServiceProvider
         app()->singleton('WarehouseService', WarehouseService::class);
         app()->singleton('WaybillFinancialService', WaybillFinancialService::class);
         app()->singleton('WeighExceptedService', WeighExceptedService::class);
+        app()->singleton('WaybillService', WaybillService::class);
     }
 
     private function registerObserver()

+ 1 - 1
app/Services/OrderService.php

@@ -713,7 +713,7 @@ class OrderService
                 $arr = $inner_params->toArray();
                 $this->insert($arr,false,false,false);
                 dispatch(new OrderFreeze($arr));
-                dispatch(new OrderCreateWaybill($arr));
+                //dispatch(new OrderCreateWaybill($arr));
             });
         }
         unset($created_params);