stationRuleBatchService=null; } function getByBatch(Batch $batch) { $this->instant($this->stationRuleBatchService,'StationRuleBatchService'); // return $stationRuleBatch['stationType']; return StationType::query()->where('name','料箱监视器')->first(); } function getForCommodity(): StationType { /** @var StationType $stationType */ $stationType= StationType::query()->firstOrCreate(['name'=>'料箱监视器']); return $stationType; } function getForMaterialBox_onBatchProcess(): StationType { /** @var StationType $stationType */ $stationType= StationType::query()->firstOrCreate(['name'=>'料箱监视器']); return $stationType; } }