PadInterviewController.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zhanghao
  5. * Date: 2019/4/1
  6. * Time: 14:42
  7. */
  8. namespace App\Http\Controllers\Web\Hardware\Pad;
  9. use App\Http\Controllers\Web\WebBaseController;
  10. use Illuminate\Http\Request;
  11. use App\Repositories\Jobfair\JobfairPersonSignedRepository;
  12. use App\Services\Jobfair\JobfairPersonalJopApplyService;
  13. use App\Repositories\Jobfair\JobfairPersonalJobsApplyRepository;
  14. class PadInterviewController extends WebBaseController
  15. {
  16. protected $jobfairPersonSignedRepository;
  17. protected $jobfairPersonalJopApplyService;
  18. protected $jobfairPersonalJobsApplyRepository;
  19. /**
  20. * PadInterviewController constructor.
  21. * @param JobfairPersonSignedRepository $jobfairPersonSignedRepository
  22. */
  23. public function __construct(JobfairPersonSignedRepository $jobfairPersonSignedRepository,JobfairPersonalJobsApplyRepository $jobfairPersonalJobsApplyRepository,JobfairPersonalJopApplyService $jobfairPersonalJopApplyService)
  24. {
  25. $this->jobfairPersonSignedRepository = $jobfairPersonSignedRepository;
  26. $this->jobfairPersonalJobsApplyRepository = $jobfairPersonalJobsApplyRepository;
  27. $this->jobfairPersonalJopApplyService = $jobfairPersonalJopApplyService;
  28. }
  29. public function list()
  30. {
  31. $jobfair_id = session('floorplan_stands.jobfair_id');
  32. $user = auth('web-company')->user();
  33. $result = $this->jobfairPersonSignedRepository->getSignedInterview(['jobfairid'=>$jobfair_id]);
  34. $where = [
  35. 'jobfair_id'=>$jobfair_id,
  36. 'company_id'=>$user->id,
  37. ];
  38. foreach ($result as &$value){
  39. $where['personal_uid'] = $value->uid;
  40. $value['flag'] = $this->jobfairPersonalJobsApplyRepository->interviewFind($where);
  41. }
  42. return view('app.hardware.pad.interview_list',['result' => $result]);
  43. }
  44. public function interview(Request $request){
  45. $user = auth('web-company')->user();
  46. return $this->jobfairPersonalJopApplyService->interview($request,$user);
  47. }
  48. }