Bläddra i källkod

更新考察审核

sandm 2 år sedan
förälder
incheckning
f55a204558
1 ändrade filer med 10 tillägg och 3 borttagningar
  1. 10 3
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 10 - 3
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -1448,7 +1448,7 @@ class IndexController extends WebBaseController
             return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
         }
 
-        $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
+        $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->where('type','supplement')->first();
         if(!$info){
             $info = [
                 'appoint_id' => $appoint_info->id,
@@ -1641,12 +1641,18 @@ class IndexController extends WebBaseController
         } else {
             return redirect(route('login'));
         }
+        $limit_time = 1660210200;
+        $time = time();
+        if( $time > $limit_time){
+            return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',18)), true, '上一页', '3');
+        }
+
         $appoint_id = $request->input('appoint_id');
-        $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',16)->where('id',$appoint_id)->first();
+        $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',18)->where('id',$appoint_id)->first();
         if(!$appoint_info){
             return ['status' => 0, 'msg' => '抱歉,找不到您要补登的报名记录!'];
         }
-        $info = RecruitSupplement::where('appoint_id',$appoint_id)->first();
+        $info = RecruitSupplement::where('appoint_id',$appoint_id)->where('type','supplement')->first();
         if($info){
             if($info->status == 1){
                 return ['status' => 0, 'msg' => '材料已审核通过,不允许修改'];
@@ -1772,6 +1778,7 @@ class IndexController extends WebBaseController
             }
             $data['manage'] = json_encode($manage);
             $data['status'] = 0;
+            $data['type'] = 'supplement';
             $result = RecruitSupplement::create($data);
             $appoint_info->political_audit = 4;
             $appoint_info->save();