From 3bec07f70237ca81990279a6b2f866a2adf70575 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 27 八月 2025 22:28:42 +0800 Subject: [PATCH] L后撤单修改/L后重新囊括修改 --- log_module/log_export.py | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/log_module/log_export.py b/log_module/log_export.py index d9e65f9..9ece516 100644 --- a/log_module/log_export.py +++ b/log_module/log_export.py @@ -836,15 +836,32 @@ """ fdatas = {} path = f"{constant.get_path_prefix()}/logs/gp/code_attribute/pre_close_price.{date}.log" - lines = __load_file_content(path) - for line in lines: - if line: - data = line.split(" - ")[1] - code, price = data.split("-")[0].strip(), data.split("-")[1].strip() - fdatas[code] = price + if os.path.exists(path): + lines = __load_file_content(path) + for line in lines: + if line: + data = line.split(" - ")[1] + code, price = data.split("-")[0].strip(), data.split("-")[1].strip() + fdatas[code] = price return fdatas +def load_special_codes(date=tool.get_now_date_str()): + """ + 鍔犺浇涔嬪墠鐨勬敹鐩樹环 + @param date: + @return: + """ + fdatas = {} + path = f"{constant.get_path_prefix()}/logs/gp/plates/special_codes.{date}.log" + lines = __load_file_content(path) + if lines: + line = lines[0] + line = line[line.find(" - ") + 3:] + return eval(line) + return None + + if __name__ == '__main__': line = """ 2025-03-12 14:49:15.028 | DEBUG | log_module.async_log_util:run_sync:66 - [14:49:14.899602] thread-id=3048 code=600841 L鍓嶇洃鎺ц寖鍥达細{1477, 1478, 1479, 1480, 1481, 1482, 1486, 1487, 1488, 1489, 1492, 1493, 1495, 1498, 1500} 璁$畻鑼冨洿锛�1477-1503 -- Gitblit v1.8.0