From 428413d9261a1e96d76626a491d31537e5453cc2 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 20 十一月 2024 16:04:10 +0800 Subject: [PATCH] bug修改 --- servers/data_server.py | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/servers/data_server.py b/servers/data_server.py index 5738c7d..45ddd5c 100644 --- a/servers/data_server.py +++ b/servers/data_server.py @@ -97,10 +97,19 @@ if b not in current_reason_dict: current_reason_dict[b] = [] current_reason_dict[b].append(_code) - # (鏉垮潡鍚嶇О锛屾定鍋滀唬鐮佹暟閲忥紝鐐告澘鏁伴噺,娑ㄥ仠鏃堕棿) - limit_up_reason_statistic_info = [(k, len(record_reason_dict[k]), len(record_reason_dict[k]) - len( + # (鏉垮潡鍚嶇О锛屾定鍋滀唬鐮佹暟閲忥紝鐐告澘鏁伴噺,娑ㄥ仠鏃堕棿, 鏄惁鏈夎鲸璇嗗害鐨勭エ) + + limit_up_reason_statistic_info = [[k, len(record_reason_dict[k]), len(record_reason_dict[k]) - len( current_reason_dict.get(k) if k in current_reason_dict else []), - 0) for k in record_reason_dict] + 0, 0] for k in record_reason_dict] + try: + for b in limit_up_reason_statistic_info: + codes_ = BlockSpecialCodesManager().get_block_codes(b) + if not codes_: + codes_ = set() + b[4] = len(set(record_reason_dict[b])&set(codes_)) + except: + pass limit_up_reason_statistic_info.sort(key=lambda x: x[1] - x[2]) limit_up_reason_statistic_info.reverse() @@ -788,7 +797,7 @@ elif url.path == "/get_blocks_in_money_info": # 鑾峰彇鏉垮潡璧勯噾娴佸叆鐘跺喌 ps_dict = dict([(k, v[0]) for k, v in parse_qs(url.query).items()]) - type_ = ps_dict.get("type") + type_ = int(ps_dict.get("type")) try: fdatas = [] if type_ == 0: -- Gitblit v1.8.0