Эх сурвалжийг харах

Merge branch 'master' of http://59.57.98.130:3000/jjhc/jucai

linwu 1 жил өмнө
parent
commit
a0fd58793e

+ 4 - 2
app/Admin/Controllers/Recruit/RecruitController.php

@@ -899,7 +899,7 @@ class RecruitController extends Controller
             ->join('recruit_post', 'recruit_appoint_info.post_id', '=', 'recruit_post.id', 'left')
             ->join('recruit_appoint_expand_special', 'recruit_appoint_info.id', '=', 'recruit_appoint_expand_special.recruit_appoint_id', 'left')
             ->join('recruit_appoint_detail', 'recruit_appoint_detail.recruit_appoint_id', '=', 'recruit_appoint_info.id', 'left')
-            ->select('recruit_appoint_info.*', 'recruit_post.name', 'recruit_post.code', 'recruit_appoint_detail.train', 'recruit_appoint_detail.rewards_and_punishments', 'recruit_appoint_detail.introduce', 'recruit_appoint_expand_special.point_apply', 'recruit_appoint_expand_special.condition', 'recruit_appoint_expand_special.material')
+            ->select('recruit_appoint_info.*', 'recruit_post.name', 'recruit_post.code', 'recruit_appoint_detail.train', 'recruit_appoint_detail.rewards_and_punishments', 'recruit_appoint_detail.introduce', 'recruit_appoint_expand_special.point_apply', 'recruit_appoint_expand_special.condition', 'recruit_appoint_expand_special.point', 'recruit_appoint_expand_special.material')
             ->first();
         $recruit = Recruit::where('id',$data->recruit_id)->first();
         if($recruit->special){
@@ -922,6 +922,7 @@ class RecruitController extends Controller
         ];
 
         if(in_array('expand_special',$recruit->forms)){
+
             if(json_decode($data->material)){
                 $data->material = json_decode($data->material);
                 $photo_data = [];
@@ -2330,7 +2331,7 @@ class RecruitController extends Controller
                 $header = ['姓名','性别','生日','头像','民族','籍贯','报考岗位','政治面貌','入党时间','职称或职业资格','现工作单位及职务','户籍所在地','学历','学校','学位','所学专业','通信地址','身份证号码','联系电话','电子邮箱','紧急联系人','紧急联系电话'];
             }
             if(in_array('expand_special',explode(',', $recruit->forms))){
-                $special = ['是否申请加分','符合哪一项加分条件','加分佐证材料'];
+                $special = ['是否申请加分','加分条件','累计加分值','加分佐证材料'];
                 $header = array_merge($header,$special);
             }
             if(in_array('detail',explode(',', $recruit->forms)) || in_array('internship',explode(',', $recruit->forms))){
@@ -2497,6 +2498,7 @@ class RecruitController extends Controller
                     $special = [
                         $v->point_apply == 0 ? '否' : '是',
                         $v->condition,
+                        $v->point,
                         implode("\r\n", $materials)
                     ];
                     $item = array_merge($item, $special);

+ 134 - 52
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -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']);
                         }

+ 1 - 1
libs/sms/src/ChuanglanSms.php

@@ -108,7 +108,7 @@ class ChuanglanSms implements Smser
     public function sendAuthSms(string $mobile, SmsTemplate $template): bool
     {
         $params['code']=rand(100000, 999999);
-        error_log("{$mobile}-{$params['code']}",3,'/data/wwwroot/jucai/sms');
+        //error_log("{$mobile}-{$params['code']}",3,'/data/wwwroot/jucai/sms');
         $ret = $this->sendSms($mobile, $template, $params);
         Cache::put($template->alias.'_'.$mobile, $params['code'], 15);
         return $ret;

+ 1 - 1
public/rcmap.html

@@ -3,7 +3,7 @@
 
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>Observer - fullPage.js</title>
+    <title>线上人才目录图谱</title>
 
     <link rel="stylesheet" type="text/css" href="/themes/default/assets/app/css/fullpage.css" />
     <style>

+ 6 - 1
resources/views/admin/recruit/manageajax_userinfo.blade.php

@@ -581,7 +581,7 @@
             <td valign="center">
                 是否申请加分
             </td>
-            <td valign="center" colspan="4">
+            <td valign="center" colspan="1">
                 @if($appointinfo->point_apply == 0)
                 @else
@@ -592,8 +592,13 @@
                 符合哪一项加分条件
             </td>
             <td valign="center" colspan="4">
+
                 {{ $appointinfo->condition }}
             </td>
+            <td valign="center"  colspan="2">累计加分值</td>
+            <td valign="center">
+                {{ $appointinfo->point }}
+            </td>
         </tr>
         <tr style="height:52px;page-break-inside:avoid">
             <td valign="center">