陆运多条线路按段展示 TMS 费用名和时效,选定后再写回该条成本。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -144,9 +144,24 @@ class HttpLedger:
|
||||
quote: dict[str, Any],
|
||||
to_status: str = "",
|
||||
) -> dict[str, Any]:
|
||||
# 有价时主账 query 已写快照并迁「已报价」;此处只做幂等确认,避免二次假写入。
|
||||
_ = (work_order_no, quote, to_status)
|
||||
return {"ok": True, "quote_version": 1, "status": to_status or "已报价"}
|
||||
"""
|
||||
覆盖本单最新 TMS 快照。选定陆运线路后必须走这里,才能把该条成本写回工单。
|
||||
空报价不打主账,避免把查价结果抹掉。
|
||||
"""
|
||||
no = (work_order_no or "").strip()
|
||||
src = dict(quote or {})
|
||||
if not no or not src:
|
||||
return {"ok": True, "quote_version": 1, "status": to_status or "已报价"}
|
||||
out = self._post(
|
||||
"/inquiry/agent/ticket/replaceTmsQuote",
|
||||
{"workOrderNo": no, "quote": src, "toStatus": to_status},
|
||||
idem=f"tms-quote:{no}:{src.get('total') or ''}:{src.get('route_line') or ''}",
|
||||
)
|
||||
if out.get("ok") is False:
|
||||
return out
|
||||
out.setdefault("ok", True)
|
||||
out.setdefault("status", to_status or "已报价")
|
||||
return out
|
||||
|
||||
def render_quote(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user