From b51b2ae184fad5aaf37a78903987e064f192d430 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 26 五月 2025 11:35:20 +0800 Subject: [PATCH] 大单解析修改 --- l2_data_parser.py | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/l2_data_parser.py b/l2_data_parser.py index 423ee49..0574cfb 100644 --- a/l2_data_parser.py +++ b/l2_data_parser.py @@ -9,6 +9,7 @@ import pandas as pd +from data_parser import transaction_big_order_parser from db import mysql_data_delegate as mysql_data from huaxin_client.l2_client_test import L2TransactionDataManager from log_module import log_export @@ -358,13 +359,13 @@ print(f"澶勭悊瀹屾瘯锛屾�诲叡{index}鎵�") -if __name__ == '__main__': +if __name__ == '__main__1': # df = pd.read_csv(f"E:/娴嬭瘯鏁版嵁/Transaction_Test.csv") pre_process_transactions() # 鍛戒护妯″紡 /home/userzjj/app/gp-server/l2_data_parser Transaction 2025-05-08 # 瑙f瀽澶у崟锛� /home/userzjj/app/gp-server/l2_data_parser ExtractDealBigOrder 2025-05-09 /home/userzjj/鏈�缁堟垚浜ゆ暟鎹�20250509.txt 000555 -if __name__ == '__main__1': +if __name__ == '__main__': if len(sys.argv) > 1: params = sys.argv[1:] print("鎺ユ敹鐨勫弬鏁�", params) @@ -383,9 +384,17 @@ elif _type == 'MarketData': parse_market_data(day) elif _type == 'Transaction_New': - pre_process_transactions(f"/home/userzjj/ftp/{day}/Transaction.csv") + transaction_big_order_parser.pre_process_transactions(f"/home/userzjj/ftp/{day}/Transaction.csv") + transaction_big_order_parser.concat_pre_transactions(f"/home/userzjj/ftp/{day}/Transaction") elif _type == 'NGTSTick_New': - pre_process_ngtstick(f"/home/userzjj/ftp/{day}/NGTSTick.csv") + transaction_big_order_parser.pre_process_ngtsticks(f"/home/userzjj/ftp/{day}/NGTSTick.csv") + transaction_big_order_parser.concat_pre_ngtsticks(f"/home/userzjj/ftp/{day}/NGTSTick") + elif _type == 'Transaction_Concat': + transaction_big_order_parser.concat_pre_transactions(f"/home/userzjj/ftp/{day}/Transaction") + elif _type == 'NGTSTick_Concat': + transaction_big_order_parser.concat_pre_ngtsticks(f"/home/userzjj/ftp/{day}/NGTSTick") + + elif _type == 'ExtractDealBigOrder': # 鎻愬彇鎵�鏈夋垚浜ょ殑澶у崟 if len(params) > 2: -- Gitblit v1.8.0