ResumeService = $ResumeService; $this->ResumePrivacyService = $ResumePrivacyService; $this->companyInterviewService = $companyInterviewService; $this->personalJobsApplyService = $personalJobsApplyService; $this->memberPointService = $memberPointService; $this->personFavoriteService = $personFavoriteService; $this->memberInfoService = $memberInfoService; $this->memberService = $memberService; $this->smsService = $smsService; $this->emailService = $emailService; $this->payService = $payService; $this->jobfairPersonalJopApplyService = $jobfairPersonalJopApplyService; $this->jobfairCompanyRepository = $jobfairCompanyRepository; $this->jobfairRepository = $jobfairRepository; $this->jobfairService = $jobfairService; $this->personJobsSubscribeService = $personJobsSubscribeService; $this->categoryService = $categoryService; } //判断是哪场招聘会 public function jobfairOpen(){ $where = [ ['holddate_start', '<', strtotime("+60 minute")], ['holddate_end', '>', time()], ['display', '=', 1], ['subsite_id', '=', get_subsite_id()], ]; $allJobfair= $this->jobfairRepository->getOpenJobfair($where); $oneJobfair = $this->jobfairRepository->getOneOpenJobfair($where); if(count($allJobfair)>1){ $html = view('mobile.app.person.jobfair.ajax_open_jabfair', ['allJobfair'=>$allJobfair,'oneJobfair'=>$oneJobfair])->render(); $return_data = array('status'=>2, 'html' => $html); return response()->json($return_data); }elseif(count($allJobfair) == 1){ $return_data = array('status'=>1,'jobfair_id'=>$allJobfair[0]->id); return response()->json($return_data); }else{ $return_data = array('status'=>0,'error'=>'暂无举办中的招聘会'); return response()->json($return_data); } } public function index(Request $request) { $jobfair_id = $request->jobfair_id ; $info = $this->jobfairCompanyRepository->getComCount($jobfair_id); $where = [ 'jobfair_id'=>$jobfair_id, 'audit'=>'1' ]; $companys = $this->jobfairService->jobfairCompany($where); $where = [ 'jobfair_id'=>$jobfair_id, ]; $where1=[ 'audit'=>1, 'display'=>1 ]; $jobs = $this->jobfairService->jobfairJobs($where,$where1); $user = auth('web-member')->user(); $where = [ 'personal_uid'=>$user->id, 'jobfair_id'=>$jobfair_id, 'is_apply'=>1 ]; $orders = $this->jobfairService->jobfairOrders($where); $where = [ 'personal_uid'=>$user->id, 'jobfair_id'=>$jobfair_id, ]; $interview = $this->jobfairService->jobfairInterview($where); if(!$info){ return back()->with(['error'=>'招聘会出错']); } return view('mobile.app.person.jobfair.index',['info'=>$info,'companys'=>$companys,'jobs'=>$jobs,'orders'=>$orders,'interview'=>$interview,'jobfair_id'=>$jobfair_id]); } public function jobfairCompany(Request $request) { $jobfair_id = $request->jobfair_id ; $page = $request->page ? $request->page : 1; $limit = 20; $where = [ 'jobfair_id'=>$jobfair_id, 'audit'=>'1' ]; if($request->ajax()){ $data = $this->jobfairService->jobfairCompany($where,$limit,$page); if($data->isEmpty()){ return response()->json(['status'=>0]); }else{ return response()->json(['status'=>1,'data'=>view('mobile.app.person.jobfair.ajax_jobfair_company', ['list_items'=> $data])->render()]); } }else{ $mobile_dropload = false; $data = $this->jobfairService->jobfairCompany($where,$limit,$page); $list_items = array(); if($data->lastPage() > $data->currentPage()){ $mobile_dropload = true; } } return view('mobile.app.person.jobfair.jobfair_company',['data'=>$data,'mobile_dropload'=>$mobile_dropload,'list_items'=>$list_items]); } public function jobfairJobs(Request $request) { $jobfair_id = $request->jobfair_id ; $page = $request->page ? $request->page : 1; $limit = 20; $where=[ 'jobfair_id'=>$jobfair_id, ]; $where1=['audit'=>'1', 'display'=>1]; if($request->ajax()){ $data = $this->jobfairService->jobfairJobs($where,$where1,$limit,$page); if($data->isEmpty()){ return response()->json(['status'=>0]); }else{ return response()->json(['status'=>1,'data'=>view('mobile.app.person.jobfair.ajax_jobfair_jobs', ['list_items'=> $data])->render()]); } }else{ $mobile_dropload = false; $data = $this->jobfairService->jobfairJobs($where,$where1,$limit,$page); $list_items = array(); if($data->lastPage() > $data->currentPage()){ $mobile_dropload = true; } } return view('mobile.app.person.jobfair.jobfair_jobs',['data'=>$data,'mobile_dropload'=>$mobile_dropload,'list_items'=>$list_items]); } public function jobfairOrder(Request $request) { $jobfair_id = $request->jobfair_id ; $page = $request->page ? $request->page : 1; $limit = 20; $user = auth('web-member')->user(); $where = [ 'personal_uid'=>$user->id, 'jobfair_id'=>$jobfair_id, 'is_apply'=>1 ]; if($request->ajax()){ $data = $this->jobfairService->jobfairOrders($where,$limit,$page); if($data->isEmpty()){ return response()->json(['status'=>0]); }else{ return response()->json(['status'=>1,'data'=>view('mobile.app.person.jobfair.ajax_jobfair_order', ['list_items'=> $data])->render()]); } }else{ $mobile_dropload = false; $data = $this->jobfairService->jobfairOrders($where,$limit,$page); $list_items = array(); if($data->lastPage() > $data->currentPage()){ $mobile_dropload = true; } } return view('mobile.app.person.jobfair.jobfair_order',['data'=>$data,'mobile_dropload'=>$mobile_dropload,'list_items'=>$list_items]); } public function jobfairInterview(Request $request){ $jobfair_id = $request->jobfair_id ; $user = auth('web-member')->user(); $page = $request->page ? $request->page : 1; $limit = 20; $where = [ 'personal_uid'=>$user->id, 'jobfair_id'=>$jobfair_id, ]; if($request->ajax()){ $data = $this->jobfairService->jobfairInterview($where,$limit,$page); if($data->isEmpty()){ return response()->json(['status'=>0]); }else{ return response()->json(['status'=>1,'data'=>view('mobile.app.person.jobfair.ajax_jobfair_interview', ['list_items'=> $data])->render()]); } }else{ $mobile_dropload = false; $data = $this->jobfairService->jobfairInterview($where,$limit,$page); $list_items = array(); if($data->lastPage() > $data->currentPage()){ $mobile_dropload = true; } } return view('mobile.app.person.jobfair.jobfair_interview',['data'=>$data,'mobile_dropload'=>$mobile_dropload,'list_items'=>$list_items]); } public function userCode() { $res = $this->jobfairService->userCode(auth('web-member')->user()); return view('mobile.app.person.user_code',['wap_title'=>'我的二维码','user_code'=>$res]); } public function jobsSubscribe(Request $request) { $res = $this->personJobsSubscribeService->getSubscribeByuid(auth('web-member')->user()); $count = $this->personJobsSubscribeService->getSubscribeCount(auth('web-member')->user()); if ($request->ajax()) { if ($res->lastPage() < $res->currentPage()) { return response()->json(['status'=>0]); } return response()->json([ 'status'=>1, 'data'=>view('mobile.app.person.ajax_tpl.ajax_subscribe', ['content'=>$res])->render()]); } return view('mobile.app.person.jobs_subscribe', ['content'=>$res,'count'=>$count,'wap_title'=>'职位订阅器']); } public function jobsSubscribeEdit() { $wap_title = '新建订阅器'; if(request()->id){ $wap_title = '修改订阅器'; $back_url = \Illuminate\Support\Facades\URL::previous(); $sub_info = PersonJobsSubscribe::find(request()->id); if(!$sub_info){ return $this->showMessage('对不起,您只能查看自己的职位订阅器!', $back_url, true, '上一页', '3'); } if($sub_info->uid!=auth('web-member')->user()->id){ return $this->showMessage('对不起,您只能查看自己的职位订阅器!', $back_url, true, '上一页', '3'); } } $res = $this->personFavoriteService->getJobsSubEdit(request()->id); $district = $this->categoryService->getDefaultDistrict(); return view('mobile.app.person.jobs_subscribe_edit', ['content'=>$res['sub'],'defaultCity'=>$district->defaultCity,'wap_title'=>$wap_title]); } }