From fb47d36048e94b9a506d5c153e3dd19a01e37df1 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 30 十月 2023 16:30:27 +0800
Subject: [PATCH] bug修复

---
 output/code_info_output.py |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/output/code_info_output.py b/output/code_info_output.py
index f6e8cf5..8fbeff9 100644
--- a/output/code_info_output.py
+++ b/output/code_info_output.py
@@ -12,6 +12,7 @@
 import code_attribute
 from code_attribute import code_volumn_manager, limit_up_time_manager, global_data_loader, gpcode_manager
 import constant
+from l2.l2_data_manager import OrderBeginPosInfo
 from l2.l2_data_util import L2DataUtil
 from utils import global_util, tool
 from log_module import log, log_export
@@ -385,9 +386,15 @@
                     extra_datas.append(f"瀹夊叏绗旀暟锛歿data['safe_count']}")
 
                     records_new_data.append((time_, "", "-------------------------", []))
-                    records_new_data.append((time_, "涓嬪崟",
-                                             f"銆恵format_l2_data(total_datas[data['buy_single_index']])}銆�-銆恵format_l2_data(total_datas[data['buy_exec_index']])}銆�",
-                                             extra_datas))
+                    mode = data.get('mode')
+                    if mode == OrderBeginPosInfo.MODE_FAST:
+                        records_new_data.append((time_, "闂數涓嬪崟",
+                                                 f"銆恵format_l2_data(total_datas[data['buy_single_index']])}銆�-銆恵format_l2_data(total_datas[data['buy_exec_index']])}銆�",
+                                                 extra_datas))
+                    else:
+                        records_new_data.append((time_, "涓嬪崟",
+                                                 f"銆恵format_l2_data(total_datas[data['buy_single_index']])}銆�-銆恵format_l2_data(total_datas[data['buy_exec_index']])}銆�",
+                                                 extra_datas))
                 elif type == trade_record_log_util.TYPE_REAL_PLACE_ORDER_POSITION:
                     _datas = []
                     MIN_MONEYS = [30000, 20000, 10000]
@@ -449,4 +456,4 @@
 if __name__ == '__main__':
     code = '002786'
     l2_data_util.load_l2_data(code)
-    print( __load_trade_record(code, l2_data_util.local_today_datas.get(code)))
+    print(__load_trade_record(code, l2_data_util.local_today_datas.get(code)))

--
Gitblit v1.8.0