|
@@ -283,29 +283,29 @@ class IndexController extends WebBaseController
|
|
//招考id
|
|
//招考id
|
|
$id = $request->input('id', 0);
|
|
$id = $request->input('id', 0);
|
|
if (!$id) {
|
|
if (!$id) {
|
|
- return $this->showMessage('请选择招考项目!', route('home'), true, '上一页', '3');
|
|
|
|
|
|
+ return $this->showMessage('请选择报名项目!', route('home'), true, '上一页', '3');
|
|
}
|
|
}
|
|
|
|
|
|
//招考信息
|
|
//招考信息
|
|
$recruit = Recruit::find($id);
|
|
$recruit = Recruit::find($id);
|
|
if(!$recruit['status'] && !$user->recruit_test){
|
|
if(!$recruit['status'] && !$user->recruit_test){
|
|
- 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($recruit['current'] != 1){
|
|
if($recruit['current'] != 1){
|
|
- return $this->showMessage('抱歉,该招考报名通道已关闭,如有疑问,请联系客服!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
|
|
|
+ return $this->showMessage('抱歉,该项目报名通道已关闭,如有疑问,请联系客服!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
}
|
|
}
|
|
$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)){//过了招考时间
|
|
if(($time < strtotime($recruit['apply_start']) || strtotime($recruit['apply_end']) < $time)){//过了招考时间
|
|
if(!$appoint_info){
|
|
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){
|
|
if($appoint_info){
|
|
//如果有报名记录,先查询首次报名是什么时候
|
|
//如果有报名记录,先查询首次报名是什么时候
|
|
$first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('appoint_id',$appoint_info->id)->orderBy('created_at','asc')->first();
|
|
$first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->where('appoint_id',$appoint_info->id)->orderBy('created_at','asc')->first();
|
|
if(!$first_post){//没有记录代表只是暂存
|
|
if(!$first_post){//没有记录代表只是暂存
|
|
- return $this->showMessage('抱歉,该招考已过报名时间或尚未开始!', route('recruit.show',array('id',$recruit['id'])), true, '上一页', '3');
|
|
|
|
|
|
+ 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){
|
|
@@ -319,43 +319,22 @@ class IndexController extends WebBaseController
|
|
$view_data['module'] = $forms = explode(',', $recruit['forms']);
|
|
$view_data['module'] = $forms = explode(',', $recruit['forms']);
|
|
//查询报名表是否已有记录
|
|
//查询报名表是否已有记录
|
|
if($appoint_info){
|
|
if($appoint_info){
|
|
- //如果已有该场次的报名记录,读取录入的数据集合
|
|
|
|
- $user_info = $appoint_info;
|
|
|
|
- $user_info['sex'] = (string)$user_info['sex'];
|
|
|
|
- $user_info['edu_type'] = (string)$user_info['edu_type'];
|
|
|
|
- $user_info['family'] = json_decode($user_info['family']);
|
|
|
|
- if(in_array('expand_special',$forms)){
|
|
|
|
- $special = RecruitAppointExpandSpecial::where('recruit_appoint_id',$user_info['id'])->first();
|
|
|
|
- if(json_decode($special['material'])){
|
|
|
|
- $material = json_decode($special['material'],true);
|
|
|
|
- foreach ($material as $k => $v){
|
|
|
|
- if(array_key_exists('response',$v)){
|
|
|
|
- $material[$k]['url'] = $v['response']['path'];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- $material = [];
|
|
|
|
- }
|
|
|
|
- $user_info['special'] = [
|
|
|
|
- 'point_apply' => (string)$special['point_apply'],
|
|
|
|
- 'condition' => $special['condition'],
|
|
|
|
- 'material' => $material
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
- if(in_array('detail',$forms)){
|
|
|
|
|
|
+ if(in_array('internship',$forms)) {
|
|
|
|
+ //如果已有该场次的报名记录,读取录入的数据集合
|
|
|
|
+ $user_info = $appoint_info;
|
|
|
|
+ $user_info['sex'] = (string)$user_info['sex'];
|
|
|
|
+ $user_info['adjust'] = (string)$user_info['adjust'];
|
|
|
|
+ $user_info['edu_type'] = (string)$user_info['edu_type'];
|
|
|
|
+ $user_info['family'] = json_decode($user_info['family']);
|
|
$detail = RecruitAppointDetail::where('recruit_appoint_id',$user_info['id'])->first();
|
|
$detail = RecruitAppointDetail::where('recruit_appoint_id',$user_info['id'])->first();
|
|
if($detail){
|
|
if($detail){
|
|
$user_info['detail'] = $detail->toArray();
|
|
$user_info['detail'] = $detail->toArray();
|
|
}else{
|
|
}else{
|
|
$user_info['detail'] = [
|
|
$user_info['detail'] = [
|
|
- 'train' => '',
|
|
|
|
'rewards_and_punishments' => '',
|
|
'rewards_and_punishments' => '',
|
|
'introduce' => ''
|
|
'introduce' => ''
|
|
];
|
|
];
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //如果有身份证明模块
|
|
|
|
- if(in_array('identification',$forms)){
|
|
|
|
if(json_decode($user_info['identification'])){
|
|
if(json_decode($user_info['identification'])){
|
|
$identification = json_decode($user_info['identification'],true);
|
|
$identification = json_decode($user_info['identification'],true);
|
|
foreach ($identification as $k => $v){
|
|
foreach ($identification as $k => $v){
|
|
@@ -368,9 +347,6 @@ class IndexController extends WebBaseController
|
|
$identification = [];
|
|
$identification = [];
|
|
}
|
|
}
|
|
$user_info['identification'] = $identification;
|
|
$user_info['identification'] = $identification;
|
|
- }
|
|
|
|
- //如果有教育证明模块
|
|
|
|
- if(in_array('education_certification',$forms)){
|
|
|
|
if(json_decode($user_info['education_certification'])){
|
|
if(json_decode($user_info['education_certification'])){
|
|
$education_certification = json_decode($user_info['education_certification'],true);
|
|
$education_certification = json_decode($user_info['education_certification'],true);
|
|
foreach ($education_certification as $k => $v){
|
|
foreach ($education_certification as $k => $v){
|
|
@@ -383,9 +359,7 @@ class IndexController extends WebBaseController
|
|
$education_certification = [];
|
|
$education_certification = [];
|
|
}
|
|
}
|
|
$user_info['education_certification'] = $education_certification;
|
|
$user_info['education_certification'] = $education_certification;
|
|
- }
|
|
|
|
- //如果有其他证明模块
|
|
|
|
- if(in_array('other_certification',$forms)){
|
|
|
|
|
|
+
|
|
if(json_decode($user_info['other_certification'])){
|
|
if(json_decode($user_info['other_certification'])){
|
|
$other_certification = json_decode($user_info['other_certification'],true);
|
|
$other_certification = json_decode($user_info['other_certification'],true);
|
|
foreach ($other_certification as $k => $v){
|
|
foreach ($other_certification as $k => $v){
|
|
@@ -398,59 +372,194 @@ class IndexController extends WebBaseController
|
|
$other_certification = [];
|
|
$other_certification = [];
|
|
}
|
|
}
|
|
$user_info['other_certification'] = $other_certification;
|
|
$user_info['other_certification'] = $other_certification;
|
|
- }
|
|
|
|
|
|
|
|
- //获取最新的报名审核信息
|
|
|
|
- $logs = RecruitAppointLog::where('appoint_id',$user_info->id)->where('step',1)->where('type',2)->orderBy('created_at','desc')->first();
|
|
|
|
- if($logs){
|
|
|
|
- $user_info['audit_log'] = $logs->log;
|
|
|
|
|
|
+ //获取最新的报名审核信息
|
|
|
|
+ $logs = RecruitAppointLog::where('appoint_id',$user_info->id)->where('step',1)->where('type',2)->orderBy('created_at','desc')->first();
|
|
|
|
+ if($logs){
|
|
|
|
+ $user_info['audit_log'] = $logs->log;
|
|
|
|
+ }else{
|
|
|
|
+ $user_info['audit_log'] = '';
|
|
|
|
+ }
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
- $user_info['audit_log'] = '';
|
|
|
|
|
|
+ //如果已有该场次的报名记录,读取录入的数据集合
|
|
|
|
+ $user_info = $appoint_info;
|
|
|
|
+ $user_info['sex'] = (string)$user_info['sex'];
|
|
|
|
+ $user_info['edu_type'] = (string)$user_info['edu_type'];
|
|
|
|
+ $user_info['family'] = json_decode($user_info['family']);
|
|
|
|
+ if(in_array('expand_special',$forms)){
|
|
|
|
+ $special = RecruitAppointExpandSpecial::where('recruit_appoint_id',$user_info['id'])->first();
|
|
|
|
+ if(json_decode($special['material'])){
|
|
|
|
+ $material = json_decode($special['material'],true);
|
|
|
|
+ foreach ($material as $k => $v){
|
|
|
|
+ if(array_key_exists('response',$v)){
|
|
|
|
+ $material[$k]['url'] = $v['response']['path'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $material = [];
|
|
|
|
+ }
|
|
|
|
+ $user_info['special'] = [
|
|
|
|
+ 'point_apply' => (string)$special['point_apply'],
|
|
|
|
+ 'condition' => $special['condition'],
|
|
|
|
+ 'material' => $material
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(in_array('detail',$forms)){
|
|
|
|
+ $detail = RecruitAppointDetail::where('recruit_appoint_id',$user_info['id'])->first();
|
|
|
|
+ if($detail){
|
|
|
|
+ $user_info['detail'] = $detail->toArray();
|
|
|
|
+ }else{
|
|
|
|
+ $user_info['detail'] = [
|
|
|
|
+ 'train' => '',
|
|
|
|
+ 'rewards_and_punishments' => '',
|
|
|
|
+ 'introduce' => ''
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //如果有身份证明模块
|
|
|
|
+ if(in_array('identification',$forms)){
|
|
|
|
+ if(json_decode($user_info['identification'])){
|
|
|
|
+ $identification = json_decode($user_info['identification'],true);
|
|
|
|
+ foreach ($identification as $k => $v){
|
|
|
|
+ if(array_key_exists('response',$v)){
|
|
|
|
+ $identification[$k]['url'] = $v['response']['path'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $identification = [];
|
|
|
|
+ }
|
|
|
|
+ $user_info['identification'] = $identification;
|
|
|
|
+ }
|
|
|
|
+ //如果有教育证明模块
|
|
|
|
+ if(in_array('education_certification',$forms)){
|
|
|
|
+ if(json_decode($user_info['education_certification'])){
|
|
|
|
+ $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'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $education_certification = [];
|
|
|
|
+ }
|
|
|
|
+ $user_info['education_certification'] = $education_certification;
|
|
|
|
+ }
|
|
|
|
+ //如果有其他证明模块
|
|
|
|
+ if(in_array('other_certification',$forms)){
|
|
|
|
+ if(json_decode($user_info['other_certification'])){
|
|
|
|
+ $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'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $other_certification = [];
|
|
|
|
+ }
|
|
|
|
+ $user_info['other_certification'] = $other_certification;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //获取最新的报名审核信息
|
|
|
|
+ $logs = RecruitAppointLog::where('appoint_id',$user_info->id)->where('step',1)->where('type',2)->orderBy('created_at','desc')->first();
|
|
|
|
+ if($logs){
|
|
|
|
+ $user_info['audit_log'] = $logs->log;
|
|
|
|
+ }else{
|
|
|
|
+ $user_info['audit_log'] = '';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //获取提交报名的次数
|
|
|
|
+// $number = RecruitAppointLog::where('appoint_id',$user_info->id)->where('step',1)->where('type',3)->count();
|
|
|
|
+// $post_number = $number+1;//todo
|
|
}
|
|
}
|
|
|
|
|
|
- //获取提交报名的次数
|
|
|
|
- $number = RecruitAppointLog::where('appoint_id',$user_info->id)->where('step',1)->where('type',3)->count();
|
|
|
|
- $post_number = $number+1;//todo
|
|
|
|
|
|
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
- $post_number = 1;
|
|
|
|
- //如果没有,结合基础数据及模块表单信息,制作数据对象
|
|
|
|
- $user_info = RecruitAppointBasic::where('uid',$uid)->first();
|
|
|
|
- if(!$user_info){
|
|
|
|
- //没有基础信息跳转完善route('person.recruitInfo')
|
|
|
|
- return $this->showMessage('请先完善招考基础信息!', route('person.recruitInfo',array('recruit_id',$id)), true, '上一页', '3');
|
|
|
|
- }
|
|
|
|
- $user_info['sex'] = (string)$user_info['sex'];
|
|
|
|
- $user_info['edu_type'] = (string)$user_info['edu_type'];
|
|
|
|
- $user_info['family'] = json_decode($user_info['family']);
|
|
|
|
- if(in_array('expand_special',$forms)){
|
|
|
|
- $user_info['special'] = [
|
|
|
|
- 'point_apply' => '0',
|
|
|
|
- 'condition' => '',
|
|
|
|
- 'material' => []
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
- if(in_array('detail',$forms)){
|
|
|
|
- $user_info['detail'] = [
|
|
|
|
- 'train' => '',
|
|
|
|
- 'rewards_and_punishments' => '',
|
|
|
|
- 'introduce' => ''
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
- if(in_array('identification',$forms)){
|
|
|
|
- $user_info['identification'] = [];
|
|
|
|
- }
|
|
|
|
- if(in_array('education_certification',$forms)){
|
|
|
|
- $user_info['education_certification'] = [];
|
|
|
|
- }
|
|
|
|
- if(in_array('other_certification',$forms)){
|
|
|
|
- $user_info['other_certification'] = [];
|
|
|
|
|
|
+ //实习专场
|
|
|
|
+ if(in_array('internship',$forms)){
|
|
|
|
+ $user_info = json_encode([
|
|
|
|
+ 'recruit_id' => $id,
|
|
|
|
+ 'operation' => 1,
|
|
|
|
+ 'realname' => '',
|
|
|
|
+ 'sex' => '1',
|
|
|
|
+ 'birthday' => '',
|
|
|
|
+ 'card' => '',
|
|
|
|
+ 'nation' => '',
|
|
|
|
+ 'native_place' => '',
|
|
|
|
+ 'political_affiliation' => '',
|
|
|
|
+ 'join_time' => '',
|
|
|
|
+ 'house_register' => '',
|
|
|
|
+ 'education' => '',
|
|
|
|
+ 'school' => '',
|
|
|
|
+ 'pro' => '',
|
|
|
|
+ 'adjust' => '',
|
|
|
|
+ 'mobile' => '',
|
|
|
|
+ 'email' => '',
|
|
|
|
+ 'address' => '',
|
|
|
|
+ 'post_id' => '',
|
|
|
|
+ 'concat_name' => '',
|
|
|
|
+ 'concat_mobile' => '',
|
|
|
|
+ 'resume' => '',
|
|
|
|
+ 'avatar' => '',
|
|
|
|
+ 'family' => [
|
|
|
|
+ [
|
|
|
|
+ 'relation' => '',
|
|
|
|
+ 'realname' => '',
|
|
|
|
+ 'birthday' => '',
|
|
|
|
+ 'political_affiliation' => '',
|
|
|
|
+ 'work' => ''
|
|
|
|
+ ]
|
|
|
|
+ ],
|
|
|
|
+ 'detail' => [
|
|
|
|
+ 'rewards_and_punishments' => '',
|
|
|
|
+ 'introduce' => ''
|
|
|
|
+ ],
|
|
|
|
+ 'identification' => [],
|
|
|
|
+ 'education_certification' => [],
|
|
|
|
+ 'other_certification' => []
|
|
|
|
+ ]);
|
|
|
|
+ }else{
|
|
|
|
+ //如果没有,结合基础数据及模块表单信息,制作数据对象
|
|
|
|
+ $user_info = RecruitAppointBasic::where('uid',$uid)->first();
|
|
|
|
+ if(!$user_info){
|
|
|
|
+ //没有基础信息跳转完善route('person.recruitInfo')
|
|
|
|
+ return $this->showMessage('请先完善招考基础信息!', route('recruit.recruitInfo',array('recruit_id',$id)), true, '上一页', '3');
|
|
|
|
+ }
|
|
|
|
+ $user_info['sex'] = (string)$user_info['sex'];
|
|
|
|
+ $user_info['edu_type'] = (string)$user_info['edu_type'];
|
|
|
|
+ $user_info['family'] = json_decode($user_info['family']);
|
|
|
|
+ if(in_array('expand_special',$forms)){
|
|
|
|
+ $user_info['special'] = [
|
|
|
|
+ 'point_apply' => '0',
|
|
|
|
+ 'condition' => '',
|
|
|
|
+ 'material' => []
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(in_array('detail',$forms)){
|
|
|
|
+ $user_info['detail'] = [
|
|
|
|
+ 'train' => '',
|
|
|
|
+ 'rewards_and_punishments' => '',
|
|
|
|
+ 'introduce' => ''
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if(in_array('identification',$forms)){
|
|
|
|
+ $user_info['identification'] = [];
|
|
|
|
+ }
|
|
|
|
+ if(in_array('education_certification',$forms)){
|
|
|
|
+ $user_info['education_certification'] = [];
|
|
|
|
+ }
|
|
|
|
+ if(in_array('other_certification',$forms)){
|
|
|
|
+ $user_info['other_certification'] = [];
|
|
|
|
+ }
|
|
|
|
+ $user_info['recruit_id'] = $id;
|
|
|
|
+ $user_info['operation'] = 1;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- $user_info['recruit_id'] = $id;
|
|
|
|
- $user_info['operation'] = 1;
|
|
|
|
|
|
+ }
|
|
|
|
|
|
//招考岗位
|
|
//招考岗位
|
|
$where_post[] = ['recruit_id', '=', $id];
|
|
$where_post[] = ['recruit_id', '=', $id];
|
|
@@ -468,8 +577,8 @@ class IndexController extends WebBaseController
|
|
|
|
|
|
$view_data['appoint_info'] = $user_info;
|
|
$view_data['appoint_info'] = $user_info;
|
|
$view_data['post'] = json_encode($post);
|
|
$view_data['post'] = json_encode($post);
|
|
- $view_data['post_number'] = $post_number;
|
|
|
|
- $view_data['post_times'] = $recruit['post_times'];
|
|
|
|
|
|
+// $view_data['post_number'] = $post_number;
|
|
|
|
+// $view_data['post_times'] = $recruit['post_times'];
|
|
$view_data['post_limit'] = json_encode($post_limit);
|
|
$view_data['post_limit'] = json_encode($post_limit);
|
|
$view_data['formDisable'] = $formDisabled;
|
|
$view_data['formDisable'] = $formDisabled;
|
|
$view_data['title'] = $recruit->company;
|
|
$view_data['title'] = $recruit->company;
|
|
@@ -493,14 +602,14 @@ class IndexController extends WebBaseController
|
|
|
|
|
|
$recruit_id = $request->input('recruit_id', 0);
|
|
$recruit_id = $request->input('recruit_id', 0);
|
|
if (!$recruit_id) {
|
|
if (!$recruit_id) {
|
|
- return response()->json(['status' => 0,'msg' => '请选择招考项目!']);
|
|
|
|
|
|
+ return response()->json(['status' => 0,'msg' => '请选择项目!']);
|
|
}
|
|
}
|
|
$recruit = Recruit::find($recruit_id);
|
|
$recruit = Recruit::find($recruit_id);
|
|
if(!$recruit['status']){
|
|
if(!$recruit['status']){
|
|
- return response()->json(['status' => 0,'msg' => '抱歉,该招考状态不正确,请联系客服!']);
|
|
|
|
|
|
+ return response()->json(['status' => 0,'msg' => '抱歉,该项目状态不正确,请联系客服!']);
|
|
}
|
|
}
|
|
if($recruit['current'] != 1){
|
|
if($recruit['current'] != 1){
|
|
- return response()->json(['status' => 0,'msg' => '抱歉,该招考报名通道已关闭,如有疑问,请联系客服!']);
|
|
|
|
|
|
+ return response()->json(['status' => 0,'msg' => '抱歉,该项目报名通道已关闭,如有疑问,请联系客服!']);
|
|
}
|
|
}
|
|
$time = time();
|
|
$time = time();
|
|
$appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$recruit_id)->first();
|
|
$appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$recruit_id)->first();
|
|
@@ -509,11 +618,11 @@ class IndexController extends WebBaseController
|
|
//如果有报名记录,先查询首次报名是什么时候
|
|
//如果有报名记录,先查询首次报名是什么时候
|
|
$first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->orderBy('created_at','asc')->first();
|
|
$first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->orderBy('created_at','asc')->first();
|
|
if(!$first_post){//没有记录代表只是暂存
|
|
if(!$first_post){//没有记录代表只是暂存
|
|
- return response()->json(['status' => 0,'msg' => '抱歉,该招考已过报名时间!']);
|
|
|
|
|
|
+ return response()->json(['status' => 0,'msg' => '抱歉,该项目已过报名时间!']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(!$appoint_info){
|
|
if(!$appoint_info){
|
|
- return response()->json(['status' => 0,'msg' => '抱歉,该招考已过报名时间!']);
|
|
|
|
|
|
+ return response()->json(['status' => 0,'msg' => '抱歉,该项目已过报名时间!']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -566,7 +675,7 @@ class IndexController extends WebBaseController
|
|
$msg = $validator->errors()->all();
|
|
$msg = $validator->errors()->all();
|
|
return response()->json(['status' => 0,'msg' => $msg[0]]);
|
|
return response()->json(['status' => 0,'msg' => $msg[0]]);
|
|
}else{
|
|
}else{
|
|
- $data = $request->only('realname','sex','birthday','avatar','nation','native_place','political_affiliation','titles','join_time','work','house_register','education','school','degree','pro','address','card','mobile','email','concat_name','concat_mobile','resume','post_id');
|
|
|
|
|
|
+ $data = $request->only('realname','sex','birthday','avatar','nation','native_place','political_affiliation','titles','join_time','work','house_register','education','school','degree','pro','address','card','mobile','email','concat_name','concat_mobile','resume','post_id','adjust');
|
|
//身份证判断出生日期和性别
|
|
//身份证判断出生日期和性别
|
|
$year = substr($data['card'],6,4);
|
|
$year = substr($data['card'],6,4);
|
|
$month = substr($data['card'],10,2);
|
|
$month = substr($data['card'],10,2);
|
|
@@ -696,7 +805,7 @@ class IndexController extends WebBaseController
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//如果有详情模块
|
|
//如果有详情模块
|
|
- if(in_array('detail',$forms)){
|
|
|
|
|
|
+ if(in_array('detail',$forms) || in_array('internship',$forms)){
|
|
$detail = $request->input('detail');
|
|
$detail = $request->input('detail');
|
|
$hasRecord = RecruitAppointDetail::where('recruit_appoint_id',$appoint_info->id)->first();
|
|
$hasRecord = RecruitAppointDetail::where('recruit_appoint_id',$appoint_info->id)->first();
|
|
if($hasRecord){
|
|
if($hasRecord){
|
|
@@ -708,7 +817,7 @@ class IndexController extends WebBaseController
|
|
|
|
|
|
}
|
|
}
|
|
//如果有身份证明模块
|
|
//如果有身份证明模块
|
|
- if(in_array('identification',$forms)){
|
|
|
|
|
|
+ if(in_array('identification',$forms) || in_array('internship',$forms)){
|
|
$identification = $request->input('identification');
|
|
$identification = $request->input('identification');
|
|
if(is_array($identification)){
|
|
if(is_array($identification)){
|
|
//删除掉没有成功返回路径的图片
|
|
//删除掉没有成功返回路径的图片
|
|
@@ -722,7 +831,7 @@ class IndexController extends WebBaseController
|
|
$appoint_info->save();
|
|
$appoint_info->save();
|
|
}
|
|
}
|
|
//如果有教育证明模块
|
|
//如果有教育证明模块
|
|
- if(in_array('education_certification',$forms)){
|
|
|
|
|
|
+ if(in_array('education_certification',$forms) || in_array('internship',$forms)){
|
|
$education_certification = $request->input('education_certification');
|
|
$education_certification = $request->input('education_certification');
|
|
if(is_array($education_certification)){
|
|
if(is_array($education_certification)){
|
|
//删除掉没有成功返回路径的图片
|
|
//删除掉没有成功返回路径的图片
|
|
@@ -736,7 +845,7 @@ class IndexController extends WebBaseController
|
|
$appoint_info->save();
|
|
$appoint_info->save();
|
|
}
|
|
}
|
|
//如果有其他证明模块
|
|
//如果有其他证明模块
|
|
- if(in_array('other_certification',$forms)){
|
|
|
|
|
|
+ if(in_array('other_certification',$forms) || in_array('internship',$forms)){
|
|
$other_certification = $request->input('other_certification');
|
|
$other_certification = $request->input('other_certification');
|
|
if(is_array($other_certification)){
|
|
if(is_array($other_certification)){
|
|
//删除掉没有成功返回路径的图片
|
|
//删除掉没有成功返回路径的图片
|
|
@@ -796,13 +905,13 @@ class IndexController extends WebBaseController
|
|
RecruitAppointExpandSpecial::create($special);
|
|
RecruitAppointExpandSpecial::create($special);
|
|
}
|
|
}
|
|
//如果有详情模块
|
|
//如果有详情模块
|
|
- if(in_array('detail',$forms)){
|
|
|
|
|
|
+ if(in_array('detail',$forms) || in_array('internship',$forms)){
|
|
$detail = $request->input('detail');
|
|
$detail = $request->input('detail');
|
|
$detail['recruit_appoint_id'] = $result->id;
|
|
$detail['recruit_appoint_id'] = $result->id;
|
|
RecruitAppointDetail::create($detail);
|
|
RecruitAppointDetail::create($detail);
|
|
}
|
|
}
|
|
//如果有身份证明模块
|
|
//如果有身份证明模块
|
|
- if(in_array('identification',$forms)){
|
|
|
|
|
|
+ if(in_array('identification',$forms) || in_array('internship',$forms)){
|
|
$identification = $request->input('identification');
|
|
$identification = $request->input('identification');
|
|
if(is_array($identification)){
|
|
if(is_array($identification)){
|
|
//删除掉没有成功返回路径的图片
|
|
//删除掉没有成功返回路径的图片
|
|
@@ -817,7 +926,7 @@ class IndexController extends WebBaseController
|
|
$result->save();
|
|
$result->save();
|
|
}
|
|
}
|
|
//如果有教育证明模块
|
|
//如果有教育证明模块
|
|
- if(in_array('education_certification',$forms)){
|
|
|
|
|
|
+ if(in_array('education_certification',$forms) || in_array('internship',$forms)){
|
|
$education_certification = $request->input('education_certification');
|
|
$education_certification = $request->input('education_certification');
|
|
if(is_array($education_certification)){
|
|
if(is_array($education_certification)){
|
|
//删除掉没有成功返回路径的图片
|
|
//删除掉没有成功返回路径的图片
|
|
@@ -832,7 +941,7 @@ class IndexController extends WebBaseController
|
|
$result->save();
|
|
$result->save();
|
|
}
|
|
}
|
|
//如果有其他证明模块
|
|
//如果有其他证明模块
|
|
- if(in_array('other_certification',$forms)){
|
|
|
|
|
|
+ if(in_array('other_certification',$forms) || in_array('internship',$forms)){
|
|
$other_certification = $request->input('other_certification');
|
|
$other_certification = $request->input('other_certification');
|
|
|
|
|
|
if($other_certification){
|
|
if($other_certification){
|