Zhouzhendong %!s(int64=4) %!d(string=hai) anos
pai
achega
4fc6f698a1

+ 20 - 6
app/Http/Controllers/TestController.php

@@ -12,6 +12,8 @@ use App\Components\ErrorPush;
 use App\ErrorTemp;
 use App\Feature;
 use App\Http\ApiControllers\LoginController;
+use App\Http\Controllers\api\thirdPart\syrius\beans\StorageTypeCell;
+use App\Http\Controllers\api\thirdPart\syrius\beans\StorageTypeRelation;
 use App\Http\Controllers\api\thirdPart\syrius\beans\Task;
 use App\Http\Controllers\api\thirdPart\syrius\beans\TaskItem;
 use App\Http\Controllers\api\thirdPart\syrius\producer\StorageTypeController;
@@ -218,13 +220,25 @@ class TestController extends Controller
         $attributes->weight = 10.1;
         $attributes->width = 10.1;
         $attributes->high = 10.1;
-        $attributes->toolType = \App\Http\Controllers\api\thirdPart\syrius\beans\StorageTypeAttribute::TOOL_TYPE[0];
+        $attributes->toolType = 0;
         $attributes->maxLoad = 55.6;
-        $attributes->layers =
-
-
-        $b->createStorageType();
-
+        $attributes->layers = 2;
+        $attributes->numOfLayerCell = 20;
+        $cell = new StorageTypeCell();
+        $cell->name = "cell";
+        $cell->color = "red";
+        $cell->disassemble = false;
+        $cell->capacity = 50;
+        $cell->length = 30;
+        $cell->width = 30;
+        $cell->high = 30;
+        $relation = new StorageTypeRelation();
+        $relation->storageTypeId = 1;
+        $relation->require = true;
+        $relation->num = 500;
+        //dd($b->getStorageType(1)->body());
+        $c = $b->createStorageType($name,$tag,$attributes->get(),[(array)$cell->get()],[(array)$relation->get()]);
+dd($c->body());
         $sql = <<<SQL
 SELECT ORDERNO,WAVENO,WAREHOUSEID,CUSTOMERID FROM DOC_ORDER_HEADER WHERE ORDERNO = ?
 SQL;

+ 2 - 2
app/Http/Controllers/api/thirdPart/syrius/producer/StorageTypeController.php

@@ -29,7 +29,7 @@ class StorageTypeController extends Controller
             "cells" => $cells,
             "relations" => $relations,
         ];
-        $this->response();
+        return $this->response();
     }
 
     /**
@@ -41,6 +41,6 @@ class StorageTypeController extends Controller
     {
         $this->method = "get";
         $this->url = config("api.syrius.request.find_storage_type").$storageId;
-        $this->response();
+        return $this->response();
     }
 }