Browse Source

file-batch-bim-view

peterguo 1 month ago
parent
commit
8835631ede

+ 1 - 2
app/Http/Controllers/API/FileController.php

@@ -305,8 +305,7 @@ class FileController extends Controller
             };
             $data[] = [
                 'bim_driver' => $bimFile->bim_driver,
-                'bim_view' => $result,
-                'file' => new FileSimpleResource($file)
+                'bim_view' => $result
             ];
         }
 

+ 0 - 13
app/Libraries/BIM/Glendale/Client.php

@@ -54,19 +54,6 @@ class Client
         return $this->request("POST", $uri, $options);
     }
 
-    public function postAsync(string $uri, array $options = []): ?array
-    {
-        $data = [];
-        Log::debug('send to glendale engine url: ' . $uri);
-        Log::debug('send to glendale engine input: ', $options);
-        $response = $this->client->postAsync($uri, $options);
-        $response->then(function (ResponseInterface $res) use (&$data) {
-            $data = $this->parseResponse($res);
-        });
-
-        return $data;
-    }
-
     public function get(string $uri, array $params = [])
     {
         return $this->request("GET", $uri, [

+ 2 - 2
app/Libraries/BIM/Glendale/Glendale.php

@@ -289,13 +289,13 @@ class Glendale extends BIMAbstract
         }
 
         if ($bimFile->model_type == BimFileModelType::GIS->value) {
-            $result = Client::getInstance()->postAsync('/api/app/gismodel/QueryModelInfo', [
+            $result = Client::getInstance()->post('/api/app/gismodel/QueryModelInfo', [
                 'query' => [
                     'LightweightName' => $bimFile->bim_data_set_id
                 ]
             ]);
         } else {
-            $result = Client::getInstance()->postAsync('/api/app/model/query-model-info', [
+            $result = Client::getInstance()->post('/api/app/model/query-model-info', [
                 'query' => [
                     'LightweightName' => $bimFile->bim_data_set_id
                 ]