Kernel.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. $schedule->command('orderCountingRecordTask')->dailyAt("1:00");
  80. //$schedule->command('check:cacheRack')->everyMinute();
  81. }
  82. /**
  83. * Register the commands for the application.
  84. *
  85. * @return void
  86. */
  87. protected function commands()
  88. {
  89. $this->load(__DIR__ . '/Commands');
  90. $this->app->extend('command.model.make',function(ModelMakeCommand $base,$app){
  91. return new \App\Console\Commands\MakeModelCommand($app['files']);
  92. });
  93. require base_path('routes/console.php');
  94. }
  95. }