Kernel.php 4.6 KB

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