|
@@ -2724,35 +2724,83 @@ class IndexController extends WebBaseController
|
|
|
public function get_select_result(Request $request)
|
|
|
{
|
|
|
$redis = Cache::getRedis();
|
|
|
- $quota = $redis->get('recruit_quotaA');
|
|
|
- if (!$quota) {
|
|
|
- $quota = [
|
|
|
+ $quot_batch4 = $redis->get('recruit_quota_batch4');
|
|
|
+ if (!$quot_batch4) {
|
|
|
+ $quot_batch4 = [
|
|
|
[
|
|
|
- 'name' => '陈埭镇',
|
|
|
+ 'name' => '青阳街道',
|
|
|
+ 'value' => 4,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '梅岭街道',
|
|
|
+ 'value' => 10,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '西园街道',
|
|
|
+ 'value' => 6,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '灵源街道',
|
|
|
'value' => 2,
|
|
|
],
|
|
|
+ [
|
|
|
+ 'name' => '新塘街道',
|
|
|
+ 'value' => 8,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '陈埭镇',
|
|
|
+ 'value' => 30,
|
|
|
+ ],
|
|
|
[
|
|
|
'name' => '池店镇',
|
|
|
- 'value' => 1,
|
|
|
+ 'value' => 7,
|
|
|
],
|
|
|
[
|
|
|
- 'name' => '金井镇',
|
|
|
- 'value' => 2,
|
|
|
+ 'name' => '安海镇',
|
|
|
+ 'value' => 4,
|
|
|
],
|
|
|
[
|
|
|
- 'name' => '龙湖镇',
|
|
|
- 'value' => 2,
|
|
|
+ 'name' => '磁灶镇',
|
|
|
+ 'value' => 4,
|
|
|
],
|
|
|
+ [
|
|
|
+ 'name' => '紫帽镇',
|
|
|
+ 'value' => 5,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '永和镇',
|
|
|
+ 'value' => 4,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '金井镇',
|
|
|
+ 'value' => 6
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '龙湖镇',
|
|
|
+ 'value' => 3
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '深沪镇',
|
|
|
+ 'value' => 3
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '西滨镇',
|
|
|
+ 'value' => 2
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'name' => '经济开发区',
|
|
|
+ 'value' => 4
|
|
|
+ ]
|
|
|
];
|
|
|
- $redis->set('recruit_quotaA', json_encode($quota));
|
|
|
+ $redis->set('recruit_quotaA', json_encode($quot_batch4));
|
|
|
} else {
|
|
|
- $quota = json_decode($quota, true);
|
|
|
+ $quot_batch4 = json_decode($quot_batch4, true);
|
|
|
}
|
|
|
$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 and a.id > 1262')->select(['b.realname', 'c.ex_number', 'a.result', 'a.select_result', 'a.id', 'a.record', 'a.record2', 'a.record3'])->orderBy('record', 'desc')->orderBy('record2', 'desc')->orderBy('record3', 'desc')->limit(2)->get()->toArray();
|
|
|
$return_data = [
|
|
|
'list' => [],
|
|
|
];
|
|
|
- $array_column = array_column($quota, 'name');
|
|
|
+ $array_column = array_column($quot_batch4, 'name');
|
|
|
if (count($list) > 1) {
|
|
|
$current = $list[0];
|
|
|
$next = $list[1];
|
|
@@ -2766,8 +2814,8 @@ class IndexController extends WebBaseController
|
|
|
foreach ($person_select_result as $val) {
|
|
|
//寻找下标
|
|
|
$index = array_search($val, $array_column);
|
|
|
- if ($quota[$index]['value']) {
|
|
|
- if ($next && $current->record == $next->record && $current->record2 == $next->record2 && $current->record3 == $next->record3 && $quota[$index]['value'] == 1) {
|
|
|
+ if ($quot_batch4[$index]['value']) {
|
|
|
+ if ($next && $current->record == $next->record && $current->record2 == $next->record2 && $current->record3 == $next->record3 && $quot_batch4[$index]['value'] == 1) {
|
|
|
//如果当前处理人员不是最后一个,且分数与下一名人员三个维度完全一样的话并且该人员欲择的岗位仅剩一位,则特殊处理
|
|
|
//查找同样分数人同样志愿
|
|
|
$next_select_result = json_decode($next->result, true);
|
|
@@ -2786,9 +2834,9 @@ class IndexController extends WebBaseController
|
|
|
//有名额允许择岗
|
|
|
DB::table('recruit_appoint_select')->where('id', $current->id)->update(['select_result' => $val, 'status' => 1]);
|
|
|
$current->select_result = $val;
|
|
|
- $quota[$index]['value']--;
|
|
|
+ $quot_batch4[$index]['value']--;
|
|
|
$quota_data['new_value'] = $quota[$index]['value'];
|
|
|
- $redis->set('recruit_quotaA', json_encode($quota));
|
|
|
+ $redis->set('recruit_quota_batch4', json_encode($quot_batch4));
|
|
|
$flag = 1;
|
|
|
break;
|
|
|
}
|
|
@@ -2807,9 +2855,9 @@ class IndexController extends WebBaseController
|
|
|
$count = DB::table('recruit_appoint_select')->whereRaw('select_result is null and batch = 4 and type = 1')->count();
|
|
|
|
|
|
$redis = Cache::getRedis();
|
|
|
- $quotaA = $redis->get('recruit_quotaA');
|
|
|
- if (!$quotaA) {
|
|
|
- $quotaA = [
|
|
|
+ $quot_batch4 = $redis->get('recruit_quota_batch4');
|
|
|
+ if (!$quot_batch4) {
|
|
|
+ $quot_batch4 = [
|
|
|
[
|
|
|
'name' => '青阳街道',
|
|
|
'value' => 4,
|
|
@@ -2875,11 +2923,11 @@ class IndexController extends WebBaseController
|
|
|
'value' => 4
|
|
|
]
|
|
|
];
|
|
|
- $redis->set('recruit_quota', json_encode($quotaA));
|
|
|
+ $redis->set('recruit_quota', json_encode($quot_batch4));
|
|
|
}
|
|
|
|
|
|
$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=4 and type = 1')->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]];
|
|
|
+ return ['status' => 1, 'msg' => '获取初始化信息成功', 'data' => ['count' => $count, 'quota' => $quot_batch4, 'list' => $list]];
|
|
|
}
|
|
|
|
|
|
public function interviewer_random(Request $request)
|