|
@@ -2506,93 +2506,24 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
//手动设置择岗时间段
|
|
|
$time = time();
|
|
|
- if ($time > 1726545600 || $time < 1726217645) {
|
|
|
+ if ($time > 1727150400 || $time < 1726217645) {
|
|
|
//if($time > 1694491200){
|
|
|
return $this->showMessage('抱歉,未到择岗时间!', route('recruit.show', ['id', $recruit_id]), true, '上一页', '2');
|
|
|
}
|
|
|
- if ($info->type == 1) {
|
|
|
- $option_list = [
|
|
|
- [
|
|
|
- 'id' => 1,
|
|
|
- 'name' => '青阳街道',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 2,
|
|
|
- 'name' => '梅岭街道',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 3,
|
|
|
- 'name' => '西园街道',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 4,
|
|
|
- 'name' => '灵源街道',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 5,
|
|
|
- 'name' => '新塘街道',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 6,
|
|
|
- 'name' => '陈埭镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 7,
|
|
|
- 'name' => '池店镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 8,
|
|
|
- 'name' => '安海镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 9,
|
|
|
- 'name' => '磁灶镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 10,
|
|
|
- 'name' => '紫帽镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 11,
|
|
|
- 'name' => '永和镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 12,
|
|
|
- 'name' => '金井镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 13,
|
|
|
- 'name' => '龙湖镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 14,
|
|
|
- 'name' => '深沪镇'
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 15,
|
|
|
- 'name' => '西滨镇'
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 16,
|
|
|
- 'name' => '经济开发区'
|
|
|
- ]
|
|
|
- ];
|
|
|
- } else {
|
|
|
- $option_list = [
|
|
|
- [
|
|
|
- 'id' => 5,
|
|
|
- 'name' => '陈埭镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 6,
|
|
|
- 'name' => '金井镇',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'id' => 7,
|
|
|
- 'name' => '龙湖镇',
|
|
|
- ],
|
|
|
- ];
|
|
|
- }
|
|
|
+ $option_list = [
|
|
|
+ [
|
|
|
+ 'id' => 1,
|
|
|
+ 'name' => '陈埭镇',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'id' => 2,
|
|
|
+ 'name' => '金井镇',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'id' => 3,
|
|
|
+ 'name' => '深沪镇'
|
|
|
+ ]
|
|
|
+ ];
|
|
|
|
|
|
|
|
|
$select_list = [];
|
|
@@ -2717,7 +2648,7 @@ class IndexController extends WebBaseController
|
|
|
public function select_result(Request $request)
|
|
|
{
|
|
|
$redis = Cache::getRedis();
|
|
|
- $redis->set('recruit_quota_batch4', '');
|
|
|
+ $redis->set('recruit_quota_batch5', '');
|
|
|
|
|
|
return view('app.recruit.select_result');
|
|
|
}
|
|
@@ -2725,83 +2656,31 @@ class IndexController extends WebBaseController
|
|
|
public function get_select_result(Request $request)
|
|
|
{
|
|
|
$redis = Cache::getRedis();
|
|
|
- $quot_batch4 = $redis->get('recruit_quota_batch4');
|
|
|
- if (!$quot_batch4) {
|
|
|
- $quot_batch4 = [
|
|
|
- [
|
|
|
- 'name' => '青阳街道',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '梅岭街道',
|
|
|
- 'value' => 10,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '西园街道',
|
|
|
- 'value' => 6,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '灵源街道',
|
|
|
- 'value' => 2,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '新塘街道',
|
|
|
- 'value' => 8,
|
|
|
- ],
|
|
|
+ $quot_batch5 = $redis->get('recruit_quota_batch5');
|
|
|
+ if (!$quot_batch5) {
|
|
|
+ $quot_batch5 = [
|
|
|
[
|
|
|
'name' => '陈埭镇',
|
|
|
- 'value' => 30,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '池店镇',
|
|
|
- 'value' => 7,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '安海镇',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '磁灶镇',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '紫帽镇',
|
|
|
- 'value' => 5,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '永和镇',
|
|
|
- 'value' => 4,
|
|
|
+ 'value' => 21,
|
|
|
],
|
|
|
[
|
|
|
'name' => '金井镇',
|
|
|
- 'value' => 6
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '龙湖镇',
|
|
|
'value' => 3
|
|
|
],
|
|
|
[
|
|
|
'name' => '深沪镇',
|
|
|
- 'value' => 3
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '西滨镇',
|
|
|
'value' => 2
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '经济开发区',
|
|
|
- 'value' => 4
|
|
|
]
|
|
|
];
|
|
|
- $redis->set('recruit_quotaA', json_encode($quot_batch4));
|
|
|
+ $redis->set('recruit_quotaA', json_encode($quot_batch5));
|
|
|
} else {
|
|
|
- $quot_batch4 = json_decode($quot_batch4, true);
|
|
|
+ $quot_batch5 = json_decode($quot_batch5, 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=4')->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();
|
|
|
+ $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=5')->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($quot_batch4, 'name');
|
|
|
+ $array_column = array_column($quot_batch5, 'name');
|
|
|
if (count($list) > 1) {
|
|
|
$current = $list[0];
|
|
|
$next = $list[1];
|
|
@@ -2815,8 +2694,8 @@ class IndexController extends WebBaseController
|
|
|
foreach ($person_select_result as $val) {
|
|
|
//寻找下标
|
|
|
$index = array_search($val, $array_column);
|
|
|
- if ($quot_batch4[$index]['value']) {
|
|
|
- if ($next && $current->record == $next->record && $current->record2 == $next->record2 && $current->record3 == $next->record3 && $quot_batch4[$index]['value'] == 1) {
|
|
|
+ if ($quot_batch5[$index]['value']) {
|
|
|
+ if ($next && $current->record == $next->record && $current->record2 == $next->record2 && $current->record3 == $next->record3 && $quot_batch5[$index]['value'] == 1) {
|
|
|
//如果当前处理人员不是最后一个,且分数与下一名人员三个维度完全一样的话并且该人员欲择的岗位仅剩一位,则特殊处理
|
|
|
//查找同样分数人同样志愿
|
|
|
$next_select_result = json_decode($next->result, true);
|
|
@@ -2830,14 +2709,14 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
$quota_data = [
|
|
|
'index' => $index,
|
|
|
- 'old_value' => $quot_batch4[$index]['value'],
|
|
|
+ 'old_value' => $quot_batch5[$index]['value'],
|
|
|
];
|
|
|
//有名额允许择岗
|
|
|
DB::table('recruit_appoint_select')->where('id', $current->id)->update(['select_result' => $val, 'status' => 1]);
|
|
|
$current->select_result = $val;
|
|
|
- $quot_batch4[$index]['value']--;
|
|
|
+ $quot_batch5[$index]['value']--;
|
|
|
$quota_data['new_value'] = $quot_batch4[$index]['value'];
|
|
|
- $redis->set('recruit_quota_batch4', json_encode($quot_batch4));
|
|
|
+ $redis->set('recruit_quota_batch4', json_encode($quot_batch5));
|
|
|
$flag = 1;
|
|
|
break;
|
|
|
}
|
|
@@ -2845,7 +2724,7 @@ class IndexController extends WebBaseController
|
|
|
if (!$flag) {
|
|
|
$quota_data = [
|
|
|
'index' => $index,
|
|
|
- 'old_value' => $quot_batch4[$index]['value'],
|
|
|
+ 'old_value' => $quot_batch5[$index]['value'],
|
|
|
];
|
|
|
$current->select_result = '未匹配到志愿,本轮择岗不成功!';
|
|
|
DB::table('recruit_appoint_select')->where('id', $current->id)->update(['select_result' => '未匹配到志愿,本轮择岗不成功!', 'status' => -2]);
|
|
@@ -2857,82 +2736,30 @@ class IndexController extends WebBaseController
|
|
|
|
|
|
public function select_init(Request $request)
|
|
|
{
|
|
|
- $count = DB::table('recruit_appoint_select')->whereRaw('select_result is null and batch = 4 and type = 1')->count();
|
|
|
+ $count = DB::table('recruit_appoint_select')->whereRaw('select_result is null and batch = 5 and type = 1')->count();
|
|
|
|
|
|
$redis = Cache::getRedis();
|
|
|
- $quot_batch4 = $redis->get('recruit_quota_batch4');
|
|
|
- if (!$quot_batch4) {
|
|
|
- $quot_batch4 = [
|
|
|
- [
|
|
|
- 'name' => '青阳街道',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '梅岭街道',
|
|
|
- 'value' => 10,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '西园街道',
|
|
|
- 'value' => 6,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '灵源街道',
|
|
|
- 'value' => 2,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '新塘街道',
|
|
|
- 'value' => 8,
|
|
|
- ],
|
|
|
+ $quot_batch5 = $redis->get('recruit_quota_batch4');
|
|
|
+ if (!$quot_batch5) {
|
|
|
+ $quot_batch5 = [
|
|
|
[
|
|
|
'name' => '陈埭镇',
|
|
|
- 'value' => 30,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '池店镇',
|
|
|
- 'value' => 7,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '安海镇',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '磁灶镇',
|
|
|
- 'value' => 4,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '紫帽镇',
|
|
|
- 'value' => 5,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '永和镇',
|
|
|
- 'value' => 4,
|
|
|
+ 'value' => 21,
|
|
|
],
|
|
|
[
|
|
|
'name' => '金井镇',
|
|
|
- 'value' => 6
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '龙湖镇',
|
|
|
'value' => 3
|
|
|
],
|
|
|
[
|
|
|
'name' => '深沪镇',
|
|
|
- 'value' => 3
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '西滨镇',
|
|
|
'value' => 2
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => '经济开发区',
|
|
|
- 'value' => 4
|
|
|
]
|
|
|
];
|
|
|
- $redis->set('recruit_quota', json_encode($quot_batch4));
|
|
|
+ $redis->set('recruit_quota_batch5', json_encode($quot_batch5));
|
|
|
}
|
|
|
|
|
|
- $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' => $quot_batch4, 'list' => $list]];
|
|
|
+ $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=5 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' => $quot_batch5, 'list' => $list]];
|
|
|
}
|
|
|
|
|
|
public function interviewer_random(Request $request)
|