sandm 1 éve
szülő
commit
b6b3a74916
1 módosított fájl, 14 hozzáadás és 3 törlés
  1. 14 3
      app/Http/Controllers/Web/Recruit/IndexController.php

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

@@ -164,10 +164,21 @@ class IndexController extends WebBaseController
 
             if($reexamine_ticket && $appoint_info->reexamine_audit == -1){
                 $reexamine_health = RecruitSupplement::where("appoint_id",$appoint_info->id)->where("type","reexamine")->where('h_status',1)->first();
-                if(!$reexamine_health){
-                    $appoint_info->reexamine_ticket = -2;
+                if(!$reexamine_health && $recruit->reexamine_epidemic){
+                    $appoint_info->face_ticket = -2;
+                    $time = time();
+                    if(strtotime($recruit->reexamine_health_start) < $time && strtotime($recruit->reexamine_health_end) > $time){
+                        $appoint_info->reexamine_ticket = -2;
+                    }else{
+                        $appoint_info->reexamine_ticket = -3;
+                    }
                 }else{
-                    $appoint_info->reexamine_ticket = 1;
+                    $time = time();
+                    if(strtotime($recruit->reexamine_health_start) < $time && strtotime($recruit->reexamine_health_end) > $time){
+                        $appoint_info->reexamine_ticket = 1;
+                    }else{
+                        $appoint_info->reexamine_ticket = -1;
+                    }
                 }
             }else{
                 $appoint_info->reexamine_ticket = 0;