From b51b2ae184fad5aaf37a78903987e064f192d430 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 26 五月 2025 11:35:20 +0800
Subject: [PATCH] 大单解析修改

---
 third_data/kpl_block_util.py |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/third_data/kpl_block_util.py b/third_data/kpl_block_util.py
index 5c29965..282ca33 100644
--- a/third_data/kpl_block_util.py
+++ b/third_data/kpl_block_util.py
@@ -66,7 +66,7 @@
     for k in block_limit_up_dict:
         has_shsz = False
         for b in block_limit_up_dict[k]:
-            if b[0].find('00') == 0 or b[0].find('60') == 0:
+            if tool.is_can_buy_code(b[0]):
                 has_shsz = True
                 break
         if not has_shsz:
@@ -146,7 +146,7 @@
         if k[3] == code:
             # 鑾峰彇褰撳墠浠g爜娑ㄥ仠鏃堕棿
             limit_up_time = int(k[5])
-        if shsz and not tool.is_shsz_code(k[3]):
+        if shsz and not tool.is_can_buy_code(k[3]):
             continue
         # 鍓旈櫎楂樹綅鏉�
         if k[3] in yesterday_current_limit_up_codes:
@@ -168,20 +168,20 @@
 
 # 鑾峰彇褰撴棩瀹炴椂韬綅
 # before_blocks_dict鏍煎紡浣峽"浠g爜":set("鏉垮潡")}
-def get_code_current_rank(code, block, current_limit_up_datas, code_limit_up_reason_dict,
-                          yesterday_current_limit_up_codes, exclude_codes, open_limit_up_count, shsz=False):
+def get_code_current_rank(code, block, current_limit_up_datas, code_limit_up_reasons_dict,
+                          yesterday_current_limit_up_codes, exclude_codes, open_limit_up_count, shsz=False,
+                          limit_up_time=time.time()):
     block_codes_infos = []
-    limit_up_time = time.time()
     for k in current_limit_up_datas:
         if k[0] == code:
             # 鑾峰彇褰撳墠浠g爜娑ㄥ仠鏃堕棿
             limit_up_time = int(k[2])
-        if shsz and not tool.is_shsz_code(k[0]):
+        if shsz and not tool.is_can_buy_code(k[0]):
             continue
         # 鍓旈櫎楂樹綅鏉�
         if k[0] in yesterday_current_limit_up_codes:
             continue
-        if code_limit_up_reason_dict.get(k[0]) == block:
+        if code_limit_up_reasons_dict.get(k[0]) and block in code_limit_up_reasons_dict.get(k[0]):
             if k[0] != code:
                 # 浠g爜.娑ㄥ仠鏃堕棿
                 block_codes_infos.append((k[0], int(k[2])))
@@ -201,5 +201,10 @@
     return 0, []
 
 
+# 寮�1鏃堕棿鑼冨洿
+open_limit_up_time_range = time.mktime(
+    time.strptime(tool.get_now_date_str() + " 09:25:00", '%Y-%m-%d %H:%M:%S')), time.mktime(
+    time.strptime(tool.get_now_date_str() + " 09:30:00", '%Y-%m-%d %H:%M:%S'))
+
 if __name__ == "__main__":
-    pass
+    print(open_limit_up_time_range)

--
Gitblit v1.8.0