From 33b0227f8203d8cddf6415de99be03db633e4613 Mon Sep 17 00:00:00 2001 From: wangxu <1318272526@qq.com> Date: Mon, 8 Dec 2025 15:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=8F=A3=E7=AE=A1?= =?UTF-8?q?=E5=AE=B6=E5=B7=A1=E6=A3=80=E9=A1=B5=E9=9D=A2=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E8=B5=B0=E6=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/monitor_common.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/monitor_common.py b/app/monitor_common.py index ae33c1b..5c24b62 100644 --- a/app/monitor_common.py +++ b/app/monitor_common.py @@ -1674,7 +1674,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'] - high_park, stop_times_problem, inroad_problem, turn_problem, tide, phase, phase_color, phase_final_state = [], [], [], [], [], [], 9, 9 + 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(): item_high_parks = high_park_problems['problems'][crossid] @@ -1714,11 +1714,20 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_ if crossid in phase_tp['problems'].keys(): phase_infos = phase_tp['problems'][crossid] phase_list = [] + phase_desc_list = [] for item in phase_infos: if item['level_color_int'] < phase_color: phase_color = item['level_color_int'] if item['final_state_int'] < phase_final_state: phase_final_state = item['final_state_int'] + phase_desc_list.append({ + 'level_color': item['level_color'], + 'level_color_int': item['level_color_int'], + 'final_state': item['final_state'], + 'final_state_int': item['final_state_int'], + 'first_date': item['first_date'], + 'time_range': item['time_range'] + }) if item['final_state_int'] in (4, 5): continue item_desc = '【' + item['first_date'] + ' ' + item['time_range'] + '】' + item['level_color'] + '异常' @@ -1732,6 +1741,7 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_ 'time_range': item['time_range'] }) phase = phase_list + phase_desc = phase_desc_list for item_problem in monitor_phase: if item_problem['key'] == 'sample_sch': sample_sch_problems = item_problem['problems'] @@ -1833,7 +1843,8 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_ 'unreasonable_red': unreasonable_red, 'big_cycle': big_cycle, 'small_cycle': small_cycle, - 'insufficient_ped_time': insufficient_ped_time + 'insufficient_ped_time': insufficient_ped_time, + 'phase_desc': phase_desc }) return cross_problem_detail