修复路口管家巡检页面产品走查bug

This commit is contained in:
wangxu 2025-12-08 15:20:34 +08:00
parent 6d9d880c4c
commit 33b0227f82
1 changed files with 13 additions and 2 deletions

View File

@ -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