落地海运私聊文字询价全流程,海运多项费用改走文本明细,避免企微卡片引用条截断。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,10 +41,18 @@ def normalize_biz(raw: str) -> str:
|
||||
|
||||
|
||||
def _as_keywords(raw: Any) -> list[str]:
|
||||
"""摊开关键词。列表里若整段是 [海运,整柜] 也要拆开,与 Java asKeywords 一致。"""
|
||||
if raw is None:
|
||||
return []
|
||||
if isinstance(raw, (list, tuple)):
|
||||
return [str(x).strip() for x in raw if str(x).strip()]
|
||||
out: list[str] = []
|
||||
for x in raw:
|
||||
s = str(x).strip()
|
||||
if s.startswith("["):
|
||||
out.extend(_as_keywords(s))
|
||||
elif s:
|
||||
out.append(s)
|
||||
return out
|
||||
text = str(raw).strip()
|
||||
if not text or text.lower() == "null":
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user