From 59530cd7a14b489120dc5448bf612ad9034a8c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Tue, 13 Sep 2022 15:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 16 ++++++++-------- models/interview_zsgc.py | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index 7647588..d38431f 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -772,14 +772,14 @@ async def find_criterion( data[i] = int(df[i][0]) else: data[i] = df[i][0] - if data['work_exp'] == 0: - data['work_exp'] = '应届生' - elif data['work_exp'] >= 1 and data['work_exp'] < 3: - data['work_exp'] = '1-3年' - elif data['work_exp'] >= 3 and data['work_exp'] < 5: - data['work_exp'] = '1-3年' - else: - data['work_exp'] = '5年以上' + # if data['work_exp'] == 0: + # data['work_exp'] = '应届生' + # elif data['work_exp'] >= 1 and data['work_exp'] < 3: + # data['work_exp'] = '1-3年' + # elif data['work_exp'] >= 3 and data['work_exp'] < 5: + # data['work_exp'] = '1-3年' + # else: + # data['work_exp'] = '5年以上' if data.get('work_list', []): work_list = [json.loads(i) for i in data['work_list']] if isinstance(work_list[0], str): diff --git a/models/interview_zsgc.py b/models/interview_zsgc.py index bfa2e41..7786377 100644 --- a/models/interview_zsgc.py +++ b/models/interview_zsgc.py @@ -265,13 +265,15 @@ class InterviewDo: for key, value in self.data_in.items(): if key == 'uid': continue + if value == None: + continue + if value == '': + continue if updateStr: updateStr += ',' if isinstance(value, str): updateStr += str(key) + ' = ' + "'" + value + "'" + ' ' continue - if value == None: - continue updateStr += str(key) + ' = ' + str(value) + ' ' if 'uid' in self.data_in: self.where.update({