From cbd003e5040e2a471f1e49410e5a116a25b71918 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 06 五月 2024 18:40:09 +0800 Subject: [PATCH] 添加身位输出 --- third_data/code_plate_key_manager.py | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py index 36a7fd8..8f8faad 100644 --- a/third_data/code_plate_key_manager.py +++ b/third_data/code_plate_key_manager.py @@ -699,10 +699,10 @@ if not block_codes: # 楂樹綅鏉挎硾鍖栨澘鍧椾腑鏃犳澘鍧� if not high_level_block_codes.get(block): - return False, True, f"{block}:鏉垮潡鏃犳定鍋�", False, False + return False, True, f"{block}:鏉垮潡鏃犳定鍋�", False, False, 0 elif len(block_codes) == 1 and code in block_codes: if not high_level_block_codes.get(block): - return False, True, f"{block}:鏉垮潡鍙湁褰撳墠浠g爜娑ㄥ仠", False, False + return False, True, f"{block}:鏉垮潡鍙湁褰撳墠浠g爜娑ㄥ仠", False, False, 0 # 鍙互涔扮殑鏈�澶ф帓鍚� # open_limit_up_codes = kpl_block_util.get_shsz_open_limit_up_codes(code, block, limit_up_record_datas, # code_limit_up_reason_dict) @@ -752,9 +752,9 @@ is_active_buy = cls.__is_need_active_buy(code, block, current_shsz_rank, len(current_open_limit_up_codes)) if current_shsz_rank < len(current_open_limit_up_codes) + max_rank: - return True, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{current_shsz_rank}", is_strong_block, is_active_buy + return True, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{current_shsz_rank}", is_strong_block, is_active_buy, current_shsz_rank else: - return False, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{front_current_shsz_rank_codes} 瓒呰繃{len(current_open_limit_up_codes) + max_rank}涓�", is_strong_block, is_active_buy + return False, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{front_current_shsz_rank_codes} 瓒呰繃{len(current_open_limit_up_codes) + max_rank}涓�", is_strong_block, is_active_buy, current_shsz_rank # 鑾峰彇鍙互涔扮殑鏉垮潡 # current_limit_up_datas: 浠婃棩瀹炴椂娑ㄥ仠 @@ -797,15 +797,15 @@ code_limit_up_reasons_dict = {} load_code_block() for block in keys: - can_buy, unique, msg, is_strong, is_active_buy = cls.__is_block_can_buy_new(code, block, - current_limit_up_datas, - code_limit_up_reasons_dict, - yesterday_current_limit_up_codes, - limit_up_record_datas, - current_limit_up_block_codes_dict, - high_level_code_blocks=high_level_general_code_blocks, - high_level_block_codes=high_level_general_block_codes) - fresults.append((block, can_buy, unique, msg, is_strong, is_active_buy)) + can_buy, unique, msg, is_strong, is_active_buy, current_rank = cls.__is_block_can_buy_new(code, block, + current_limit_up_datas, + code_limit_up_reasons_dict, + yesterday_current_limit_up_codes, + limit_up_record_datas, + current_limit_up_block_codes_dict, + high_level_code_blocks=high_level_general_code_blocks, + high_level_block_codes=high_level_general_block_codes) + fresults.append((block, can_buy, unique, msg, is_strong, is_active_buy, current_rank)) return fresults, keys # 鏄惁鍙互涓嬪崟 @@ -897,7 +897,10 @@ if r[0] in trade_delegate_blocks_count and len(trade_delegate_blocks_count[r[0]]) >= MAX_DELEGATE_COUNT: msg_list.append(f"銆恵r[0]}銆戝凡鎸傚崟锛歿trade_delegate_blocks_count[r[0]]}") continue - can_buy_blocks.append(r[0]) + if len(r)>6: + can_buy_blocks.append(f"{r[0]}-{r[6]}") + else: + can_buy_blocks.append(f"{r[0]}") if r[4]: can_buy_strong_blocks.append(r[0]) if r[3]: -- Gitblit v1.8.0