|
@@ -38,6 +38,7 @@ class StationTaskBatchService
|
|
|
$station=$this->stationService->getDefaultStation('料箱出货口');
|
|
$station=$this->stationService->getDefaultStation('料箱出货口');
|
|
|
$id_stationMissionBatchType=$this->stationTaskBatchTypeService->firstByWhere('name','U型线分捡');
|
|
$id_stationMissionBatchType=$this->stationTaskBatchTypeService->firstByWhere('name','U型线分捡');
|
|
|
|
|
|
|
|
|
|
+ $batches_handled=[];
|
|
|
foreach ($batches as &$batch){
|
|
foreach ($batches as &$batch){
|
|
|
if ($batch['status']=='未处理'){
|
|
if ($batch['status']=='未处理'){
|
|
|
$stationMissionBatches_toCreate->push([
|
|
$stationMissionBatches_toCreate->push([
|
|
@@ -46,10 +47,10 @@ class StationTaskBatchService
|
|
|
'station_mission_batch_type_id'=> $id_stationMissionBatchType,
|
|
'station_mission_batch_type_id'=> $id_stationMissionBatchType,
|
|
|
'status'=>'待处理'
|
|
'status'=>'待处理'
|
|
|
]);
|
|
]);
|
|
|
- $batch = '已处理';
|
|
|
|
|
|
|
+ $batches_handled[]=$batch;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $this->batchService->updateWhereIn('id',data_get($batches,'*.id'),['status'=>'处理中']);
|
|
|
|
|
|
|
+ $this->batchService->updateWhereIn('id',data_get($batches_handled,'*.id'),['status'=>'处理中']);
|
|
|
$this->insert($stationMissionBatches_toCreate->toArray());
|
|
$this->insert($stationMissionBatches_toCreate->toArray());
|
|
|
return $stationMissionBatches_toCreate;
|
|
return $stationMissionBatches_toCreate;
|
|
|
}
|
|
}
|