InformWMSReceivedEvent.php 850 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Events;
  3. use App\Http\Controllers\Controller;
  4. use App\Listeners\InformWMSReceivedListener;
  5. use Illuminate\Queue\SerializesModels;
  6. use Illuminate\Foundation\Events\Dispatchable;
  7. use Illuminate\Broadcasting\InteractsWithSockets;
  8. use Illuminate\Support\Facades\Auth;
  9. class InformWMSReceivedEvent
  10. {
  11. use Dispatchable, InteractsWithSockets, SerializesModels;
  12. public $rejectedBill;
  13. public function __construct($rejectedBill)
  14. {
  15. $this->rejectedBill=$rejectedBill;
  16. }
  17. public function directRun()
  18. {
  19. if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,'直接调用推送WMS事件,退单号:'.$this->rejectedBill['logistic_number_return'],Auth::user()['id']);
  20. return (new InformWMSReceivedListener())->handle($this);
  21. }
  22. }
  23. //通知WMS接收