From b01a946cdbd1adc0f25d2d1899ea7802ff13b13d Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 29 十二月 2023 17:48:35 +0800
Subject: [PATCH] 选票需求修改

---
 code_attribute/first_target_code_data_processor.py |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py
index eb6336e..f6665dc 100644
--- a/code_attribute/first_target_code_data_processor.py
+++ b/code_attribute/first_target_code_data_processor.py
@@ -22,6 +22,8 @@
 def process_first_codes_datas(dataList, request_id=None):
     logger_l2_codes_subscript.info(f"{request_id}鍔犺浇l2浠g爜鐩稿叧鏁版嵁")
     print("棣栨澘浠g爜鏁伴噺锛�", len(dataList))
+    # 鑾峰彇鏈�杩�5澶╃殑浜ゆ槗鏃ユ湡锛屼负鍚庨潰鐨勬暟鎹绠楀仛鍑嗗
+    HistoryKDatasUtils.get_latest_trading_date_cache(5)
     limit_up_price_dict = {}
     temp_codes = []
     codes = []
@@ -101,7 +103,7 @@
     # 鑾峰彇60澶╂渶澶ц褰�
     for code in codes:
         need_get_volumn = False
-        if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None:
+        if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None or code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) is None:
             need_get_volumn = True
         # if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature_cache(
         #         code) is None:
@@ -115,6 +117,8 @@
                 volumes = init_data_util.parse_max_volume(volumes_data[:90],
                                                           code_nature_analyse.is_new_top(
                                                               limit_up_price,
+                                                              volumes_data[:90]) or code_nature_analyse.is_near_top(
+                                                              limit_up_price,
                                                               volumes_data[:90]))
                 logger_first_code_record.info("{} 鑾峰彇鍒伴鏉�60澶╂渶澶ч噺锛歿}", code, volumes)
                 code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2])
@@ -125,18 +129,19 @@
 
                 if code_nature_analyse.is_up_too_high_in_10d_with_limit_up(volumes_data):
                     # 鍒ゆ柇鏄惁澶珮
-                    l2_trade_util.forbidden_trade(code, "鑲′环闀垮緱澶珮锛�5澶╁唴鏈�3涓定鍋滐級")
+                    # l2_trade_util.forbidden_trade(code, "鑲′环闀垮緱澶珮锛�5澶╁唴鏈�3涓定鍋滐級")
                     HighIncreaseCodeManager().add_code(code)
 
                 if code_nature_analyse.is_up_too_high_in_120d(volumes_data):
                     # 鍒ゆ柇鏄惁澶珮
-                    l2_trade_util.forbidden_trade(code, "120澶╁唴鑲′环闀垮緱澶珮")
-                    HighIncreaseCodeManager().add_code(code)
+                    # l2_trade_util.forbidden_trade(code, "120澶╁唴鑲′环闀垮緱澶珮")
+                    # HighIncreaseCodeManager().add_code(code)
+                    pass
 
                 if code_nature_analyse.is_price_too_high_in_days(volumes_data, limit_up_price):
                     # 鍒ゆ柇鏄惁澶珮
                     l2_trade_util.forbidden_trade(code, "6澶╁唴鑲′环闀垮緱澶珮")
-                    HighIncreaseCodeManager().add_code(code)
+                    # HighIncreaseCodeManager().add_code(code)
 
                 if code_nature_analyse.is_have_latest_max_volume(volumes_data, 2):
                     # 鏈�杩�2澶╂槸鍚︽槸鏈�楂橀噺
@@ -157,6 +162,7 @@
                 #                                      volumes_data)
             except Exception as e:
                 logger_first_code_record.error(f"{code}:{str(e)}")
+                logger_first_code_record.exception(e)
     gpcode_manager.FirstCodeManager().add_record(codes)
     # 鍒濆鍖栨澘鍧椾俊鎭紝鏆傛椂鍒犻櫎
     # for code in codes:

--
Gitblit v1.8.0