| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Console\Commands;
- use App\Station;
- use App\StationTask;
- use Illuminate\Console\Command;
- class CheckCacheRackStorage extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'check:cacheRack';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'check cache rack storage info';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- */
- public function handle()
- {
- $stations = Station::query()->select("id","code")->where("station_type_id",5)
- ->whereNotNull("parent_id")
- ->whereNotIn("id",StationTask::query()->select("station_id")
- ->where("status","!=","完成")->whereIn("station_id",Station::query()->select("id")->where("station_type_id",5)
- ->whereNotNull("parent_id"))->groupBy("station_id"))
- ->get();
- app("ForeignHaiRoboticsService")->paddingCacheShelf($stations);
- }
- }
|