From 131b31013bd2f8b125a350b4f6225970b5e611b6 Mon Sep 17 00:00:00 2001 From: wangxu <1318272526@qq.com> Date: Tue, 11 Nov 2025 11:42:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/cross_evaluate_worker.py | 9 +++++++-- app/db_cross_delay.py | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/cross_evaluate_worker.py b/app/cross_evaluate_worker.py index d88928d..b4cbc9c 100644 --- a/app/cross_evaluate_worker.py +++ b/app/cross_evaluate_worker.py @@ -367,7 +367,11 @@ def query_cross_examine_records_detail(params): final_state = row['final_state'] first_date = row['first_date'] level_color = row['level_color'] - date_list = generate_date_range(first_date, prev_day) + end_date = row['end_date'] + if end_date: + date_list = generate_date_range(first_date, end_date) + else: + date_list = generate_date_range(first_date, prev_day) phase_types = row['phase_type'] phase_details = row['phase_detail'] tp_start = convert_time(row['start_hm']) @@ -438,7 +442,8 @@ def update_cross_examine_record_state(params): if not time_range: return json.dumps(make_common_res(10, '缺少时段范围, 请刷新后重试')) tp_start = int(str(time_range.split('-')[0]).split(':')[0]) * 100 + int(str(time_range.split('-')[0]).split(':')[1]) - ret = db_cross.update_cross_examine_record_state_sql(crossid, first_date, tp_start, final_state) + end_date = datetime.now().strftime("%Y%m%d") + ret = db_cross.update_cross_examine_record_state_sql(crossid, first_date, end_date, tp_start, final_state) if ret == 1: return json.dumps(make_common_res(0, 'ok')) return json.dumps(make_common_res(11, '修改失败,请检查后重试')) diff --git a/app/db_cross_delay.py b/app/db_cross_delay.py index 59ac94a..cbc3c69 100644 --- a/app/db_cross_delay.py +++ b/app/db_cross_delay.py @@ -43,8 +43,8 @@ class CrossDbHelper(TableDbHelperBase): """ % (crossid, first_date, end_date) return self.do_select(sql) - def update_cross_examine_record_state_sql(self, crossid, first_date, start_hm, state): + def update_cross_examine_record_state_sql(self, crossid, first_date, end_date, start_hm, state): sql = """ - update cross_doctor_matedata.cross_phase_problems_record set state = '%s' where crossid = '%s' and first_date = '%s' and start_hm = %s - """ % (state, crossid, first_date, start_hm) + update cross_doctor_matedata.cross_phase_problems_record set state = '%s', end_date = '%s' where crossid = '%s' and first_date = '%s' and start_hm = %s + """ % (state, end_date, crossid, first_date, start_hm) return self.do_execute(sql)