فهرست منبع

大王椰出入库

cqpCow 1 سال پیش
والد
کامیت
011118a79f
1فایلهای تغییر یافته به همراه47 افزوده شده و 1 حذف شده
  1. 47 1
      app/Jobs/DoorDeviceJob.php

+ 47 - 1
app/Jobs/DoorDeviceJob.php

@@ -221,8 +221,13 @@ class DoorDeviceJob implements ShouldQueue
             $url = 'http://121.36.142.167:7774/jbl/api/module-data/picking_out/picking_out';
             $url = 'http://121.36.142.167:7774/jbl/api/module-data/picking_out/picking_out';
             $dynamicFormId = "473763313217908736";
             $dynamicFormId = "473763313217908736";
             $showModelId = "473771977253269504";
             $showModelId = "473771977253269504";
+            $item = 0;
+            $site_b = $site_b_show = "";
             foreach ($data as $value){
             foreach ($data as $value){
                 if(empty($value['box_orders']['delivery_status'])){
                 if(empty($value['box_orders']['delivery_status'])){
+                    $item = $item + 1;
+                    if(empty($site_b)) $site_b = $value['site'];
+                    if(empty($site_b_show)) $site_b_show = $value['site_show'];
                     $main_dtl[] = [
                     $main_dtl[] = [
                         "product_code"=> $value['brand_code'],
                         "product_code"=> $value['brand_code'],
                         "product_title"=> $value['product_title'],
                         "product_title"=> $value['product_title'],
@@ -234,6 +239,20 @@ class DoorDeviceJob implements ShouldQueue
                         "color_code"=> $value['color_code'],
                         "color_code"=> $value['color_code'],
                         "color_code_two"=> $value['color_code_two'],
                         "color_code_two"=> $value['color_code_two'],
                         "in_num"=> $value['box_num'],
                         "in_num"=> $value['box_num'],
+                        "bus_type" => "BOX",
+                        "bus_type_show" => "包装明细",
+                        "bus_id" => $value['box_orders']['id'],
+                        "bus_no" => $value['box_orders']['defective_order_no'],
+                        "item_num" => $item,
+                        "bus_item_no" => $value['item_num'],
+                        "bus_item_id" => $value['id'],
+                        "order_no" => $value['order_no'],
+                        "customer_no" => $value['customer_no'],
+                        "customer_name" => $value['customer_name'],
+                        "dealer_no" => $value['dealer_no'],
+                        "dealer_name" => $value['dealer_name'],
+                        "site" => $value['site'],
+                        "site_show" => $value['site_show'],
                     ];
                     ];
                     if(! in_array($value['box_orders']['defective_order_no'], $orderNo)) $orderNo[] = $value['box_orders']['defective_order_no'];
                     if(! in_array($value['box_orders']['defective_order_no'], $orderNo)) $orderNo[] = $value['box_orders']['defective_order_no'];
                 }
                 }
@@ -245,6 +264,10 @@ class DoorDeviceJob implements ShouldQueue
                     'box_title' => 'WH05001',
                     'box_title' => 'WH05001',
                     'out_time' => gmdate("Y-m-d\TH:i:s.000\Z"),
                     'out_time' => gmdate("Y-m-d\TH:i:s.000\Z"),
                     'status' => "NOT_APPROVED",
                     'status' => "NOT_APPROVED",
+                    'in_out_type_show' => "通道门成品出库",
+                    'box_title_show' => "成品仓",
+                    "site" => $site_b,
+                    "site_show" => $site_b_show
                 ],
                 ],
                 'picking_out_product' => $main_dtl
                 'picking_out_product' => $main_dtl
             ];
             ];
