From f97b66d8c5c55ea0e06b00f3d46a1f8bef7a0629 Mon Sep 17 00:00:00 2001 From: xuwang Date: Wed, 27 May 2026 11:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=8F=A3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=AF=8A=E6=96=AD=E9=97=AE=E9=A2=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=B7=AF=E5=8F=A3=E8=A1=8C=E6=94=BF?= =?UTF-8?q?=E8=BE=96=E5=8C=BA=E4=BF=A1=E6=81=AF=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/monitor_common.py | 2 ++ app/tmnet_db_func.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/monitor_common.py b/app/monitor_common.py index 778074e..c6e22b2 100644 --- a/app/monitor_common.py +++ b/app/monitor_common.py @@ -1693,6 +1693,7 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_ cross_name = routing_crosses[crossid]['name'] company = routing_crosses[crossid]['company'] location = routing_crosses[crossid]['location'] + division = routing_crosses[crossid]['division'] high_park, stop_times_problem, inroad_problem, turn_problem, tide, phase, phase_desc, phase_color, phase_final_state = [], [], [], [], [], [], [], 9, 9 inroad_turnlane, unmatched_lane_num, sample_sch, sample_tp, short_tp, insufficient_yellow, unreasonable_red, big_cycle, small_cycle, insufficient_ped_time = [], [], [], [], [], [], [], [], [], [] if crossid in high_park_problems['problems'].keys(): @@ -1845,6 +1846,7 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_ 'cross_name': cross_name, 'location': location, 'company': company, + 'division': division, 'high_park_problem': high_park, 'too_many_stop_times': stop_times_problem, 'imbalance_inroad': inroad_problem, diff --git a/app/tmnet_db_func.py b/app/tmnet_db_func.py index 2e79e00..5f066c7 100644 --- a/app/tmnet_db_func.py +++ b/app/tmnet_db_func.py @@ -507,18 +507,19 @@ class TmnetDbHelper(TableDbHelperBase): if(t2.location is not null, t2.location, t1.location) as location, if(t2.internet is not null, t2.internet, t1.internet) as internet, if(t2.slc_company is not null, t2.slc_company, t1.slc_company) as slc_company, + if(t2.division is not null, t2.division, t1.division) as division, if(t2.cross_model is not null and t1.cross_model is not null and t2.cross_model != t1.cross_model, t2.cross_model, t1.cross_model) as cross_model, t1.nodeid, t1.area_id from - (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, cross_model from `cross` where nodeid = %s and area_id = %s) t1 + (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, division, cross_model from `cross` where nodeid = %s and area_id = %s) t1 left join - (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, cross_model from `cross_ledger_update_info` where nodeid = %s and area_id = %s ) t2 on t1.crossid = t2.crossid + (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, division, cross_model from `cross_ledger_update_info` where nodeid = %s and area_id = %s ) t2 on t1.crossid = t2.crossid where t1.area_id = %s and t1.nodeid = %s and t1.crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1) union all - select crossid, name, location, nodeid, area_id, cross_no, company, internet, slc_company, cross_model from user_defined_cross where area_id = %s and nodeid = %s and crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1) + select crossid, name, location, nodeid, area_id, cross_no, company, internet, slc_company, division, cross_model from user_defined_cross where area_id = %s and nodeid = %s and crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1) """ % (nodeid, area_id, nodeid, area_id, area_id, nodeid, area_id, nodeid, area_id, nodeid, area_id, nodeid) return self.do_select(sql)