角色业务范围收紧工单与模板;报价日期不当费用;未选舱不迁已报价;另开一票可清违禁 hold
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -476,44 +476,6 @@ class HttpLedger:
|
||||
body["airline"] = airline.strip().upper()
|
||||
if (flight_no or "").strip():
|
||||
body["flightNo"] = flight_no.strip().upper()
|
||||
# #region agent log
|
||||
try:
|
||||
import json as _json
|
||||
import time as _time
|
||||
from pathlib import Path as _Path
|
||||
|
||||
_line = _json.dumps(
|
||||
{
|
||||
"sessionId": "3ba460",
|
||||
"runId": "pre-fix",
|
||||
"hypothesisId": "C",
|
||||
"location": "http_ledger.py:lock_cabin",
|
||||
"message": "ledger_lock_called",
|
||||
"data": {
|
||||
"wo": work_order_no,
|
||||
"optionNo": option_no,
|
||||
"airline": (airline or "").strip(),
|
||||
"flightNo": (flight_no or "").strip(),
|
||||
"instruction_head": (instruction_text or "")[:80],
|
||||
},
|
||||
"timestamp": int(_time.time() * 1000),
|
||||
},
|
||||
ensure_ascii=False,
|
||||
) + "\n"
|
||||
for _p in (
|
||||
_Path(r"d:\own\友通达询价智能体(新)\debug-3ba460.log"),
|
||||
_Path(r"C:/Users/ytd_extdev_0903/incoming/debug-3ba460.log"),
|
||||
_Path(r"E:/wwwroot/agent/current/debug-3ba460.log"),
|
||||
):
|
||||
try:
|
||||
_p.parent.mkdir(parents=True, exist_ok=True)
|
||||
with _p.open("a", encoding="utf-8") as _fh:
|
||||
_fh.write(_line)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
return self._post(
|
||||
"/inquiry/agent/tms/lockCabin",
|
||||
body,
|
||||
|
||||
@@ -304,12 +304,18 @@ class MemoryLedger:
|
||||
}
|
||||
|
||||
def update_facts(self, *, work_order_no: str, facts: dict[str, str]) -> dict[str, Any]:
|
||||
"""选定线路后写回起运港等询价事实。"""
|
||||
"""选定线路后写回起运港等询价事实。空值不删已有键,与主账合并语义一致。"""
|
||||
with self._lock:
|
||||
ticket = self._tickets.get(work_order_no)
|
||||
if ticket is None:
|
||||
return {"ok": False, "error": "ticket_not_found"}
|
||||
ticket.facts = dict(facts)
|
||||
merged = dict(ticket.facts or {})
|
||||
for key, raw in (facts or {}).items():
|
||||
name = str(key or "").strip()
|
||||
val = str(raw or "").strip()
|
||||
if name and val:
|
||||
merged[name] = val
|
||||
ticket.facts = merged
|
||||
return {"ok": True}
|
||||
|
||||
def void_quote_files(self, *, work_order_no: str) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user