feat:gx-hrm-employee 人员导入功能
This commit is contained in:
parent
c3605ff1db
commit
0c66931154
|
|
@ -315,9 +315,8 @@ class EmployeeViewSet(CustomModelViewSet):
|
|||
myLogger = logging.getLogger('log')
|
||||
"""导入excel"""
|
||||
file_path = request.data.get('file_path')
|
||||
# if file_path:
|
||||
# file_path = r"C:\Users\11825\Desktop\0303光芯花名册.xlsx"
|
||||
abs_path = os.path.join(settings.BASE_DIR, file_path)
|
||||
relative_path = file_path.lstrip('/')
|
||||
abs_path = os.path.join(settings.BASE_DIR, relative_path)
|
||||
wb = load_workbook(abs_path, data_only=True)
|
||||
sheet = wb.active
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue