|
@@ -298,6 +298,7 @@ class ImportService extends Service
|
|
|
$eductionIdx = array_search('education', $keys);
|
|
$eductionIdx = array_search('education', $keys);
|
|
|
$stateIdx = array_search('state', $keys);
|
|
$stateIdx = array_search('state', $keys);
|
|
|
$manIdx = array_search('man_type', $keys);
|
|
$manIdx = array_search('man_type', $keys);
|
|
|
|
|
+ $entrustIdx = array_search('entrust_type', $keys);
|
|
|
$depIdx = array_search('depart_code', $keys);
|
|
$depIdx = array_search('depart_code', $keys);
|
|
|
|
|
|
|
|
$code_map = $this->getEmployeeList($array, $user, $codeIdx);
|
|
$code_map = $this->getEmployeeList($array, $user, $codeIdx);
|
|
@@ -312,6 +313,7 @@ class ImportService extends Service
|
|
|
$e_map = array_flip(Employee::Education);
|
|
$e_map = array_flip(Employee::Education);
|
|
|
$state_map = array_flip(Employee::State_Type);
|
|
$state_map = array_flip(Employee::State_Type);
|
|
|
$man_map = array_flip(Employee::Man_Type);
|
|
$man_map = array_flip(Employee::Man_Type);
|
|
|
|
|
+ $wt_map = array_flip(Employee::WT_Type);
|
|
|
|
|
|
|
|
// 获取所有标记为 is_main 的列索引,用于一致性对比
|
|
// 获取所有标记为 is_main 的列索引,用于一致性对比
|
|
|
$mainColIndices = [];
|
|
$mainColIndices = [];
|
|
@@ -380,6 +382,14 @@ class ImportService extends Service
|
|
|
$array[$rowIndex][$manIdx] = $man_map[$man_text];
|
|
$array[$rowIndex][$manIdx] = $man_map[$man_text];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //委托类型
|
|
|
|
|
+ $wt_text = trim($rowValue[$entrustIdx] ?? '');
|
|
|
|
|
+ if (!isset($wt_map[$wt_text])) {
|
|
|
|
|
+ $errors[] = "第{$displayLine}行:委托方式[{$wt_text}]无效";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $array[$rowIndex][$entrustIdx] = $wt_map[$wt_text];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 4. 解析部门 (分行模式)
|
|
// 4. 解析部门 (分行模式)
|
|
|
if ($depIdx !== false && !empty($rowValue[$depIdx])) {
|
|
if ($depIdx !== false && !empty($rowValue[$depIdx])) {
|
|
|
$mNum = trim($rowValue[$depIdx]);
|
|
$mNum = trim($rowValue[$depIdx]);
|