机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-19 09:41:59 +08:00
co-authored by Cursor
parent 277cdc1c28
commit 2b528758b4
119 changed files with 6760 additions and 3516 deletions
+8 -19
View File
@@ -72,9 +72,10 @@ def air_cargo_lines(
dest = (src.get("目的港") or src.get("目的地") or "-").strip() or "-"
cargo = (src.get("品名") or "-").strip() or "-"
pack = (src.get("包装方式") or src.get("包装类型") or "-").strip() or "-"
quote_date = (src.get("报价日期") or "").strip()
if quote_date in {"", "-", "—", "-"}:
quote_date = "-"
from agent.schema.field_validate import is_blank_quote_date
quote_date_raw = (src.get("报价日期") or "").strip()
quote_date = "-" if is_blank_quote_date(quote_date_raw) else quote_date_raw
lines = [
f"工单号:{(work_order_no or '').strip()}",
"运输方式:空运",
@@ -218,22 +219,10 @@ def _fee_rows(quote: dict[str, Any] | None, facts: dict[str, str] | None) -> lis
option = resolve_display_air_option(src, facts)
rows: list[dict[str, Any]] = []
if option:
rows.extend(_named_rows(option.get("feeItems") or option.get("fee_items")))
rows.extend(
_named_rows(
option.get("departureCharges")
or option.get("departure_charges")
or option.get("charges")
)
)
rows.extend(
_named_rows(
option.get("destinationCharges")
or option.get("destination_charges")
or option.get("arrivalCharges")
)
)
rows = _dedupe(rows)
from agent.schema.air_route_options import option_fee_dicts
# 与投影同一套:舱位缺 feeItems 时补整单顶层空运费,再拼起运/目的附加费。
rows = option_fee_dicts(option, src)
if not rows and len(parse_air_options(src)) > 1:
return []
if not rows: