cqp 13 hours ago
parent
commit
8829948d54
3 changed files with 14 additions and 2 deletions
  1. 11 0
      app/Http/Controllers/Api/TestController.php
  2. 2 2
      app/Service/TestService.php
  3. 1 0
      routes/api.php

+ 11 - 0
app/Http/Controllers/Api/TestController.php

@@ -126,6 +126,17 @@ class TestController extends BaseController
         }
     }
 
+    public function productInByZj(Request $request){
+        $common_array = $request->common_param;
+        list($bool, $data) = (new TestService())->productInByZj($request->all(), $common_array);
+
+        if($bool){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
     public function purchaseInAddU8(Request $request){
         $common_array = $request->common_param;
         list($bool, $data) = (new TestService())->purchaseInByZj($request->all(), $common_array);

+ 2 - 2
app/Service/TestService.php

@@ -676,9 +676,9 @@ class TestService extends Service
             "Data" => [
                 "iHead" => [
                     "cWhCode"     => $data['warehouseCode'] ?? "01", // 默认产成品库
-                    "cRdCode"     => "105", // 入库类别
+                    "cRdCode"     =>  $data['cRdCode'] ?? "105", // 入库类别
                     "cDepCode"    => null,
-                    "cMemo"       => "接口生成",
+                    "cMemo"         => $data['cMemo'] ?? "接口生成",
                     "cSource"     => "库存",
                     "cBusType"    => "成品入库",
                     "dDate"       => date("Y-m-d"),

+ 1 - 0
routes/api.php

@@ -78,6 +78,7 @@ Route::group(['middleware'=> ['CheckU8']],function ($route){
     $route->any('purchaseOrderGet', 'Api\TestController@purchaseOrderGet');
     $route->any('materialAddU8', 'Api\TestController@materialAddU8')->middleware('U8Deal');
     $route->any('productInAddU8', 'Api\TestController@productInAddU8')->middleware('U8Deal');
+    $route->any('productInAddU8New', 'Api\TestController@productInByZj')->middleware('U8Deal');
     $route->any('purchaseInAddU8', 'Api\TestController@purchaseInAddU8')->middleware('U8Deal');
     $route->any('otherInAddU8', 'Api\TestController@otherInAddU8')->middleware('U8Deal');
     $route->any('dispatchAddU8', 'Api\TestController@dispatchAddU8')->middleware('U8Deal');