From 512202f8f88a3e0c23919921163aa7bd2f7da04d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 24 八月 2023 13:30:26 +0800 Subject: [PATCH] 记录华鑫本地的买入订单号 --- log_module/log_export.py | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/log_module/log_export.py b/log_module/log_export.py index ee1e734..1bc45d5 100644 --- a/log_module/log_export.py +++ b/log_module/log_export.py @@ -305,6 +305,24 @@ return fdatas +# 鍔犺浇鍗庨懌鏈湴涔板叆璁㈠崟鍙� +def load_huaxin_local_buy_no(): + path = f"{constant.get_path_prefix()}/logs/huaxin_local/l2/l2_buy_no.{tool.get_now_date_str()}.log" + fdatas = {} + if os.path.exists(path): + with open(path, 'r', encoding="utf-8") as f: + lines = f.readlines() + for line in lines: + if line: + data = line.split("-")[1].strip() + code = data.split("#")[0] + buy_no = int(data.split("#")[1]) + if code not in fdatas: + fdatas[code] = set() + fdatas[code].add(buy_no) + return fdatas + + if __name__ == '__main__': logger_l2_process_time.info("test123") # print(get_h_cancel_compute_info("603912")) -- Gitblit v1.8.0