From 07f17058dd18a7365c8d07ef247ba8fabfb9510a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Fri, 16 Sep 2022 18:25:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 27 ++++++++++++++++++++++----- schemas/interview_plan.py | 12 +++++++++--- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index 961b46b..a2ad1c9 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -1907,11 +1907,11 @@ async def send_interviewee( sql = f""" select job_id,name,job_names from HR.resumes where uid = '{data_in.uid}' limit 1 """ - res=await ckdb.execute(sql) - job_id=res[0]['job_id'] - user=await crud.jobs.find_job(db,job_id) - user_list=[i['user_id'] for i in user['hr_name']] - send=f"""【推荐通知】\n{current_user.name}给你推荐了一位面试者\n面试者姓名:{res[0]['name']}\n岗位:{res[0]['job_names']}""" + res = await ckdb.execute(sql) + job_id = res[0]['job_id'] + user = await crud.jobs.find_job(db, job_id) + user_list = [i['user_id'] for i in user['hr_name']] + send = f"""【推荐通知】\n{current_user.name}给你推荐了一位面试者\n面试者姓名:{res[0]['name']}\n岗位:{res[0]['job_names']}""" send_dates(send, user_list) return schemas.Msg(code=200, msg='ok', data='') @@ -2091,3 +2091,20 @@ async def interview_find( # 格式化数据 res_data = len(data) return schemas.Msg(code=200, msg='ok', data=res_data) + + +@router.post("/interview_teacher") +async def interview_teacher( + request: Request, + data_in: schemas.interview_teacher, + ckdb: CKDrive = Depends(get_ck_db), + current_user: schemas.UserDB = Depends(deps.get_current_user) +) -> schemas.Msg: + """ 面试反馈 """ + date=json.dumps(data_in.date) + sql=f""" + ALTER TABLE HR.resumes update teacher_state = 2,teacher_back={data_in.teacher_back},teacher_txt='{date}' + WHERE uid = '{data_in.uid}' + """ + await ckdb.execute(sql) + return schemas.Msg(code=200, msg='ok', data='') \ No newline at end of file diff --git a/schemas/interview_plan.py b/schemas/interview_plan.py index 4291186..31169c2 100644 --- a/schemas/interview_plan.py +++ b/schemas/interview_plan.py @@ -143,8 +143,6 @@ class send_in(BaseModel): uid: str # 求职者uid - - class add_inter(BaseModel): uid: str # 求职者uid user_id: List[str] # 面试官的钉钉id @@ -167,4 +165,12 @@ class nterview(BaseModel): # interview_type: int # 面试类型 # interview_sign: int # 面试签到 # feedback: int # 面试反馈 - # interview_round: int # 面试轮次 \ No newline at end of file + # interview_round: int # 面试轮次 + + +class interview_teacher(BaseModel): + date: dict # 存储的面试反馈 + teacher_back:int # 面试反馈选择 + uid: str # 求职者唯一id + #date数据 + #{'voice':1,'thought':1,'diathesis':1,'evaluate':'评价'} \ No newline at end of file From 317c101054a12c0218513f8dc4dc9cbe737be6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Fri, 16 Sep 2022 18:27:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index a2ad1c9..2e835f0 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -140,6 +140,9 @@ def chkData(data): if 'education' in res1: education = res1['education'] res1['education'] = education_dict[education] + if 'teacher_txt' in res1: + teacher_txt=json.loads(res1['teacher_txt']) + res1['teacher_txt'] = teacher_txt res_data.append(res1) return res_data