|
|
@@ -83,40 +83,6 @@ class BatchService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// public function directTemp($batches){
|
|
|
-// $ownerName='';
|
|
|
-// $batches=$batches->map(function(Batch $batch)use($ownerName){
|
|
|
-// $owner=Owner::query()->where('name',$ownerName)->get();
|
|
|
-// if(!$owner) return false;
|
|
|
-// if($batch['owner_id']==$owner['id'])return $batch;
|
|
|
-// return false;
|
|
|
-// });
|
|
|
-// $bins=$batches->map(function (Batch $batch){
|
|
|
-// $batch->loadMissing('orders.orderCommodities');
|
|
|
-//
|
|
|
-// foreach ($batch['orders'] as $order){
|
|
|
-// foreach ($order['orderCommodities'] as $orderCommodity){
|
|
|
-// return [
|
|
|
-// "taskCode" =>'testTask'.microtime(),
|
|
|
-// "binCode" => $orderCommodity['location'],
|
|
|
-// "toLocCode" => 'BIN-OUT1',
|
|
|
-// ];
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return null;
|
|
|
-// });
|
|
|
-//
|
|
|
-// $json= [
|
|
|
-// "taskMode" =>2,
|
|
|
-// "bins"=>$bins,
|
|
|
-// "groupCode"=>'testGroup'.microtime(),
|
|
|
-// "priority"=>10,
|
|
|
-// "sequenceFlag"=>1,
|
|
|
-// ];
|
|
|
-// $response = Http::post(config('api.haiq.storage.moveBin'),$json);
|
|
|
-// LogService::log(__CLASS__,__METHOD__,$response->json());
|
|
|
-// }
|
|
|
-
|
|
|
public function getBatchByCodes($codes)
|
|
|
{
|
|
|
if(empty($codes))return collect();
|