|
@@ -1550,19 +1550,24 @@ class IndexController extends WebBaseController
|
|
|
return $this->showMessage('请登录!', route('home'), true, '上一页', '3');
|
|
|
}
|
|
|
$recruit_id = $request->input('recruit_id');
|
|
|
+ $recruit = Recruit::where('id',$recruit_id)->first();
|
|
|
$appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$recruit_id)->first();
|
|
|
if($appoint_info){
|
|
|
$check_ticket = RecruitTicket::where('appoint_id',$appoint_info->id)->where('ex_type',2)->first();
|
|
|
if($check_ticket){
|
|
|
- $time = time();
|
|
|
+ $health = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
|
|
|
+ if((!$health || $health->h_status == 0) && $recruit->pen_epidemic){
|
|
|
+ return $this->showMessage('健康审核信息未通过!', route('home'), true, '上一页', '3');
|
|
|
+ }$time = time();
|
|
|
if(strtotime($check_ticket->ex_start) < $time && strtotime($check_ticket->ex_end) > $time){
|
|
|
- RecruitTicket::where('appoint_id',$appoint_info->id)->update(['ex_status' => 1]);
|
|
|
+ RecruitTicket::where('id',$check_ticket->id)->update(['ex_status' => 1]);
|
|
|
$recruit = Recruit::where('id',$recruit_id)->first();
|
|
|
$post_data = RecruitPost::where('recruit_id',$recruit_id)->where('status',1)->selectRaw('id, CONCAT(code," ",name) as post')->pluck('post', 'id');
|
|
|
$name = $recruit->name_en;
|
|
|
$date = date("Y-m-d",strtotime($recruit->created_at));
|
|
|
- $filename = date("Y-m-18",time()) . '_' . $appoint_info->realname . '_' . $appoint_info->card . '_' . $post_data[$appoint_info->post_id];
|
|
|
- $file = base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/check/" . $filename . '.pdf';
|
|
|
+ //$filename = $date . '_' . $appoint_info->realname . '_' . $appoint_info->card . '_' . $post_data[$appoint_info->post_id];
|
|
|
+ $filename = sha1($date . '_' . $appoint_info->realname . '_' . $appoint_info->card . '_' . $post_data[$appoint_info->post_id]);
|
|
|
+ $file = base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/face/" . $filename . '.pdf';
|
|
|
if(file_exists($file)){
|
|
|
header('Content-Description: File Transfer');
|
|
|
header('Content-Type: application/octet-stream');
|
|
@@ -1582,6 +1587,7 @@ class IndexController extends WebBaseController
|
|
|
}else{
|
|
|
return $this->showMessage('暂无准考证可以打印!', route('home'), true, '上一页', '3');
|
|
|
}
|
|
|
+
|
|
|
}else{
|
|
|
return $this->showMessage('暂无准考证可以打印!', route('home'), true, '上一页', '3');
|
|
|
}
|