From 9c04f11f32c742663b68a531df6a69bff05fe9a4 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 18 三月 2024 10:05:14 +0800
Subject: [PATCH] bug修改

---
 code_attribute/first_target_code_data_processor.py |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py
index 704bb03..93e2531 100644
--- a/code_attribute/first_target_code_data_processor.py
+++ b/code_attribute/first_target_code_data_processor.py
@@ -136,7 +136,8 @@
                     if not is_special:
                         situation = MarketSituationManager().get_situation_cache()
                         zylt_threshold_as_yi = buy_condition_util.get_zyltgb_threshold(situation)
-                        if global_util.zyltgb_map.get(code) and global_util.zyltgb_map.get(code) > zylt_threshold_as_yi[1] * 100000000:
+                        if global_util.zyltgb_map.get(code) and global_util.zyltgb_map.get(code) > zylt_threshold_as_yi[
+                            1] * 100000000:
                             l2_trade_util.forbidden_trade(code,
                                                           f"鏃犺鲸璇嗗害锛岃嚜鐢辨祦閫氬競鍊�({global_util.zyltgb_map.get(code) // 100000000})>{zylt_threshold_as_yi[1]}浜�")
                             continue
@@ -205,6 +206,9 @@
                     l2_code_operate.L2CodeOperate.get_instance().add_operate(0, lc, "浠g爜琚Щ闄�")
     # 淇濆瓨鐜颁环
     if dataList:
+        situation = MarketSituationManager().get_situation_cache()
+        zyltgb_thresholds = buy_condition_util.get_zyltgb_threshold(situation)
+        want_codes = gpcode_manager.WantBuyCodesManager().list_code_cache()
         for data in dataList:
             code = data["code"]
             codes.append(code)
@@ -213,6 +217,24 @@
                 limit_up_price_dict[code] = limit_up_price
             else:
                 temp_codes.append(code)
+            # 鑷敱娴侀�氬競鍊间笉绗﹀悎鏍囧噯
+            if not want_codes or code not in want_codes:
+                # 娌″湪鎯充拱鍗�
+                zyltgb = global_util.zyltgb_map.get(code)
+                if zyltgb:
+                    zyltgb_as_yi = round(zyltgb / 100000000, 2)
+                    if zyltgb_as_yi < zyltgb_thresholds[0] or zyltgb_as_yi > zyltgb_thresholds[6]:
+                        # 鎯充拱鍗曚腑鐨勪笉鑳芥帓闄�
+                        continue
+                    elif zyltgb_as_yi > zyltgb_thresholds[1]:
+                        # 姣旀渶澶у彲涔板ぇ鐨勶紝濡傛灉娌℃湁鐭湡杈ㄨ瘑搴﹀氨涓嶄拱
+                        k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code)
+                        if k_format and k_format[8][0] and k_format[8][1].find("鐭湡") >= 0:
+                            pass
+                        else:
+                            # 鏃犵煭鏈熻鲸璇嗗害
+                            continue
+
             tick_datas.append({"code": code, "price": data["price"], "volume": data["volume"],
                                "volumeUnit": data["volumeUnit"]})
     # 鑾峰彇娑ㄥ仠浠�

--
Gitblit v1.8.0