cqp 8 horas atrás
pai
commit
61371899d3
1 arquivos alterados com 11 adições e 11 exclusões
  1. 11 11
      app/Service/TestService.php

+ 11 - 11
app/Service/TestService.php

@@ -715,9 +715,9 @@ class TestService extends Service
         } elseif ($common_array['site'] == "HCLT") {
             //根据存货获取自由项的配置
             $service = new U8ThirtyPartyDatabaseServerService($common_array);
-            list($status, $msg) = $service->getStockFreeItemsByInvCode([$product_code]);
-            if(! $status) return [false, $msg];
-            $p_control = $msg;
+            list($status, $msg1) = $service->getStockFreeItemsByInvCode([$product_code]);
+            if(! $status) return [false, $msg1];
+            $p_control = $msg1;
             $cFree1 = $cFree2 = $cFree3 = null;
             $cFree1_n = $p_control[$product_code]['free1'] ?? 0;
             $cFree2_n = $p_control[$product_code]['free2'] ?? 0;
@@ -750,8 +750,8 @@ class TestService extends Service
         $final_data = [$tmp];
 
         // 调用参数
-        $host = $msg['host'] ?? "";
-        $token = $msg['token'] ?? "";
+        list($host, $token) = $msg;
+
         $url = $host . "/api/ProductIn/Add";
         $header = ["Authorization: {$token}", 'Content-Type:application/json'];
 
@@ -826,9 +826,9 @@ class TestService extends Service
             $product_code = $data['material_code'];
             //根据存货获取自由项的配置
             $service = new U8ThirtyPartyDatabaseServerService($common_array);
-            list($status, $msg) = $service->getStockFreeItemsByInvCode([$product_code]);
-            if(! $status) return [false, $msg];
-            $p_control = $msg;
+            list($status, $msg1) = $service->getStockFreeItemsByInvCode([$product_code]);
+            if(! $status) return [false, $msg1];
+            $p_control = $msg1;
             $cFree1 = $cFree2 = $cFree3 = null;
             $cFree1_n = $p_control[$product_code]['free1'] ?? 0;
             $cFree2_n = $p_control[$product_code]['free2'] ?? 0;
@@ -930,9 +930,9 @@ class TestService extends Service
             $product_code = $data['material_code'];
             //根据存货获取自由项的配置
             $service = new U8ThirtyPartyDatabaseServerService($common_array);
-            list($status, $msg) = $service->getStockFreeItemsByInvCode([$product_code]);
-            if(! $status) return [false, $msg];
-            $p_control = $msg;
+            list($status, $msg1) = $service->getStockFreeItemsByInvCode([$product_code]);
+            if(! $status) return [false, $msg1];
+            $p_control = $msg1;
             $cFree1 = $cFree2 = $cFree3 = null;
             $cFree1_n = $p_control[$product_code]['free1'] ?? 0;
             $cFree2_n = $p_control[$product_code]['free2'] ?? 0;