feat:gx-hrm-employee 人员导入功能

This commit is contained in:
TianyangZhang 2026-03-04 15:39:46 +08:00
parent c3605ff1db
commit 0c66931154
1 changed files with 2 additions and 3 deletions

View File

@ -315,9 +315,8 @@ class EmployeeViewSet(CustomModelViewSet):
myLogger = logging.getLogger('log') myLogger = logging.getLogger('log')
"""导入excel""" """导入excel"""
file_path = request.data.get('file_path') file_path = request.data.get('file_path')
# if file_path: relative_path = file_path.lstrip('/')
# file_path = r"C:\Users\11825\Desktop\0303光芯花名册.xlsx" abs_path = os.path.join(settings.BASE_DIR, relative_path)
abs_path = os.path.join(settings.BASE_DIR, file_path)
wb = load_workbook(abs_path, data_only=True) wb = load_workbook(abs_path, data_only=True)
sheet = wb.active sheet = wb.active