diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 318985d5..31563935 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -459,11 +459,18 @@ def parse_response(text): if re.search(r'】\s*(无|不设|不参与|空仓)', zl): result["zone_cleared"] = True else: - nums = re.findall(r'\d+\.?\d*', zl) - if len(nums) >= 2: - a, b = float(nums[0]), float(nums[1]) - result["entry_low"] = min(a, b) - result["entry_high"] = max(a, b) + # 2026-08-18 修复:LLM 说"95~99(异常,应为14.87~15.01)"时,取"应为"后的正确区间 + # 否则取前两个数字(避免旧脏值被当推荐值写回,老莫 600262 教训) + _corrected = re.search(r'(?:应为|修正为|改为|更正为)\s*[((]?([\d.]+)\s*[~~-]\s*([\d.]+)', zl) + if _corrected: + result["entry_low"] = float(_corrected.group(1)) + result["entry_high"] = float(_corrected.group(2)) + else: + nums = re.findall(r'\d+\.?\d*', zl) + if len(nums) >= 2: + a, b = float(nums[0]), float(nums[1]) + result["entry_low"] = min(a, b) + result["entry_high"] = max(a, b) # 止损(只认【建议止损】节行) for name in ("建议止损", "止损"):