|
@@ -1393,15 +1393,15 @@ class IndexController extends WebBaseController
|
|
|
if(!$appoint_info){
|
|
|
return $this->showMessage('抱歉,您没有报名,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
}
|
|
|
- if($appoint_info->pen_audit != 1){
|
|
|
- return $this->showMessage('抱歉,您未入闱,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
- }
|
|
|
+// if($appoint_info->pen_audit != 1){
|
|
|
+// return $this->showMessage('抱歉,您未入闱,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+// }
|
|
|
|
|
|
- $uids = [169955];
|
|
|
- $time = time();
|
|
|
- if(!in_array($uid,$uids) || $time > 1626661200){
|
|
|
- return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
- }
|
|
|
+// $uids = [169955];
|
|
|
+// $time = time();
|
|
|
+// if(!in_array($uid,$uids) || $time > 1626661200){
|
|
|
+// return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+// }
|
|
|
|
|
|
$info = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
|
|
|
if(!$info){
|
|
@@ -1483,6 +1483,82 @@ class IndexController extends WebBaseController
|
|
|
return view('app.recruit.supplement',$view_data);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 健康信息登记
|
|
|
+ * @param Request $request
|
|
|
+ */
|
|
|
+ public function health_info(Request $request)
|
|
|
+ {
|
|
|
+ $user = $this->getUser();
|
|
|
+ if (!empty($user)) {
|
|
|
+ $uid = $user->id;
|
|
|
+ } else {
|
|
|
+ return redirect(route('login'));
|
|
|
+ }
|
|
|
+
|
|
|
+ //招考id
|
|
|
+ $id = $request->input('id', 0);
|
|
|
+ if (!$id) {
|
|
|
+ return $this->showMessage('请选择报名项目!', route('home'), true, '上一页', '3');
|
|
|
+ }
|
|
|
+ $recruit = Recruit::find($id);
|
|
|
+ if(!$recruit['status'] && !$user->recruit_test){
|
|
|
+ return $this->showMessage('抱歉,该项目状态不正确,请联系客服!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+ }
|
|
|
+
|
|
|
+ $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$id)->first();
|
|
|
+ if(!$appoint_info){
|
|
|
+ return $this->showMessage('抱歉,您没有报名,无需登记!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+ }
|
|
|
+ if($appoint_info->audit != 3){
|
|
|
+ return $this->showMessage('抱歉,您无需登记!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+ }
|
|
|
+
|
|
|
+ $time = time();
|
|
|
+ if($time > 1653184800){
|
|
|
+ return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
+ }
|
|
|
+
|
|
|
+ $info = RecruitSupplement::where('appoint_id',$appoint_info->id)->first();
|
|
|
+ if(!$info){
|
|
|
+ $info = [
|
|
|
+ 'appoint_id' => $appoint_info->id,
|
|
|
+ 'health_code' => '',
|
|
|
+ 'trip_code' => ''
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ $info = $info->toArray();
|
|
|
+ if(json_decode($info['health_code'])){
|
|
|
+ $health_code = json_decode($info['health_code'],true);
|
|
|
+ foreach ($health_code as $k => $v){
|
|
|
+ if(array_key_exists('response',$v)){
|
|
|
+ $health_code[$k]['url'] = $v['response']['path'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $health_code = [];
|
|
|
+ }
|
|
|
+ $info['health_code'] = $health_code;
|
|
|
+
|
|
|
+ if(json_decode($info['trip_code'])){
|
|
|
+ $trip_code = json_decode($info['trip_code'],true);
|
|
|
+ foreach ($trip_code as $k => $v){
|
|
|
+ if(array_key_exists('response',$v)){
|
|
|
+ $trip_code[$k]['url'] = $v['response']['path'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $trip_code = [];
|
|
|
+ }
|
|
|
+ $info['trip_code'] = $trip_code;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ $view_data['info'] = json_encode($info);
|
|
|
+ $view_data['title'] = $recruit->company;
|
|
|
+ return view('app.recruit.health',$view_data);
|
|
|
+ }
|
|
|
+
|
|
|
public function save_supplement(Request $request)
|
|
|
{
|
|
|
$user = $this->getUser();
|
|
@@ -1631,6 +1707,84 @@ class IndexController extends WebBaseController
|
|
|
return ['status' => 0, 'msg' => 'test', 'data' => ''];
|
|
|
}
|
|
|
|
|
|
+ public function save_healthinfo(Request $request)
|
|
|
+ {
|
|
|
+ $user = $this->getUser();
|
|
|
+ if (!empty($user)) {
|
|
|
+ $uid = $user->id;
|
|
|
+ } else {
|
|
|
+ return redirect(route('login'));
|
|
|
+ }
|
|
|
+ $appoint_id = $request->input('appoint_id');
|
|
|
+ $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',5)->where('id',$appoint_id)->first();
|
|
|
+ if(!$appoint_info){
|
|
|
+ return ['status' => 0, 'msg' => '抱歉,找不到您要登记的报名记录!'];
|
|
|
+ }
|
|
|
+ $info = RecruitSupplement::where('appoint_id',$appoint_id)->first();
|
|
|
+ if($info){
|
|
|
+ if($info->h_status == 1){
|
|
|
+ return ['status' => 0, 'msg' => '材料已审核通过,不允许修改'];
|
|
|
+ }
|
|
|
+ if($info->h_status == 0){
|
|
|
+ return ['status' => 0, 'msg' => '材料审核中,不允许修改'];
|
|
|
+ }
|
|
|
+ $health_code = $request->input('health_code');
|
|
|
+ if(is_array($health_code)){
|
|
|
+ //删除掉没有成功返回路径的图片
|
|
|
+ foreach ($health_code as $k => $v){
|
|
|
+ if(!array_key_exists('response',$v)){
|
|
|
+ unset($health_code[$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $info->health_code = json_encode($health_code);
|
|
|
+
|
|
|
+ $trip_code = $request->input('trip_code');
|
|
|
+ if(is_array($trip_code)){
|
|
|
+ //删除掉没有成功返回路径的图片
|
|
|
+ foreach ($trip_code as $k => $v){
|
|
|
+ if(!array_key_exists('response',$v)){
|
|
|
+ unset($trip_code[$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $info->trip_code = json_encode($trip_code);
|
|
|
+
|
|
|
+ $info->save();
|
|
|
+ return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
|
|
|
+ }else{
|
|
|
+ $data['appoint_id'] = $appoint_id;
|
|
|
+ $health_code = $request->input('health_code');
|
|
|
+ if(is_array($health_code)){
|
|
|
+ //删除掉没有成功返回路径的图片
|
|
|
+ foreach ($health_code as $k => $v){
|
|
|
+ if(!array_key_exists('response',$v)){
|
|
|
+ unset($health_code[$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $data['health_code'] = json_encode($health_code);
|
|
|
+
|
|
|
+ $trip_code = $request->input('trip_code');
|
|
|
+ if(is_array($trip_code)){
|
|
|
+ //删除掉没有成功返回路径的图片
|
|
|
+ foreach ($trip_code as $k => $v){
|
|
|
+ if(!array_key_exists('response',$v)){
|
|
|
+ unset($trip_code[$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $data['trip_code'] = json_encode($trip_code);
|
|
|
+
|
|
|
+ $data['h_status'] = 0;
|
|
|
+ RecruitSupplement::create($data);
|
|
|
+
|
|
|
+ return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
|
|
|
+ }
|
|
|
+
|
|
|
+ return ['status' => 0, 'msg' => 'test', 'data' => ''];
|
|
|
+ }
|
|
|
+
|
|
|
public function interviewer_random(Request $request)
|
|
|
{
|
|
|
$model = $request->input('model',1);
|