diff --git a/api/api_v1/endpoints/forms.py b/api/api_v1/endpoints/forms.py index 6507c8e..f145837 100644 --- a/api/api_v1/endpoints/forms.py +++ b/api/api_v1/endpoints/forms.py @@ -1407,7 +1407,7 @@ async def interview_job_num_form( current_user: schemas.UserDB = Depends(deps.get_current_user) ) -> schemas.Msg: """ 开放中的职位 """ - job_data = await crud.jobs.all_some_field + job_data = await crud.jobs.all_some_field(db) value = list(set([i['job_name'] for i in job_data])) # 获取报表相关参数 table_id = interview.data_in.get('table_id', '') @@ -1438,7 +1438,7 @@ async def interview_job_need_num_form( current_user: schemas.UserDB = Depends(deps.get_current_user) ) -> schemas.Msg: """ 职位招聘人数 """ - job_data = await crud.jobs.all_some_field + job_data = await crud.jobs.all_some_field(db) value = [i['job_num'] for i in job_data] # 获取报表相关参数 table_id = interview.data_in.get('table_id', '') diff --git a/models/interview_zsgc.py b/models/interview_zsgc.py index 0c1364a..700460e 100644 --- a/models/interview_zsgc.py +++ b/models/interview_zsgc.py @@ -576,7 +576,11 @@ class InterviewDo: "pass_text"] for fstr in self.find_column: findStr += fstr + ', ' + is_date = 0 for key, value in self.where.items(): + if key in ['start_time', 'end_time']: + is_date = 1 + continue if isinstance(value, str): if not value.strip(): continue @@ -661,6 +665,9 @@ class InterviewDo: findStr += fstr + ', ' is_date = 0 for key, value in self.where.items(): + if key in ['start_time', 'end_time']: + is_date = 1 + continue if isinstance(value, str): if not value.strip(): continue @@ -716,6 +723,9 @@ class InterviewDo: is_date = 0 if self.where: for key, value in self.where.items(): + if key in ['start_time', 'end_time']: + is_date = 1 + continue if isinstance(value, str): if not value.strip(): continue @@ -773,6 +783,9 @@ class InterviewDo: }) if self.where: for key, value in self.where.items(): + if key in ['start_time', 'end_time']: + is_date = 1 + continue if isinstance(value, str): if not value.strip(): continue