From b687a3923014ec99b7429ed2b2e872faa9a7916a Mon Sep 17 00:00:00 2001 From: baobao Date: Thu, 19 Nov 2026 16:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E5=A7=94=E6=89=98=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E5=85=B3=E8=81=94=E5=88=B0=E6=9C=9F=E5=9B=9E=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/reconcile_qmt_closed_sells.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/reconcile_qmt_closed_sells.py b/scripts/reconcile_qmt_closed_sells.py index 5843d9b..214dbf0 100644 --- a/scripts/reconcile_qmt_closed_sells.py +++ b/scripts/reconcile_qmt_closed_sells.py @@ -76,9 +76,11 @@ def plan(): quantity = int(first['before']['qty']) - int(last['after']['qty']) if late: for correction, amendment_seq, terminal_seq in zip(corrections, (1965761,1965781), (1965764,1965783), strict=True): - amendment = data(amendment_seq, 'order_update', code) - terminal = data(terminal_seq, 'order_update', code) - require(amendment['payload']['correction_id'] == correction['payload']['correction_id'], '对应更正配对序号变化') + amendment = trade_correction_repo.get_inbox(amendment_seq) + terminal = trade_correction_repo.get_inbox(terminal_seq) + require(amendment and terminal and amendment['msg_type'] == 'order_update' + and amendment['payload'].get('correction_id') == correction['payload']['correction_id'], + '对应更正配对序号变化') trade_correction._closed_recovery_terminal(amendment, terminal, order, qmt_repo.get_state()['last_seq']) closed_terminals[correction['seq']] = terminal late_trade = late['payload']