| | |
| | | return fdatas |
| | | |
| | | |
| | | # 读取系统日志 |
| | | def load_huaxin_transaction_map(): |
| | | path = f"{constant.get_path_prefix()}/logs/huaxin/l2/transaction.{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: |
| | | try: |
| | | data = line.split(" - ")[1].strip() |
| | | if data.startswith("["): |
| | | data = data[data.find("]") + 1:].strip() |
| | | code = data.split("#")[0] |
| | | l2_data = eval( data.split("#")[1]) |
| | | if code not in fdatas: |
| | | fdatas[code]=[] |
| | | fdatas[code].append(l2_data) |
| | | except: |
| | | pass |
| | | return fdatas |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | datas = get_trade_progress("000026") |
| | | print(datas) |
| | | fdatas = load_huaxin_transaction_map() |
| | | print(len(fdatas)) |
| | | # print(get_h_cancel_compute_info("603912")) |
| | | |
| | | # logger_l2_h_cancel.info("test") |