Kernel.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\BeforeCreateOwnerReport;
  4. use App\Console\Commands\ClearCancelledOrderTask;
  5. use App\Console\Commands\CreateProcurementTotalBill;
  6. use App\Console\Commands\CreateWeightStatistic;
  7. use App\Console\Commands\FluxOrderFix;
  8. use App\Console\Commands\InventoryDailyLoggingOwner;
  9. use App\Console\Commands\LogExpireDelete;
  10. use App\Console\Commands\MakeServiceCommand;
  11. use App\Console\Commands\SyncBatchTask;
  12. use App\Console\Commands\SyncLogCacheTask;
  13. use App\Console\Commands\SyncOrderPackageLogisticRouteTask;
  14. use App\Console\Commands\SyncUserVisitMenuLogsCacheTask;
  15. use App\Console\Commands\SyncWmsCommoditiesInformation;
  16. use App\Console\Commands\SyncWMSOrderTask;
  17. use App\Console\Commands\TestTemp;
  18. use App\Console\Commands\WasSyncWmsAsnInformation;
  19. use App\Console\Commands\WASSyncWMSOrderInformation;
  20. use Illuminate\Console\Scheduling\Schedule;
  21. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  22. use Illuminate\Foundation\Console\ModelMakeCommand;
  23. class Kernel extends ConsoleKernel
  24. {
  25. /**
  26. * The Artisan commands provided by your application.
  27. *
  28. * @var array
  29. */
  30. protected $commands = [
  31. LogExpireDelete::class,
  32. MakeServiceCommand::class,
  33. FluxOrderFix::class,
  34. InventoryDailyLoggingOwner::class,
  35. WASSyncWMSOrderInformation::class,
  36. SyncLogCacheTask::class,
  37. SyncUserVisitMenuLogsCacheTask::class,
  38. TestTemp::class,
  39. SyncBatchTask::class,
  40. SyncWMSOrderTask::class,
  41. SyncOrderPackageLogisticRouteTask::class,
  42. SyncWmsCommoditiesInformation::class,
  43. ClearCancelledOrderTask::class,
  44. WasSyncWmsAsnInformation::class,
  45. CreateWeightStatistic::class,
  46. BeforeCreateOwnerReport::class,
  47. CreateProcurementTotalBill::class,
  48. ];
  49. /**
  50. * Define the application's command schedule.
  51. *
  52. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  53. * @return void
  54. */
  55. protected function schedule(Schedule $schedule)
  56. {
  57. $schedule->command('LogExpireDelete')->dailyAt('00:01');
  58. $schedule->command('InventoryDailyLoggingOwner')->dailyAt('08:00');
  59. $schedule->command('FluxOrderFix')->hourlyAt(1);
  60. $schedule->command('WASSyncWMSOrderInformation')->everyMinute();
  61. $schedule->command('syncLogCacheTask')->everyMinute();
  62. $schedule->command('createOwnerReport')->monthlyOn(1);
  63. $schedule->command('createOwnerBillReport')->monthlyOn(1);
  64. $schedule->command('createOwnerAreaReport')->monthlyOn(1);
  65. $schedule->command('beforeCreateOwnerReport')->monthlyOn(1);
  66. $schedule->command('sync:batch')->everyMinute();
  67. $schedule->command('sync:order')->everyMinute();
  68. $schedule->command('syncOrderPackageLogisticRouteTask')->dailyAt('1:20');//同步快递信息到orderPackage
  69. $schedule->command('SyncWmsCommoditiesInformation')->everyMinute();
  70. $schedule->command('clear:cancelledOrder')->everyTenMinutes();
  71. $schedule->command('WasSyncWmsAsnInformation')->everyMinute();
  72. $schedule->command('create:weightStatistic')->dailyAt("00:30");
  73. $schedule->command('createProcurementTotalBill')->monthlyOn(1);
  74. }
  75. /**
  76. * Register the commands for the application.
  77. *
  78. * @return void
  79. */
  80. protected function commands()
  81. {
  82. $this->load(__DIR__ . '/Commands');
  83. $this->app->extend('command.model.make',function(ModelMakeCommand $base,$app){
  84. return new \App\Console\Commands\MakeModelCommand($app['files']);
  85. });
  86. require base_path('routes/console.php');
  87. }
  88. }