Kernel.php 4.3 KB

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