Kernel.php 3.9 KB

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