BillTask.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2017/11/20
  6. * Time: 下午5:26
  7. */
  8. namespace App\Console\Commands;
  9. use App\Modules\Finance\Services\FinanceService;
  10. use Log;
  11. use Illuminate\Console\Command;
  12. class BillTask extends Command
  13. {
  14. /**
  15. * 执行命令 php artisan bill_task
  16. *
  17. * The name and signature of the console command.
  18. *
  19. * @var string
  20. */
  21. protected $signature = 'bill_task';
  22. /**
  23. * The console command description.
  24. *
  25. * @var string
  26. */
  27. protected $description = '每日生成结算单生成';
  28. /**
  29. * Execute the console command.
  30. *
  31. * @return mixed
  32. */
  33. public function handle()
  34. {
  35. print_r("======每日生成结算单生成 【任务执行开始】=====".date("y-m-d H:i:s"."\n"));
  36. Log::info("======每日生成结算单生成 【任务执行开始】=====".date("y-m-d H:i:s"."\n"));
  37. FinanceService::makeDayDataStatistics();
  38. Log::info("======每日生成结算单生成 【任务执行结束】=====".date("y-m-d H:i:s"."\n"));
  39. print_r("======每日生成结算单生成 【任务执行结束】=====".date("y-m-d H:i:s"."\n"));
  40. }
  41. }