소스 검색

2023村务选岗

sandm 1 년 전
부모
커밋
b074ace67c
1개의 변경된 파일36개의 추가작업 그리고 16개의 파일을 삭제
  1. 36 16
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 36 - 16
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -2569,60 +2569,80 @@ class IndexController extends WebBaseController
     public function get_select_result(Request $request)
     {
         $redis = Cache::getRedis();
-        $quota = $redis->get('recruit_quotaA');
+        $quota = $redis->get('recruit_quotaB');
         if(!$quota){
             $quota = [
+                [
+                    'name' => '青阳街道',
+                    'value' => 7
+                ],
                 [
                     'name' => '梅岭街道',
-                    'value' => 3
+                    'value' => 14
                 ],
                 [
                     'name' => '西园街道',
-                    'value' => 3
+                    'value' => 11
                 ],
                 [
                     'name' => '罗山街道',
+                    'value' => 7
+                ],
+                [
+                    'name' => '灵源街道',
                     'value' => 3
                 ],
                 [
                     'name' => '新塘街道',
-                    'value' => 3
+                    'value' => 13
                 ],
                 [
                     'name' => '陈埭镇',
-                    'value' => 10
+                    'value' => 49
                 ],
                 [
                     'name' => '池店镇',
-                    'value' => 7
+                    'value' => 23
                 ],
                 [
                     'name' => '安海镇',
-                    'value' => 5
+                    'value' => 16
+                ],
+                [
+                    'name' => '磁灶镇',
+                    'value' => 2
                 ],
                 [
                     'name' => '内坑镇',
-                    'value' => 3
+                    'value' => 4
+                ],
+                [
+                    'name' => '紫帽镇',
+                    'value' => 8
+                ],
+                [
+                    'name' => '永和镇',
+                    'value' => 5
                 ],
                 [
                     'name' => '金井镇',
-                    'value' => 3
+                    'value' => 11
                 ],
                 [
                     'name' => '龙湖镇',
-                    'value' => 5
+                    'value' => 41
                 ],
                 [
                     'name' => '经济开发区',
-                    'value' => 5
+                    'value' => 18
                 ]
             ];
-            $redis->set('recruit_quotaA',json_encode($quota));
+            $redis->set('recruit_quotaB',json_encode($quota));
         }else{
             $quota = json_decode($quota,true);
         }
         $limit = $request->input('limit',1);
-        $list = DB::table('recruit_appoint_select as a')->leftJoin('recruit_appoint_info as b','a.appoint_id','=','b.id')->leftJoin('recruit_ticket as c','a.appoint_id','=','c.appoint_id')->whereRaw('a.select_result is null and a.batch=3 and a.type=1 and a.status=1')->select(['b.realname','c.ex_number','a.result','a.select_result','a.id'])->orderBy('record','desc')->limit($limit)->get();
+        $list = DB::table('recruit_appoint_select as a')->leftJoin('recruit_appoint_info as b','a.appoint_id','=','b.id')->leftJoin('recruit_ticket as c','a.appoint_id','=','c.appoint_id')->whereRaw('a.select_result is null and a.batch=3 and a.type=2 and a.status=1')->select(['b.realname','c.ex_number','a.result','a.select_result','a.id'])->orderBy('record','desc')->limit($limit)->get();
         $return_data = [
             'list' => []
         ];
@@ -2643,7 +2663,7 @@ class IndexController extends WebBaseController
                     $v->select_result = $val;
                     $quota[$index]['value']--;
                     $quota_data['new_value'] = $quota[$index]['value'];
-                    $redis->set('recruit_quotaA',json_encode($quota));
+                    $redis->set('recruit_quotaB',json_encode($quota));
                     $flag = 1;
                     break;
                 }
@@ -2661,7 +2681,7 @@ class IndexController extends WebBaseController
 
     public function select_init(Request $request)
     {
-        $count = DB::table('recruit_appoint_select')->whereRaw('select_result is null and batch = 3 and type = 1')->count();
+        $count = DB::table('recruit_appoint_select')->whereRaw('select_result is null and batch = 3 and type = 2')->count();
 
         $redis = Cache::getRedis();
         $quotaA = $redis->get('recruit_quotaA');
@@ -2784,7 +2804,7 @@ class IndexController extends WebBaseController
             ];
             $redis->set('recruit_quota',json_encode($quotaB));
         }
-        $list = DB::table('recruit_appoint_select as a')->leftJoin('recruit_appoint_info as b','a.appoint_id','=','b.id')->leftJoin('recruit_ticket as c','a.appoint_id','=','c.appoint_id')->whereRaw('a.select_result is not null and a.batch=3 and type = 1')->select(['b.realname','c.ex_number','a.result','a.select_result','a.id'])->orderBy('record','desc')->get();
+        $list = DB::table('recruit_appoint_select as a')->leftJoin('recruit_appoint_info as b','a.appoint_id','=','b.id')->leftJoin('recruit_ticket as c','a.appoint_id','=','c.appoint_id')->whereRaw('a.select_result is not null and a.batch=3 and type = 2')->select(['b.realname','c.ex_number','a.result','a.select_result','a.id'])->orderBy('record','desc')->get();
         return ['status' => 1, 'msg' => '获取初始化信息成功', 'data' => ['count' => $count, 'quota' => $quotaA, 'list' => $list]];
     }