fix(regulatory): 修复无标签文档适用条件回显

This commit is contained in:
2026-06-07 12:29:22 +08:00
parent 1b4a10b5ba
commit 9e27c4c684
8 changed files with 305 additions and 8 deletions

View File

@@ -156,7 +156,7 @@ def _clean_fields(fields: dict[str, Any]) -> dict[str, str]:
value = fields.get(label)
if not isinstance(value, str):
continue
normalized = " ".join(value.strip().split())
normalized = " ".join(value.strip().split()).replace("(", "").replace(")", "")
if normalized:
clean[label] = normalized
return clean
@@ -200,4 +200,6 @@ def _better_product_name(candidate: str, current: str) -> bool:
def _invalid_field_value(value: str) -> bool:
if not value:
return True
if "<EFBFBD>" in value:
return True
return any(keyword in value for keyword in ["第1章", "第2章", "第3章", "监管信息", "综述资料", "章节目录"])