From 432418465db2e4efb8143bd068d8b8374d8c08e8 Mon Sep 17 00:00:00 2001 From: wangxu <1318272526@qq.com> Date: Thu, 6 Nov 2025 19:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=8F=A3=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E5=88=97=E8=A1=A8=E4=B8=AD=E5=8F=AF=E7=94=A8=E8=B7=AF?= =?UTF-8?q?=E5=8F=A3=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/cross_evaluate_worker.py | 2 +- app/tmnet_db_func.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/cross_evaluate_worker.py b/app/cross_evaluate_worker.py index 33ce528..5ea1594 100644 --- a/app/cross_evaluate_worker.py +++ b/app/cross_evaluate_worker.py @@ -43,7 +43,7 @@ def query_cross_list(params): "09:00-17:00", "17:00-19:00", "19:00-22:00", - "22:00-00:00" + "22:00-23:59" ] peak_tp = [ "07:00-09:00", diff --git a/app/tmnet_db_func.py b/app/tmnet_db_func.py index 77ffe62..a5c63a2 100644 --- a/app/tmnet_db_func.py +++ b/app/tmnet_db_func.py @@ -67,7 +67,13 @@ class TmnetDbHelper(TableDbHelperBase): from (select name,crossid, location,nodeid, area_id from `cross` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t1 left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t2 on t1.crossid=t2.crossid """ % (nodeid, area_id, nodeid, area_id) - return self.do_select(sql) + cross_list = self.do_select(sql) + if area_id != 0: + area_cross_sql = f'select * from bound_crosses where nodeid = {nodeid} and area_id = {area_id}' + area_crosses = self.do_select(area_cross_sql) + area_cross_list = [cross['crossid'] for cross in area_crosses] + cross_list = [cross for cross in cross_list if cross['crossid'] in area_cross_list] + return cross_list def query_cross_inroads(self, crossid, nodeid): sql = """