Selaa lähdekoodia

为机器人波次处理商品时增加一次库位校长

LD 5 vuotta sitten
vanhempi
commit
fb75e70715
1 muutettua tiedostoa jossa 4 lisäystä ja 5 poistoa
  1. 4 5
      app/Services/OrderCommodityService.php

+ 4 - 5
app/Services/OrderCommodityService.php

@@ -37,14 +37,13 @@ class OrderCommodityService
             ->where('orderno',data_get($orderCommodities,'*.order.code')??[])
             ->where('waveno',data_get($orderCommodities,'*.order.batch.code')??[])
             ->get(['orderno','location','waveno']);
-        foreach($orderCommodities as $orderCommodity){
-            $a=$details
+        foreach($orderCommodities as &$orderCommodity){
+            $orderCommodity['location'] ==$details
                 ->where('orderno',$orderCommodity['order']['code'])
                 ->where('waveno',$orderCommodity['order']['batch']['code'])
-                ->first();
-            dump($a);
+                ->first()['location']??'';
         }
-//        dd($details);
+        return $orderCommodities;
     }
     public function batchUpdate($updateParams){
         return app(BatchUpdateService::class)->batchUpdate('order_commodities',$updateParams);