From d095fcfddce52be85db18f17b815c890deeb48ff Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期日, 06 四月 2025 23:08:37 +0800
Subject: [PATCH] 丢失撤单处理/首封是否买设置

---
 l2/l2_compute_util.py |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/l2/l2_compute_util.py b/l2/l2_compute_util.py
index 65ab148..abb875c 100644
--- a/l2/l2_compute_util.py
+++ b/l2/l2_compute_util.py
@@ -69,3 +69,28 @@
                 if total_count >= max_count:
                     return i
         return end_index
+
+    @classmethod
+    def is_canceled(cls, code, index, total_datas, canceled_buyno_map, trade_index, deal_order_nos):
+        """
+        鏄惁宸茬粡鎾ゅ崟
+        @param deal_order_nos: 鎴愪氦澶у崟闆嗗悎
+        @param trade_index: 鎴愪氦杩涘害浣�
+        @param index: 绱㈠紩
+        @param code: 浠g爜
+        @param total_datas:
+        @param canceled_buyno_map:鎾ゅ崟鐨勮鍗曞彿
+        @return:
+        """
+        cancel_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, index,
+                                                                                              total_datas,
+                                                                                              canceled_buyno_map)
+        if cancel_data:
+            # 宸茬粡鎾ゅ崟
+            return cancel_data
+        else:
+            if trade_index and trade_index > index:
+                # 鎴愪氦杩涘害澶т簬绱㈠紩浣嶇疆锛屼笖杩樻病鎴愪氦
+                if total_datas[index]["val"]["orderNo"] not in deal_order_nos:
+                    return total_datas[index]
+            return None

--
Gitblit v1.8.0