From 9cc25e4944ea156485719b57e5082ae00132f0a6 Mon Sep 17 00:00:00 2001 From: wangxu <1318272526@qq.com> Date: Thu, 11 Dec 2025 15:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=AF=94=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/cross_compare_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cross_compare_common.py b/app/cross_compare_common.py index 8c0120a..8154df4 100644 --- a/app/cross_compare_common.py +++ b/app/cross_compare_common.py @@ -104,7 +104,7 @@ def parse_comp_inroad_delay_infos(inroad_delay_infos, comp_inroad_delay_infos): 'speed': '-' if item_data['speed'] == '-' or comp_data['speed'] == '-' else round(item_data['speed'] - comp_data['speed'], 2), 'move_speed': '-' if item_data['move_speed'] == '-' or comp_data['move_speed'] == '-' else round(item_data['move_speed'] - comp_data['move_speed'], 2), 'stop_times_color': '-' if item_data['stop_times'] == '-' or comp_data['stop_times'] == '-' else calc_index_color(item_data['stop_times'], comp_data['stop_times'], 'stop_times'), - 'high_park_percent_color': '-' if item_data['high_park_percent'] == '-' or comp_data['high_park_percent'] == '-' else calc_index_color(float(item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'), + 'high_park_percent_color': '-' if '-' in item_data['high_park_percent'] or '-' in comp_data['high_park_percent'] else calc_index_color(float(item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'), 'imbalance_index_color': '-' if item_data['imbalance_index'] == '-' or comp_data['imbalance_index'] == '-' else calc_index_color(item_data['imbalance_index'], comp_data['imbalance_index'], 'imbalance_index'), 'park_time_color': '-' if item_data['park_time'] == '-' or comp_data['park_time'] == '-' else calc_index_color(item_data['park_time'], comp_data['park_time'], 'park_time'), 'delay_time_color': '-' if item_data['delay_time'] == '-' or comp_data['delay_time'] == '-' else calc_index_color(item_data['delay_time'], comp_data['delay_time'], 'delay_time'), @@ -146,7 +146,7 @@ def parse_comp_inroad_delay_infos(inroad_delay_infos, comp_inroad_delay_infos): 'speed': '-' if flow_comp_data['speed'] == '-' or flow_item_data['speed'] == '-' else round(flow_comp_data['speed'] - flow_item_data['speed'], 2), 'move_speed': '-' if flow_comp_data['move_speed'] == '-' or flow_item_data['move_speed'] == '-' else round(flow_comp_data['move_speed'] - flow_item_data['move_speed'], 2), 'stop_times_color': '-' if flow_item_data['stop_times'] == '-' or flow_comp_data['stop_times'] == '-' else calc_index_color(flow_item_data['stop_times'], flow_comp_data['stop_times'], 'stop_times'), - 'high_park_percent_color': '-' if flow_item_data['high_park_percent'] == '-' or flow_comp_data['high_park_percent'] == '-' else calc_index_color(float(flow_item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'), + 'high_park_percent_color': '-' if '-' in item_data['high_park_percent'] or '-' in comp_data['high_park_percent'] else calc_index_color(float(flow_item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'), 'park_time_color': '-' if flow_item_data['park_time'] == '-' or flow_comp_data['park_time'] == '-' else calc_index_color(flow_item_data['park_time'], flow_comp_data['park_time'], 'park_time'), 'delay_time_color': '-' if flow_item_data['delay_time'] == '-' or flow_comp_data['delay_time'] == '-' else calc_index_color(flow_item_data['delay_time'], flow_comp_data['delay_time'], 'delay_time'), 'speed_color': '-' if flow_item_data['speed'] == '-' or flow_comp_data['speed'] == '-' else calc_index_color(flow_item_data['speed'], flow_comp_data['speed'], 'speed'),