|
@@ -29,7 +29,7 @@ class Couple extends AdminBaseController
|
|
|
}
|
|
|
|
|
|
//初始化数据
|
|
|
- $data = ['id', 'name', 'company', 'level', 'street', 'mobile', 'people'];
|
|
|
+ $data = ['id', 'name', 'card_type', 'idcard', 'sex', 'birthday', 'mobile', 'tag', 'company', 'street', 'industry', 'job', 'graduate', 'level', 'people'];
|
|
|
$old_list = import_exl($old_file, $data, 1);
|
|
|
$new_list = import_exl($new_file, $data, 1);
|
|
|
if (empty($old_list)) {
|
|
@@ -40,24 +40,24 @@ class Couple extends AdminBaseController
|
|
|
}
|
|
|
|
|
|
//数据处理
|
|
|
- $old_idcard = array_column($old_list, 'mobile');
|
|
|
- $new_idcard = array_column($new_list, 'mobile');
|
|
|
+ $old_idcard = array_column($old_list, 'idcard');
|
|
|
+ $new_idcard = array_column($new_list, 'idcard');
|
|
|
$delete = array_diff($old_idcard, $new_idcard);
|
|
|
$add = array_diff($new_idcard, $old_idcard);
|
|
|
$list = array_intersect($new_idcard, $old_idcard);
|
|
|
|
|
|
//旧名单重整
|
|
|
- $old_people_by_mobile = [];
|
|
|
+ $old_people_by_idcard = [];
|
|
|
$old_people_by_company = [];
|
|
|
foreach ($old_list as $v) {
|
|
|
- $old_people_by_mobile[$v['mobile']] = $v['people'];
|
|
|
+ $old_people_by_idcard[$v['idcard']] = $v['people'];
|
|
|
$old_people_by_company[$v['company']] = $v['people'];
|
|
|
}
|
|
|
|
|
|
//新名单重整
|
|
|
- $new_people_by_mobile = [];
|
|
|
+ $new_people_by_idcard = [];
|
|
|
foreach ($new_list as $v) {
|
|
|
- $new_people_by_mobile[$v['mobile']] = $v['company'];
|
|
|
+ $new_people_by_idcard[$v['idcard']] = $v['company'];
|
|
|
}
|
|
|
|
|
|
//匹配名单
|
|
@@ -72,8 +72,8 @@ class Couple extends AdminBaseController
|
|
|
$item = $new_list[$k];
|
|
|
$item['status'] = '新增';
|
|
|
$item['people'] = '';
|
|
|
- if (!empty($new_people_by_mobile[$v]) && !empty($old_people_by_company[$new_people_by_mobile[$v]])) {
|
|
|
- $item['people'] = $old_people_by_company[$new_people_by_mobile[$v]];
|
|
|
+ if (!empty($new_people_by_idcard[$v]) && !empty($old_people_by_company[$new_people_by_idcard[$v]])) {
|
|
|
+ $item['people'] = $old_people_by_company[$new_people_by_idcard[$v]];
|
|
|
}
|
|
|
$res[] = $item;
|
|
|
}
|
|
@@ -81,21 +81,29 @@ class Couple extends AdminBaseController
|
|
|
foreach ($list as $k => $v) {
|
|
|
$item = $new_list[$k];
|
|
|
$item['status'] = '续期';
|
|
|
- $item['people'] = $old_people_by_mobile[$v];
|
|
|
+ $item['people'] = $old_people_by_idcard[$v];
|
|
|
$res[] = $item;
|
|
|
}
|
|
|
|
|
|
$xlsCell = [
|
|
|
['id', '序号'],
|
|
|
['name', '姓名'],
|
|
|
+ ['card_type', '证件类型'],
|
|
|
+ ['idcard', '证件号码'],
|
|
|
+ ['sex', '性别'],
|
|
|
+ ['birthday', '出生日期'],
|
|
|
+ ['mobile', '手机号码'],
|
|
|
+ ['tag', '企业标签'],
|
|
|
['company', '单位名称'],
|
|
|
- ['level', '人才层次'],
|
|
|
['street', '所属镇街'],
|
|
|
- ['mobile', '联系方式'],
|
|
|
+ ['industry', '产业领域'],
|
|
|
+ ['job', '本单位现任职位'],
|
|
|
+ ['graduate', '最高学历'],
|
|
|
+ ['level', '人才层次'],
|
|
|
['people', '挂钩人员'],
|
|
|
['status', '状态'],
|
|
|
];
|
|
|
- export_exl("人才挂钩名单匹配记录", $xlsCell, $res);
|
|
|
+ export_exl("人才挂钩名单匹配记录", $xlsCell, $res, ['idcard', 'birthday', 'mobile']);
|
|
|
}
|
|
|
|
|
|
}
|