Browse Source

更新招考人员预览名单

sandm 2 years ago
parent
commit
946dfca321
1 changed files with 11 additions and 8 deletions
  1. 11 8
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 11 - 8
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -310,23 +310,26 @@ class IndexController extends WebBaseController
         $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$id)->first();
         $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$id)->first();
         $time = time();
         $time = time();
         $formDisabled = 0;
         $formDisabled = 0;
-        if(($time < strtotime($recruit['apply_start']) || strtotime($recruit['apply_end']) < $time) && ($uid != 161027 || $uid != 59041)){//过了招考时间
-            if(!$appoint_info){
-                return $this->showMessage('抱歉,该项目已过报名时间或尚未开始!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
-            }
-            if($appoint_info){
-                //如果有报名记录,先查询首次报名是什么时候
-                $first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('appoint_id',$appoint_info->id)->orderBy('created_at','asc')->first();
-                if(!$first_post){//没有记录代表只是暂存
+        if(($time < strtotime($recruit['apply_start']) || strtotime($recruit['apply_end']) < $time)){//过了招考时间
+            if(!in_array($uid,[161027,59041])){
+                if(!$appoint_info){
                     return $this->showMessage('抱歉,该项目已过报名时间或尚未开始!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
                     return $this->showMessage('抱歉,该项目已过报名时间或尚未开始!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
                 }
                 }
+                if($appoint_info){
+                    //如果有报名记录,先查询首次报名是什么时候
+                    $first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('appoint_id',$appoint_info->id)->orderBy('created_at','asc')->first();
+                    if(!$first_post){//没有记录代表只是暂存
+                        return $this->showMessage('抱歉,该项目已过报名时间或尚未开始!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
+                    }
 //                $has_late_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('created_at','>',$recruit['apply_end'])->first();//查找在过了报名时间后,有报名记录,且仍是审核失败的报名记录,看其是否在报名时间后是否有再次提交的记录
 //                $has_late_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('created_at','>',$recruit['apply_end'])->first();//查找在过了报名时间后,有报名记录,且仍是审核失败的报名记录,看其是否在报名时间后是否有再次提交的记录
 //                if($has_late_post){
 //                if($has_late_post){
 //                    $formDisabled = 1;
 //                    $formDisabled = 1;
 //                }else{
 //                }else{
 //                    $formDisabled = 0;
 //                    $formDisabled = 0;
 //                }
 //                }
+                }
             }
             }
+
         }
         }
 
 
         $view_data['module'] = $forms = explode(',', $recruit['forms']);
         $view_data['module'] = $forms = explode(',', $recruit['forms']);