SettlementBillCountingTask.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace App\Jobs;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Foundation\Bus\Dispatchable;
  6. use Illuminate\Queue\InteractsWithQueue;
  7. use Illuminate\Queue\SerializesModels;
  8. /**
  9. * 生成结算账单统计数据
  10. * 每月初始执行
  11. * 统计上月的账单数据
  12. * Class SettlementBillCountingTask
  13. * @package App\Jobs
  14. */
  15. class SettlementBillCountingTask implements ShouldQueue
  16. {
  17. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  18. //货主
  19. private $owner_id;
  20. //统计月份
  21. private $counting_month;
  22. /**
  23. * SettlementBillCountingTask constructor.
  24. * @param $owner_id
  25. * @param $counting_month
  26. */
  27. public function __construct($owner_id, $counting_month)
  28. {
  29. $this->owner_id = $owner_id;
  30. $this->counting_month = $counting_month;
  31. }
  32. /**
  33. * Execute the job.
  34. *
  35. * @return void
  36. */
  37. public function handle()
  38. {
  39. if (is_null($this->owner_id)&&is_null($this->counting_month)) {//未指定统计的参数
  40. } else {
  41. //清除历史统计记录
  42. }
  43. }
  44. }