gogs 1 سال پیش
والد
کامیت
1ea90fd2b1
1فایلهای تغییر یافته به همراه20 افزوده شده و 0 حذف شده
  1. 20 0
      app/Http/Controllers/Api/DwyController.php

+ 20 - 0
app/Http/Controllers/Api/DwyController.php

@@ -275,6 +275,26 @@ class DwyController extends BaseController
         return json_encode($data);
     }
 
+    public function boxOut(Request $request)
+    {
+
+        $param = $request->all();
+        //商标绑定
+        $url = 'https://tm.dwycloud.com/jbl/api/module-data/brand_in_stock/brand_in_stock/diy/lead_bind';
+        $header = [
+            'Content-Type:application/json',
+            'Authorization: ' . $request->header('Authorization'),
+        ];
+        $lead_bind = $param['lead_bind'];
+        $this->post_helper($url, json_encode($lead_bind), $header);
+
+        //商标出库
+        $url = 'https://tm.dwycloud.com/jbl/api/module-data/brand_in_stock/brand_in_stock/diy/lead_bind_out_stock';
+        $lead_bind = $param['lead_out'];
+        $this->post_helper($url, json_encode($lead_bind), $header);
+        return ['status'=>200,'success'];
+    }
+
     public function post_helper($url, $data, $header)
     {
         $ch = curl_init();