From 29069ce267935e5407ee7125eb95a9523abee2ac Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 25 Aug 2026 11:59:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20reconcile=E4=BF=A1=E5=8F=B7=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E4=B8=A4=E4=BF=AE=E2=80=94=E2=80=94=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=BB=93=E8=AE=BA=E6=94=B9=E5=BC=80=E5=A4=B4=E5=8C=B9=E9=85=8D?= =?UTF-8?q?(601866=E5=85=B3=E6=B3=A8(=E6=9D=A1=E4=BB=B6=E6=80=A7=E4=B9=B0?= =?UTF-8?q?=E5=85=A5=E6=9C=BA=E4=BC=9A)=E8=A2=AB=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E8=AF=AF=E6=8A=93=E4=B9=B0=E5=85=A5),=5FNEG?= =?UTF-8?q?=5FADVICE=E8=A1=A5=E5=85=A8(=E4=B8=8D=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=BB=BA=E4=BB=93/=E7=BB=B4=E6=8C=81?= =?UTF-8?q?=E8=A7=82=E6=9C=9B=E7=AD=89),=E5=85=A8=E9=87=8Freconcile?= =?UTF-8?q?=E4=BF=AE=E6=AD=A34=E5=8F=AA=E8=AF=AF=E6=8A=93=E4=BF=A1?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/mofin_db.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/deploy/profile-scripts/mofin_db.py b/deploy/profile-scripts/mofin_db.py index f9452faf..c79071a8 100644 --- a/deploy/profile-scripts/mofin_db.py +++ b/deploy/profile-scripts/mofin_db.py @@ -1204,8 +1204,12 @@ def reconcile_signal_from_analysis(conn, code: str) -> str: verdict = "" for line in fa.split("\n"): if "【综合结论】" in line: - for s in ("买入", "可买入", "可加仓", "卖出", "止盈", "关注", "观望", "持有", "弱势持有"): - if s in line: + # 2026-08-25 开头匹配(601866教训:"关注(条件性买入机会)"被顺序扫描误抓"买入") + # 综合结论词的规范位置=【综合结论】之后紧跟的第一个词 + tail = line.split("【综合结论】", 1)[1].strip() + # 长词在前防前缀误抓(弱势持有>持有, 可买入/可加仓>买入) + for s in ("可买入", "可加仓", "弱势持有", "买入", "卖出", "止盈", "关注", "观望", "持有"): + if tail.startswith(s): verdict = s break break @@ -1217,7 +1221,10 @@ def reconcile_signal_from_analysis(conn, code: str) -> str: if new_sig in ("买入", "可买入", "可加仓"): _NEG_ADVICE = ("继续空仓", "暂不执行", "不宜买入", "不买入", "不建仓", "不新建仓", "等待企稳", "暂缓买入", "保持空仓", "维持空仓", "不建议买入", "空仓观望", - "不建议操作", "等待价格回落", "等待回调", "高于买入区上沿") + "不建议操作", "等待价格回落", "等待回调", "高于买入区上沿", + # 2026-08-25 补全(601866"关注(条件性买入机会)"漏网): + "不符合立即建仓", "不符合建仓条件", "维持观望", "暂不符合", "等待更明确", + "观望为宜", "不宜立即", "暂不建仓") for line in fa.split("\n"): if "【建议仓位】" in line and ("不新建仓" in line or "不建仓" in line): new_sig = "关注"