@@ -308,7 +331,7 @@ class DoorDeviceJob implements ShouldQueue
             //获取包装单产品
             //获取包装单产品
             $dispatchList = $this->getDispatchListCs($order_number);
             $dispatchList = $this->getDispatchListCs($order_number);
             if(empty($dispatchList) || empty($dispatchList['data'])) {
             if(empty($dispatchList) || empty($dispatchList['data'])) {
-                file_put_contents('record_door_result.txt',date("Y-m-d H:i:s",time()).'getlist_end'.PHP_EOL,8);
+                file_put_contents('record_door_result_cs.txt',date("Y-m-d H:i:s",time()).'getlist_end'.PHP_EOL,8);
                 return;
                 return;
             }
             }
             $this->completionOrdersCs($dispatchList['data'],$type);
             $this->completionOrdersCs($dispatchList['data'],$type);
@@ -472,8 +495,13 @@ class DoorDeviceJob implements ShouldQueue
             $url = 'http://122.112.250.253:7774/jbl/api/module-data/picking_out/picking_out';
             $url = 'http://122.112.250.253:7774/jbl/api/module-data/picking_out/picking_out';
             $dynamicFormId = "473763313217908736";
             $dynamicFormId = "473763313217908736";
             $showModelId = "473771977253269504";
             $showModelId = "473771977253269504";
+            $item = 0;
+            $site_b = $site_b_show = "";
             foreach ($data as $value){
             foreach ($data as $value){
                 if(empty($value['box_orders']['delivery_status'])){
                 if(empty($value['box_orders']['delivery_status'])){
+                    $item = $item + 1;
+                    if(empty($site_b)) $site_b = $value['site'];
+                    if(empty($site_b_show)) $site_b_show = $value['site_show'];
                     $main_dtl[] = [
                     $main_dtl[] = [
                         "product_code"=> $value['brand_code'],
                         "product_code"=> $value['brand_code'],
                         "product_title"=> $value['product_title'],
                         "product_title"=> $value['product_title'],
@@ -485,6 +513,20 @@ class DoorDeviceJob implements ShouldQueue
                         "color_code"=> $value['color_code'],
                         "color_code"=> $value['color_code'],
                         "color_code_two"=> $value['color_code_two'],
                         "color_code_two"=> $value['color_code_two'],
                         "in_num"=> $value['box_num'],
                         "in_num"=> $value['box_num'],
+                        "bus_type" => "BOX",
+                        "bus_type_show" => "包装明细",
+                        "bus_id" => $value['box_orders']['id'],
+                        "bus_no" => $value['box_orders']['defective_order_no'],
+                        "item_num" => $item,
+                        "bus_item_no" => $value['item_num'],
+                        "bus_item_id" => $value['id'],
+                        "order_no" => $value['order_no'],
+                        "customer_no" => $value['customer_no'],
+                        "customer_name" => $value['customer_name'],
+                        "dealer_no" => $value['dealer_no'],
+                        "dealer_name" => $value['dealer_name'],
+                        "site" => $value['site'],
+                        "site_show" => $value['site_show'],
                     ];
                     ];
                     if(! in_array($value['box_orders']['defective_order_no'], $orderNo)) $orderNo[] = $value['box_orders']['defective_order_no'];
                     if(! in_array($value['box_orders']['defective_order_no'], $orderNo)) $orderNo[] = $value['box_orders']['defective_order_no'];
                 }
                 }
@@ -496,6 +538,10 @@ class DoorDeviceJob implements ShouldQueue
                     'box_title' => 'WH05001',
                     'box_title' => 'WH05001',
                     'out_time' => gmdate("Y-m-d\TH:i:s.000\Z"),
                     'out_time' => gmdate("Y-m-d\TH:i:s.000\Z"),
                     'status' => "NOT_APPROVED",
                     'status' => "NOT_APPROVED",
+                    'in_out_type_show' => "通道门成品出库",
+                    'box_title_show' => "成品仓",
+                    "site" => $site_b,
+                    "site_show" => $site_b_show
                 ],
                 ],
                 'picking_out_product' => $main_dtl
                 'picking_out_product' => $main_dtl
             ];
             ];