| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace App\Console\Commands;
- use App\Station;
- use App\StationTask;
- use App\StationTaskMaterialBox;
- use Illuminate\Console\Command;
- use Illuminate\Support\Collection;
- 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("StorageService")->paddingCacheShelf($stations);
- }
- }
|