Zhouzhendong 4 лет назад
Родитель
Сommit
c5c9b9f582

+ 10 - 7
app/Http/Controllers/TestController.php

@@ -224,13 +224,16 @@ class TestController extends Controller
     }
     public function test()
     {
-
-        $a = memory_get_usage();
-        $tmp = str_repeat('http://blog.huachen.me/', 4000);
-        $b = memory_get_usage();
-        dump($b-$a);
-        dd(Notification::send(User::query()->where("name","zhouzhendong")->get(),
-            new RoutineNotification(SeeLog::query()->first()->toArray())));
+        $ForeignHaiRoboticsService = new ForeignHaiRoboticsService();
+        $stationService = new StationService();
+        $station = Station::query()->find(14);
+        $station->materialBox = MaterialBox::query()->where("code","IDE0002482")->first();
+
+        /** @var StationTaskMaterialBox $stationTaskMaterialBox */
+        $stationTaskMaterialBox = app("StorageService")->createWarehousingTask($stationService->getStation_byType('立库')["id"],$station->materialBox->id);
+        app("CacheShelfService")->lightUp($station->code,'3','0',['title'=>"等待机器人拿走,请勿操作"]);
+        Cache::forever("CACHE_SHELF_OCCUPANCY_{$station->id}",true);
+        dd($ForeignHaiRoboticsService->putBinToStore_fromCacheShelf($stationTaskMaterialBox, $station));
         $user = Auth::user();
         $remark = "zengjunlj";
         $ownerName = 'zengjunlj' ?? '';

+ 1 - 2
app/Jobs/HandleExceptionWaybill.php

@@ -8,11 +8,10 @@ use Illuminate\Bus\Queueable;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Foundation\Bus\Dispatchable;
 use Illuminate\Queue\InteractsWithQueue;
-use Illuminate\Queue\SerializesModels;
 
 class HandleExceptionWaybill implements ShouldQueue
 {
-    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+    use Dispatchable, InteractsWithQueue, Queueable;
 
     /** @var Waybill|\stdClass */
     protected $waybill;

+ 3 - 3
app/Services/OrderPackageService.php

@@ -281,7 +281,7 @@ class OrderPackageService
         $update_params = [];
         $update_params[] = ['id', 'sent_at'];
         foreach ($packages as $package) {
-            if ($package->sent_at && !isset($map[$package->logistic_number])) continue;
+            if ($package->sent_at || !isset($map[$package->logistic_number])) continue;
             list($allocation,$orderHeader) = $map[$package->logistic_number];
             try {
                 $checktime = $allocation->checktime;
@@ -318,10 +318,10 @@ class OrderPackageService
             Log::warning("自动揽收跳出",["status"=>$package->order->wms_status]);
             return;
         }
-        if ($orderHeader->edisendflag!='Y' && !app("OrderService")->manualBack($orderHeader->orderno)){
+        /*if ($orderHeader->edisendflag!='Y' && !app("OrderService")->manualBack($orderHeader->orderno)){
             Log::warning("揽收回传失败",["status"=>$orderHeader->orderno]);
             return;
-        }
+        }*/
         dispatch(new PackageCollectingAllocation($package,$lineNo));
     }