落地多段联运私聊:齐了才建单拉群,附件只收格子值,核对改正不再整单重开。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,6 +33,26 @@ LAND_CLASSES = (
|
||||
"急件",
|
||||
)
|
||||
|
||||
# 报价单模板码,不能当始发站/目的地。
|
||||
_TEMPLATE_PORT_CODES = frozenset({"DOM", "FTL", "LTL", "INTL"})
|
||||
|
||||
|
||||
def scrub_land_placeholder_ports(facts: dict[str, str] | None) -> dict[str, str]:
|
||||
"""
|
||||
丢掉报价模板里的 DOM/FTL 这类站点码。
|
||||
|
||||
这些不是城市或港口,当已填会让多段误出确定卡。返回新 dict,不改入参。
|
||||
"""
|
||||
out: dict[str, str] = {}
|
||||
for key, raw in dict(facts or {}).items():
|
||||
val = str(raw).strip()
|
||||
if not val:
|
||||
continue
|
||||
if key in {"起运港", "目的港", "始发站", "目的地"} and val.upper() in _TEMPLATE_PORT_CODES:
|
||||
continue
|
||||
out[str(key)] = val
|
||||
return out
|
||||
|
||||
# 填写样例,同时作为拉群门禁:对不上的类型+线路可以查价,但不能拉群。
|
||||
SAMPLE_PAIRS = (
|
||||
("国内运输拼车", "国内长途/零担"),
|
||||
@@ -66,7 +86,9 @@ _ROUTE_ALIASES = (
|
||||
("国内长途/零担", "国内长途/零担"),
|
||||
("中港/中亚/中欧", "中港/中亚/中欧"),
|
||||
("国内城配", "国内城配/拖车/打包"),
|
||||
("国内长途/零担", "国内长途/零担"),
|
||||
("国内长途", "国内长途/零担"),
|
||||
("国内零担", "国内长途/零担"),
|
||||
("东南亚", "东南亚"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user