|  | @@ -809,56 +809,70 @@ class IndexController extends WebBaseController
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        //基础信息的检查
 | 
	
		
			
				|  |  | -        $rules = [
 | 
	
		
			
				|  |  | -            'realname' => 'required',
 | 
	
		
			
				|  |  | -            'sex' => 'required',
 | 
	
		
			
				|  |  | -            'birthday' => 'required',
 | 
	
		
			
				|  |  | -            'avatar' => 'required',
 | 
	
		
			
				|  |  | -            'nation' => 'required',
 | 
	
		
			
				|  |  | -            'native_place' => 'required',
 | 
	
		
			
				|  |  | -            'political_affiliation' => 'required',
 | 
	
		
			
				|  |  | -            'post_id'   =>  'required',
 | 
	
		
			
				|  |  | -            'house_register' => 'required',
 | 
	
		
			
				|  |  | -            //'edu_type' => 'required',
 | 
	
		
			
				|  |  | -            'education' => 'required',
 | 
	
		
			
				|  |  | -            'school' => 'required',
 | 
	
		
			
				|  |  | -            'address' => 'required',
 | 
	
		
			
				|  |  | -            'mobile' => 'required',
 | 
	
		
			
				|  |  | -            'email' => 'required',
 | 
	
		
			
				|  |  | -            'card' => 'required',
 | 
	
		
			
				|  |  | -            'concat_name' => 'required',
 | 
	
		
			
				|  |  | -            'concat_mobile' => 'required',
 | 
	
		
			
				|  |  | -            'resume' => 'required'
 | 
	
		
			
				|  |  | -        ];
 | 
	
		
			
				|  |  | -        $messages = [
 | 
	
		
			
				|  |  | -            'realname.required' => '请填写姓名',
 | 
	
		
			
				|  |  | -            'sex.required' => '请填写性别',
 | 
	
		
			
				|  |  | -            'birthday.required' => '请填写出生日期',
 | 
	
		
			
				|  |  | -            'avatar.required' => '请上传彩色免冠照',
 | 
	
		
			
				|  |  | -            'nation.required' => '请填写民族',
 | 
	
		
			
				|  |  | -            'native_place.required' => '请填写籍贯',
 | 
	
		
			
				|  |  | -            'political_affiliation.required' => '请选择政治面貌',
 | 
	
		
			
				|  |  | -            'post_id.required' => '请选择报名岗位',
 | 
	
		
			
				|  |  | -            'house_register.required' => '请填写户籍所在地',
 | 
	
		
			
				|  |  | -            //'edu_type.required' => '请选择教育类型',
 | 
	
		
			
				|  |  | -            'education.required' => '请输入学历',
 | 
	
		
			
				|  |  | -            'school.required' => '请输入毕业院校',
 | 
	
		
			
				|  |  | -            'address.required' => '请填写通信地址',
 | 
	
		
			
				|  |  | -            'mobile.required' => '请填写手机号码',
 | 
	
		
			
				|  |  | -            'email.required' => '请填写电子邮箱',
 | 
	
		
			
				|  |  | -            'card.required' => '请填写身份证号码',
 | 
	
		
			
				|  |  | -            'resume.required' => '请填写个人简历',
 | 
	
		
			
				|  |  | -            'concat_name.required' => '请填写联系人姓名',
 | 
	
		
			
				|  |  | -            'concat_mobile.required' => '请填写联系人手机号码'
 | 
	
		
			
				|  |  | -        ];
 | 
	
		
			
				|  |  | -        $create_data = $request->all();
 | 
	
		
			
				|  |  | -        $validator = Validator::make($create_data,$rules,$messages);
 | 
	
		
			
				|  |  | -        if ($validator->fails()) {
 | 
	
		
			
				|  |  | -            $msg = $validator->errors()->all();
 | 
	
		
			
				|  |  | -            return response()->json(['status' => 0,'msg' => $msg[0]]);
 | 
	
		
			
				|  |  | +        $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','remark');
 | 
	
		
			
				|  |  | +        $post_info = RecruitPost::where('id',$data['post_id'])->where('recruit_id',$recruit_id)->first();
 | 
	
		
			
				|  |  | +        if(!$post_info['status'] || $post_info['deleted_at'] != null){
 | 
	
		
			
				|  |  | +            return response()->json(['status' => 0,'msg' => '该岗位已失效']);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //获取操作符,是暂存还是提交
 | 
	
		
			
				|  |  | +        $operation = $request->input('operation');
 | 
	
		
			
				|  |  | +        if($operation == 1){
 | 
	
		
			
				|  |  | +            $data['audit'] = 0;//暂存
 | 
	
		
			
				|  |  |          }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','adjust','remark');
 | 
	
		
			
				|  |  | +            //基础信息的检查
 | 
	
		
			
				|  |  | +            $rules = [
 | 
	
		
			
				|  |  | +                'realname' => 'required',
 | 
	
		
			
				|  |  | +                'sex' => 'required',
 | 
	
		
			
				|  |  | +                'birthday' => 'required',
 | 
	
		
			
				|  |  | +                'avatar' => 'required',
 | 
	
		
			
				|  |  | +                'nation' => 'required',
 | 
	
		
			
				|  |  | +                'native_place' => 'required',
 | 
	
		
			
				|  |  | +                'political_affiliation' => 'required',
 | 
	
		
			
				|  |  | +                'post_id'   =>  'required',
 | 
	
		
			
				|  |  | +                'house_register' => 'required',
 | 
	
		
			
				|  |  | +                //'edu_type' => 'required',
 | 
	
		
			
				|  |  | +                'education' => 'required',
 | 
	
		
			
				|  |  | +                'school' => 'required',
 | 
	
		
			
				|  |  | +                'address' => 'required',
 | 
	
		
			
				|  |  | +                'mobile' => 'required',
 | 
	
		
			
				|  |  | +                'email' => 'required',
 | 
	
		
			
				|  |  | +                'card' => 'required',
 | 
	
		
			
				|  |  | +                'concat_name' => 'required',
 | 
	
		
			
				|  |  | +                'concat_mobile' => 'required',
 | 
	
		
			
				|  |  | +                'resume' => 'required'
 | 
	
		
			
				|  |  | +            ];
 | 
	
		
			
				|  |  | +            $messages = [
 | 
	
		
			
				|  |  | +                'realname.required' => '请填写姓名',
 | 
	
		
			
				|  |  | +                'sex.required' => '请填写性别',
 | 
	
		
			
				|  |  | +                'birthday.required' => '请填写出生日期',
 | 
	
		
			
				|  |  | +                'avatar.required' => '请上传彩色免冠照',
 | 
	
		
			
				|  |  | +                'nation.required' => '请填写民族',
 | 
	
		
			
				|  |  | +                'native_place.required' => '请填写籍贯',
 | 
	
		
			
				|  |  | +                'political_affiliation.required' => '请选择政治面貌',
 | 
	
		
			
				|  |  | +                'post_id.required' => '请选择报名岗位',
 | 
	
		
			
				|  |  | +                'house_register.required' => '请填写户籍所在地',
 | 
	
		
			
				|  |  | +                //'edu_type.required' => '请选择教育类型',
 | 
	
		
			
				|  |  | +                'education.required' => '请输入学历',
 | 
	
		
			
				|  |  | +                'school.required' => '请输入毕业院校',
 | 
	
		
			
				|  |  | +                'address.required' => '请填写通信地址',
 | 
	
		
			
				|  |  | +                'mobile.required' => '请填写手机号码',
 | 
	
		
			
				|  |  | +                'email.required' => '请填写电子邮箱',
 | 
	
		
			
				|  |  | +                'card.required' => '请填写身份证号码',
 | 
	
		
			
				|  |  | +                'resume.required' => '请填写个人简历',
 | 
	
		
			
				|  |  | +                'concat_name.required' => '请填写联系人姓名',
 | 
	
		
			
				|  |  | +                'concat_mobile.required' => '请填写联系人手机号码'
 | 
	
		
			
				|  |  | +            ];
 | 
	
		
			
				|  |  | +            $create_data = $request->all();
 | 
	
		
			
				|  |  | +            $validator = Validator::make($create_data,$rules,$messages);
 | 
	
		
			
				|  |  | +            if ($validator->fails()) {
 | 
	
		
			
				|  |  | +                $msg = $validator->errors()->all();
 | 
	
		
			
				|  |  | +                return response()->json(['status' => 0,'msg' => $msg[0]]);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            $data['audit'] = 1;//提交
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              //身份证判断出生日期和性别
 | 
	
		
			
				|  |  |              $year = substr($data['card'],6,4);
 | 
	
		
			
				|  |  |              $month = substr($data['card'],10,2);
 | 
	
	
		
			
				|  | @@ -871,17 +885,7 @@ class IndexController extends WebBaseController
 | 
	
		
			
				|  |  |              }else{
 | 
	
		
			
				|  |  |                  $data['sex'] = 1;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            $post_info = RecruitPost::where('id',$data['post_id'])->where('recruit_id',$recruit_id)->first();
 | 
	
		
			
				|  |  | -            if(!$post_info['status'] || $post_info['deleted_at'] != null){
 | 
	
		
			
				|  |  | -                return response()->json(['status' => 0,'msg' => '该岗位已失效']);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            //获取操作符,是暂存还是提交
 | 
	
		
			
				|  |  | -            $operation = $request->input('operation');
 | 
	
		
			
				|  |  | -            if($operation == 1){
 | 
	
		
			
				|  |  | -                $data['audit'] = 0;//暂存
 | 
	
		
			
				|  |  | -            }else{
 | 
	
		
			
				|  |  | -                $data['audit'] = 1;//提交
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              if(!empty($post_info['limit']) && json_decode($post_info['limit'])){
 | 
	
		
			
				|  |  |                  //岗位限制条件的判断
 | 
	
		
			
				|  |  |                  $post_limit = json_decode($post_info['limit'],true);
 | 
	
	
		
			
				|  | @@ -1240,7 +1244,7 @@ class IndexController extends WebBaseController
 | 
	
		
			
				|  |  |                      return ['status' => 0, 'msg' => $e->getMessage()];
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |