From 536c6fbd1f42ea335abdce561451a6ee87d71465 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 10 八月 2026 14:01:16 +0800
Subject: [PATCH] feat(hrm): 添加员工个人信息字段及导入导出功能

---
 src/api/hrm/employee/index.ts |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/api/hrm/employee/index.ts b/src/api/hrm/employee/index.ts
index 9aeea4d..0287f85 100644
--- a/src/api/hrm/employee/index.ts
+++ b/src/api/hrm/employee/index.ts
@@ -18,6 +18,11 @@
     phone?: string;
     email?: string;
     idCard?: string;
+    nation?: string;
+    marriageStatus?: string;
+    age?: number;
+    education?: string;
+    politicalStatus?: string;
     hireDate?: string;
     regularDate?: string;
     leaveDate?: string;
@@ -82,6 +87,16 @@
     deptName?: string;
     postName?: string;
   }
+
+  /** 鍛樺伐瀵煎叆缁撴灉 */
+  export interface ImportResult {
+    /** 鍒涘缓鎴愬姛鐨勫憳宸ュ悕鏁扮粍 */
+    createNames?: string[];
+    /** 鏇存柊鎴愬姛鐨勫憳宸ュ悕鏁扮粍 */
+    updateNames?: string[];
+    /** 瀵煎叆澶辫触闆嗗悎锛宬ey 涓哄憳宸ュ悕锛寁alue 涓哄け璐ュ師鍥� */
+    failureNames?: Record<string, string>;
+  }
 }
 
 /** 鏌ヨ鍛樺伐鍒嗛〉鍒楄〃 */
@@ -126,6 +141,19 @@
   return requestClient.download('/hrm/employee/export-excel', { params });
 }
 
+/** 涓嬭浇鍛樺伐瀵煎叆妯℃澘 */
+export function importEmployeeTemplate() {
+  return requestClient.download('/hrm/employee/import-template');
+}
+
+/** 瀵煎叆鍛樺伐 */
+export function importEmployee(file: File, updateSupport: boolean) {
+  return requestClient.upload<HrmEmployeeApi.ImportResult>(
+    '/hrm/employee/import',
+    { file, updateSupport },
+  );
+}
+
 /** 鍒犻櫎鏁欒偛缁忓巻 */
 export function deleteEducation(id: number) {
   return requestClient.delete(`/hrm/employee/education/delete?id=${id}`);

--
Gitblit v1.9.3