From 984e59be6787f06b927d5ec612f443f54e145044 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 13 三月 2025 17:41:30 +0800
Subject: [PATCH] 真实下单位修改/L2成交处理速度提升

---
 l2/l2_limitup_sell_data_manager.py |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/l2/l2_limitup_sell_data_manager.py b/l2/l2_limitup_sell_data_manager.py
index 5ec80c6..033d5e7 100644
--- a/l2/l2_limitup_sell_data_manager.py
+++ b/l2/l2_limitup_sell_data_manager.py
@@ -71,32 +71,32 @@
         return cls.__delegating_sell_num_dict.get(code)
 
     @classmethod
-    def set_deal_datas(cls, code, datas):
+    def set_deal_datas(cls, code, fdatas):
         """
         璁剧疆鎴愪氦鐨勫崠鍗�
         @param code:
-        @param datas:  q.append((data['SecurityID'], data['TradePrice'], data['TradeVolume'],data['OrderTime'], data['MainSeq'], data['SubSeq'], data['BuyNo'],data['SellNo'], data['ExecType']))
+        @param fdatas:  鏁版嵁鏈韩鏍煎紡锛� (data['SecurityID'], data['TradePrice'], data['TradeVolume'],data['OrderTime'], data['MainSeq'], data['SubSeq'], data['BuyNo'],data['SellNo'], data['ExecType'])
+                        [(鏁版嵁鏈韩, 鏄惁涓诲姩涔�, 鏄惁娑ㄥ仠, 鎬绘垚浜ら, 涓嶅惈ms鏃堕棿锛屽惈ms鏃堕棿)]
         @return: 鏄惁瑙﹀彂璁$畻
         """
         try:
-            limit_up_price = gpcode_manager.get_limit_up_price_as_num(code)
             order_no_set = cls.__order_no_set_dict.get(code)
             if order_no_set is None:
                 order_no_set = set()
             limit_up_active_buy_datas = []
-            for d in datas:
+            for d in fdatas:
                 # 鏄惁鏈夋定鍋滀富鍔ㄤ拱鎴愪氦
-                if d[6] < d[7]:
+                if not d[1]:
                     continue
-                if abs(d[1] - limit_up_price) > 0.001:
+                if not d[2]:
                     continue
                 limit_up_active_buy_datas.append(d)
             total_deal_volume = 0
             if code in cls.__delegating_sell_num_dict:
-                for d in datas:
+                for d in fdatas:
                     # 鍑忓幓
-                    if d[7] in order_no_set:
-                        total_deal_volume += d[2]
+                    if d[0][7] in order_no_set:
+                        total_deal_volume += d[0][2]
                 cls.__delegating_sell_num_dict[code] -= total_deal_volume
 
             if len(limit_up_active_buy_datas):
@@ -104,7 +104,7 @@
                             f"娑ㄥ仠涓诲姩涔版垚浜わ細{limit_up_active_buy_datas}")
                 # 鎵撳嵃鏃ュ織
                 l2_log.info(code, hx_logger_l2_sell_deal,
-                            f"鏈夋定鍋滀富鍔ㄥ崠锛歿code}-{datas[-1][3]}-{cls.__delegating_sell_num_dict.get(code)}, 鎴愪氦閲�-{total_deal_volume}")
+                            f"鏈夋定鍋滀富鍔ㄥ崠锛歿code}-{fdatas[-1][0][3]}-{cls.__delegating_sell_num_dict.get(code)}, 鎴愪氦閲�-{total_deal_volume}")
         except:
             pass
 

--
Gitblit v1.8.0