From 3da5d1ef00cf7665c2d37f837e6845c92d22e31c Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 15 十二月 2023 16:02:08 +0800
Subject: [PATCH] 前日炸板策略修改

---
 third_data/code_plate_key_manager.py |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py
index 7c79fbb..02d72e3 100644
--- a/third_data/code_plate_key_manager.py
+++ b/third_data/code_plate_key_manager.py
@@ -447,7 +447,7 @@
             jingxuan_block_info = self.__KPLCodeJXBlockManager.get_jx_blocks_cache(code, by=True)
         if jingxuan_block_info:
             jingxuan_blocks = jingxuan_block_info[0]
-            k4 |= set(jingxuan_blocks)  #set([x[1] for x in jingxuan_blocks])
+            k4 |= set(jingxuan_blocks)  # set([x[1] for x in jingxuan_blocks])
         for k in [k1, k11, k2, k3, k4]:
             keys |= k
 
@@ -525,6 +525,11 @@
                         is_strong_block = True
                         break
 
+        if not is_strong_block:
+            temp_block_codes = set(copy.deepcopy(block_codes))
+            temp_block_codes.discard(code)
+            if len(temp_block_codes) >= 3:
+                is_strong_block = True
         max_rank = 2
         #  寮哄娍鏉垮潡涔拌�佸洓
         if is_strong_block:
@@ -551,8 +556,10 @@
                                                                                                 code_limit_up_reason_dict,
                                                                                                 yesterday_current_limit_up_codes,
                                                                                                 exclude_first_codes,
-                                                                                                len(current_open_limit_up_codes),
-                                                                                                shsz=True, limit_up_time=first_limit_up_time)
+                                                                                                len(
+                                                                                                    current_open_limit_up_codes),
+                                                                                                shsz=True,
+                                                                                                limit_up_time=first_limit_up_time)
         # record_shsz_rank, record_shsz_rank_codes = kpl_block_util.get_code_record_rank(code, block,
         #                                                                                limit_up_record_datas,
         #                                                                                code_limit_up_reason_dict,
@@ -565,6 +572,11 @@
         if current_shsz_rank < len(current_open_limit_up_codes) + max_rank:
             return True, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{current_shsz_rank}", is_strong_block
         else:
+            # 鐪嬭嚜鐢辨祦閫氬競鍊兼槸鍚﹀皬浜�20浜�
+            if is_strong_block:
+                zyltgb = global_util.zyltgb_map.get(code)
+                if zyltgb and zyltgb < 20 * 100000000:
+                    return True, False, f"銆恵block}銆戞定鍋滄暟閲忥紙{len(block_codes)}锛�>=4 鑷敱娴侀�氬競鍊�({zyltgb})灏忎簬20浜�", is_strong_block
             return False, False, f"銆恵block}銆戝墠鎺掍唬鐮侊細{front_current_shsz_rank_codes} 瓒呰繃{len(current_open_limit_up_codes) + max_rank}涓�", is_strong_block
 
         # 杩囨椂鐨勪唬鐮�
@@ -622,7 +634,7 @@
         # 濮嬬粓鑾峰彇绮鹃�夋澘鍧�
         if True:
             # 鑾峰彇
-            if k4 and not keys:
+            if k4:
                 # 褰撴定鍋滃師鍥犳病鏈夋椂鎵嶅彇绮鹃�夋澘鍧�
                 keys |= k4
                 keys = keys - constant.KPL_INVALID_BLOCKS

--
Gitblit v1.8.0