From 794d154fb8dd8aaf2f4a670a59f85302287d5b2b Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 03 九月 2024 17:12:02 +0800
Subject: [PATCH] 历史板块判断调整/有效执行位判断

---
 third_data/code_plate_key_manager.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py
index e4f33a0..7449bfd 100644
--- a/third_data/code_plate_key_manager.py
+++ b/third_data/code_plate_key_manager.py
@@ -490,6 +490,9 @@
             return self.__history_blocks_dict_cache.get(code)
         try:
             kpl_results = KPLLimitUpDataUtil.get_latest_block_infos(code=code)
+            # 鍙栨渶杩�2鏉℃暟鎹�
+            if kpl_results and len(kpl_results) > 2:
+                kpl_results = kpl_results[-2:]
             keys = set()
             if kpl_results:
                 keys |= set([x[2] for x in kpl_results])
@@ -1217,13 +1220,13 @@
             if history_index == 0 and current_index == 0:
                 return True, f"寮�1鏁伴噺锛歿count}"
             else:
-                return False, f"寮�1鏁伴噺锛歿count}锛岄潪寮�1棣栨澘韬綅涓嶅尮閰嶏細鍘嗗彶-{history_index+1} 瀹炴椂-{current_index+1}"
+                return False, f"寮�1鏁伴噺锛歿count}锛岄潪寮�1棣栨澘韬綅涓嶅尮閰嶏細鍘嗗彶-{history_index + 1} 瀹炴椂-{current_index + 1}"
         else:
             # 涔拌��3
             if history_index == 1 and current_index == 1:
                 return True, f"寮�1鏁伴噺锛歿count}"
             else:
-                return False, f"寮�1鏁伴噺锛歿count}锛岄潪寮�1棣栨澘韬綅涓嶅尮閰嶏細鍘嗗彶-{history_index+1} 瀹炴椂-{current_index+1}"
+                return False, f"寮�1鏁伴噺锛歿count}锛岄潪寮�1棣栨澘韬綅涓嶅尮閰嶏細鍘嗗彶-{history_index + 1} 瀹炴椂-{current_index + 1}"
 
     @classmethod
     def __is_radical_buy_with_block_up(cls, code, block, yesterday_limit_up_codes):

--
Gitblit v1.8.0