|
|
@@ -297,6 +297,7 @@ class ImportService extends Service
|
|
|
$sexIdx = array_search('sex', $keys);
|
|
|
$eductionIdx = array_search('education', $keys);
|
|
|
$stateIdx = array_search('state', $keys);
|
|
|
+ $manIdx = array_search('man_type', $keys);
|
|
|
$depIdx = array_search('depart_code', $keys);
|
|
|
|
|
|
$code_map = $this->getEmployeeList($array, $user, $codeIdx);
|
|
|
@@ -310,6 +311,7 @@ class ImportService extends Service
|
|
|
$sex_map = array_flip(Employee::SEX_TYPE);
|
|
|
$e_map = array_flip(Employee::Education);
|
|
|
$state_map = array_flip(Employee::State_Type);
|
|
|
+ $man_map = array_flip(Employee::Man_Type);
|
|
|
|
|
|
// 获取所有标记为 is_main 的列索引,用于一致性对比
|
|
|
$mainColIndices = [];
|
|
|
@@ -370,6 +372,14 @@ class ImportService extends Service
|
|
|
$array[$rowIndex][$stateIdx] = $state_map[$state_text];
|
|
|
}
|
|
|
|
|
|
+ //人员类别
|
|
|
+ $man_text = trim($rowValue[$manIdx] ?? '');
|
|
|
+ if (!isset($man_map[$man_text])) {
|
|
|
+ $errors[] = "第{$displayLine}行:人员类别[{$man_text}]无效";
|
|
|
+ } else {
|
|
|
+ $array[$rowIndex][$manIdx] = $man_map[$man_text];
|
|
|
+ }
|
|
|
+
|
|
|
// 4. 解析部门 (分行模式)
|
|
|
if ($depIdx !== false && !empty($rowValue[$depIdx])) {
|
|
|
$mNum = trim($rowValue[$depIdx]);
|