|
@@ -409,7 +409,9 @@ class IndexController extends WebBaseController
|
|
|
$material = json_decode($special['material'],true);
|
|
|
foreach ($material as $k => $v){
|
|
|
if(array_key_exists('response',$v)){
|
|
|
- $material[$k]['url'] = $v['response']['path'];
|
|
|
+ if(array_key_exists('path',$v['response'])){
|
|
|
+ $material[$k]['url'] = $v['response']['path'];}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
@@ -439,7 +441,9 @@ class IndexController extends WebBaseController
|
|
|
$identification = json_decode($user_info['identification'],true);
|
|
|
foreach ($identification as $k => $v){
|
|
|
if(array_key_exists('response',$v)){
|
|
|
- $identification[$k]['url'] = $v['response']['path'];
|
|
|
+ if(array_key_exists('path',$v['response'])){
|
|
|
+ $identification[$k]['url'] = $v['response']['path'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -454,7 +458,9 @@ class IndexController extends WebBaseController
|
|
|
$education_certification = json_decode($user_info['education_certification'],true);
|
|
|
foreach ($education_certification as $k => $v){
|
|
|
if(array_key_exists('response',$v)){
|
|
|
- $education_certification[$k]['url'] = $v['response']['path'];
|
|
|
+ if(array_key_exists('path',$v['response'])){
|
|
|
+ $education_certification[$k]['url'] = $v['response']['path'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -469,7 +475,9 @@ class IndexController extends WebBaseController
|
|
|
$other_certification = json_decode($user_info['other_certification'],true);
|
|
|
foreach ($other_certification as $k => $v){
|
|
|
if(array_key_exists('response',$v)){
|
|
|
- $other_certification[$k]['url'] = $v['response']['path'];
|
|
|
+ if(array_key_exists('path',$v['response'])){
|
|
|
+ $other_certification[$k]['url'] = $v['response']['path'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1389,9 +1397,13 @@ class IndexController extends WebBaseController
|
|
|
return $this->showMessage('抱歉,您未入闱,无需考察审核!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
}
|
|
|
|
|
|
- $uids = [169955];
|
|
|
+ $uids = [];
|
|
|
+ $limit_time = 1654075800;
|
|
|
+ if(in_array($uid,$uids)){
|
|
|
+ $limit_time = 1654162200;
|
|
|
+ }
|
|
|
$time = time();
|
|
|
- if(!in_array($uid,$uids) || $time > 1626661200){
|
|
|
+ if( $time > $limit_time){
|
|
|
return $this->showMessage('抱歉,考察审核端口已关闭!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
}
|
|
|
|
|
@@ -1402,7 +1414,7 @@ class IndexController extends WebBaseController
|
|
|
'identification' => '',
|
|
|
'household_register' => '',
|
|
|
'education_certification' => '',
|
|
|
- 'family_planning' => '',
|
|
|
+ //'family_planning' => '',
|
|
|
'manage' => '',
|
|
|
'status' => 3
|
|
|
];
|
|
@@ -1475,6 +1487,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();
|
|
@@ -1484,7 +1572,7 @@ class IndexController extends WebBaseController
|
|
|
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();
|
|
|
+ $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',16)->where('id',$appoint_id)->first();
|
|
|
if(!$appoint_info){
|
|
|
return ['status' => 0, 'msg' => '抱歉,找不到您要补登的报名记录!'];
|
|
|
}
|
|
@@ -1530,16 +1618,16 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
$info->education_certification = json_encode($education_certification);
|
|
|
//计生
|
|
|
- $family_planning = $request->input('family_planning');
|
|
|
- if(is_array($family_planning)){
|
|
|
- //删除掉没有成功返回路径的图片
|
|
|
- foreach ($family_planning as $k => $v){
|
|
|
- if(!array_key_exists('response',$v)){
|
|
|
- unset($family_planning[$k]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- $info->family_planning = json_encode($family_planning);
|
|
|
+// $family_planning = $request->input('family_planning');
|
|
|
+// if(is_array($family_planning)){
|
|
|
+// //删除掉没有成功返回路径的图片
|
|
|
+// foreach ($family_planning as $k => $v){
|
|
|
+// if(!array_key_exists('response',$v)){
|
|
|
+// unset($family_planning[$k]);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// $info->family_planning = json_encode($family_planning);
|
|
|
//综治
|
|
|
$manage = $request->input('manage');
|
|
|
if(is_array($manage)){
|
|
@@ -1592,16 +1680,16 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
$data['education_certification'] = json_encode($education_certification);
|
|
|
//计生
|
|
|
- $family_planning = $request->input('family_planning');
|
|
|
- if(is_array($family_planning)){
|
|
|
- //删除掉没有成功返回路径的图片
|
|
|
- foreach ($family_planning as $k => $v){
|
|
|
- if(!array_key_exists('response',$v)){
|
|
|
- unset($family_planning[$k]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- $data['family_planning'] = json_encode($family_planning);
|
|
|
+// $family_planning = $request->input('family_planning');
|
|
|
+// if(is_array($family_planning)){sp
|
|
|
+// //删除掉没有成功返回路径的图片
|
|
|
+// foreach ($family_planning as $k => $v){
|
|
|
+// if(!array_key_exists('response',$v)){
|
|
|
+// unset($family_planning[$k]);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// $data['family_planning'] = json_encode($family_planning);
|
|
|
//综治
|
|
|
$manage = $request->input('manage');
|
|
|
if(is_array($manage)){
|
|
@@ -1623,6 +1711,85 @@ 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',16)->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);
|
|
|
+ $appoint_info->health_audit = 4;
|
|
|
+ $appoint_info->save();
|
|
|
+ return ['status' => 1, 'msg' => '提交成功', 'data' => ''];
|
|
|
+ }
|
|
|
+
|
|
|
+ return ['status' => 0, 'msg' => 'test', 'data' => ''];
|
|
|
+ }
|
|
|
+
|
|
|
public function interviewer_random(Request $request)
|
|
|
{
|
|
|
$model = $request->input('model',1);
|