This commit is contained in:
Àî×ÚÕñ 2022-08-17 14:49:47 +08:00
parent 57f52e5ad5
commit af2af42bd5
2 changed files with 15 additions and 7 deletions

View File

@ -59,9 +59,6 @@ def chkData(data):
if 'owner_name' in res1:
key6 = res1['owner_name']
res1['owner_name'] = owner_name_dict.get(key6, '人才库')
if 'education' in res1:
key7 = res1['education']
res1['education'] = education_dict.get(key7, '大专')
if 'mmended_state' in res1:
key8 = res1['mmended_state']
res1['mmended_state'] = mmended_state_dict.get(key8, '未推荐')
@ -325,6 +322,7 @@ async def file_to_hw(
"notice_state": 1,
"pass_why": 0,
"pass_text": "",
"now_address": "",
"file_url": url,
}
uid = get_uid()
@ -334,7 +332,7 @@ async def file_to_hw(
f" education, work_undergo, project_undergo, work_list, school, at_school, specialty, specialty_do, " \
f"mmended_state, mail, account, id_card, gender, age, gam, interview_state, counts, nation, come_time," \
f" review, upgrade, now_money, men_state, teacher_state, teacher_back, offer_state, offer_exam_state," \
f" notice_state, pass_why, pass_text, file_url) values"
f" notice_state, pass_why, pass_text, now_address, file_url) values"
# 存数据
await db.execute_dict(sql, [data_mode])
resData = {'file_url': url, 'filename': 'hrms/' + filename, 'uid': uid}

View File

@ -10,13 +10,13 @@ from pdf2docx import Converter
# 文件路径
schema = ['姓名', '所在地', '户口所在地', '籍贯', '婚姻状况', '民族', '电话', 'tel', '应聘职位', '到岗时间', '学历', '毕业学校', '专业', '期望薪资',
'在校时间', '电子邮箱', '工作经验', 'Email', '性别', '年龄', '身份证号', '技能特长'
'在校时间', '电子邮箱', '工作经验', 'Email', '性别', '年龄', '身份证号', '技能特长', '生日', '现住址'
]
schema_dict = {'姓名': 'name', '所在地': 'account', '户口所在地': 'accounts', '婚姻状况': 'gam', '民族': 'nation',
schema_dict = {'姓名': 'name', '所在地': 'account', '户口所在地': 'accounts', '婚姻状况': 'gam', '民族': 'nation', '生日': 'birthday',
'电话': 'phone', '应聘职位': 'job_name', '到岗时间': 'come_time', '学历': 'education', '毕业学校': 'school',
'专业': 'specialty', '期望薪资': 'hope_money', '在校时间': 'at_school', '电子邮箱': 'mail', '工作经验': 'work_exp',
'Email': 'mails', '性别': 'gender', '年龄': 'age', '籍贯': 'account', 'tel': 'tels', '身份证号': 'id_card',
'技能特长': 'specialty_do'}
'技能特长': 'specialty_do', '现住址': 'now_address'}
# 简历初始文档
data_mode = {
@ -65,6 +65,8 @@ data_mode = {
"pass_why": 0,
"pass_text": "",
"file_url": '',
"now_address": '',
"birthday": '',
}
@ -220,6 +222,14 @@ def get_date(schema, dates, schema_dict):
clash(date, 'account', 'accounts')
# 解决电话冲突的问题
clash(date, 'phone', 'tels')
work_exp = date['work_exp']
if 1 <= work_exp < 3:
date['work_exp'] = 1
if 3 <= work_exp < 5:
date['work_exp'] = 2
if work_exp >= 5:
date['work_exp'] = 3
return date