|
@@ -943,61 +943,67 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!empty($post_info['limit']) && json_decode($post_info['limit'])){
|
|
|
- //岗位限制条件的判断
|
|
|
- $post_limit = json_decode($post_info['limit'],true);
|
|
|
- if(is_array($post_limit)){
|
|
|
- foreach($post_limit as $k => $v){
|
|
|
- if($k == 'birthday'){
|
|
|
- $value = str_replace('-','',$data[$k]);
|
|
|
- }else{
|
|
|
- $value = $data[$k];
|
|
|
- }
|
|
|
- switch ($v['op']){
|
|
|
- case '=':
|
|
|
- if($value != $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case '>':
|
|
|
- if($value <= $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case '>=':
|
|
|
- if($value < $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case '<':
|
|
|
- if($value >= $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case '<=':
|
|
|
- if($value > $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case '!=':
|
|
|
- if($value == $v['value']){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 'like':
|
|
|
- if(strpos($value,$v['value']) === false){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 'in':
|
|
|
- if(strpos($v['value'],$value) === false){
|
|
|
- return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
- }
|
|
|
- break;
|
|
|
+ try{
|
|
|
+ if(!empty($post_info['limit']) && json_decode($post_info['limit'])){
|
|
|
+ //岗位限制条件的判断
|
|
|
+ $post_limit = json_decode($post_info['limit'],true);
|
|
|
+ if(is_array($post_limit)){
|
|
|
+ foreach($post_limit as $k => $v){
|
|
|
+ if($k == 'birthday'){
|
|
|
+ $value = str_replace('-','',$data[$k]);
|
|
|
+ }else{
|
|
|
+ $value = $data[$k];
|
|
|
+ }
|
|
|
+ switch ($v['op']){
|
|
|
+ case '=':
|
|
|
+ if($value != $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '>':
|
|
|
+ if($value <= $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '>=':
|
|
|
+ if($value < $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '<':
|
|
|
+ if($value >= $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '<=':
|
|
|
+ if($value > $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '!=':
|
|
|
+ if($value == $v['value']){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 'like':
|
|
|
+ if(strpos($value,$v['value']) === false){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 'in':
|
|
|
+ if(strpos($v['value'],$value) === false){
|
|
|
+ return response()->json(['status' => 0,'msg' => $v['msg']]);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }catch (\Exception $e){
|
|
|
+ error_log(serialize($data),3,'/data/wwwroot/jucai/sms');
|
|
|
+ return ['status' => 0, 'msg' => '数据有误,请联系客服'];
|
|
|
}
|
|
|
+
|
|
|
//前置审核 判断完成,先将数据入报名信息基础表
|
|
|
//解析家庭成员数据
|
|
|
$familys = $request->input('family');
|
|
@@ -1048,7 +1054,45 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $special['point'] = 0;
|
|
|
+ switch ($recruit->special_condition_type){
|
|
|
+ case 0:
|
|
|
+ $special['point'] = 0;
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $special_rule = json_decode($recruit->special_condition_value,true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $special_rule = json_decode($post_info['special'],true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
if(is_array($special['condition'])){
|
|
|
$special['condition'] = implode(',',$special['condition']);
|
|
|
}
|
|
@@ -1219,6 +1263,44 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ switch ($recruit->special_condition_type){
|
|
|
+ case 0:
|
|
|
+ $special['point'] = 0;
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $special_rule = json_decode($recruit->special_condition_value,true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $special_rule = json_decode($post_info['special'],true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
if(is_array($special['condition'])){
|
|
|
$special['condition'] = implode(',',$special['condition']);
|
|
|
}
|