Kernel.php 4.7 KB

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