Kernel.php 5.1 KB

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