落地系统异常:大模型/TMS/建群故障停住本单并告警,后台可重试失败步骤。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -433,3 +433,47 @@ class HttpLedger:
|
||||
body,
|
||||
idem=f"manual-quote:{work_order_no}:{sig}",
|
||||
)
|
||||
|
||||
def mark_system_exception(
|
||||
self,
|
||||
*,
|
||||
work_order_no: str,
|
||||
system_exception: str,
|
||||
system_exception_reason: str,
|
||||
step: str = "",
|
||||
payload: dict[str, Any] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""写入工单系统异常两列。已关闭由主账拒绝。"""
|
||||
out = self._post(
|
||||
"/inquiry/agent/ticket/markSystemException",
|
||||
{
|
||||
"workOrderNo": work_order_no,
|
||||
"systemException": system_exception,
|
||||
"systemExceptionReason": system_exception_reason,
|
||||
"step": step,
|
||||
"payload": dict(payload or {}),
|
||||
},
|
||||
)
|
||||
if out.get("ok") is False:
|
||||
return out
|
||||
out.setdefault("ok", True)
|
||||
return out
|
||||
|
||||
def clear_system_exception(self, *, work_order_no: str) -> dict[str, Any]:
|
||||
"""重试成功后清两列。"""
|
||||
out = self._post(
|
||||
"/inquiry/agent/ticket/clearSystemException",
|
||||
{"workOrderNo": work_order_no},
|
||||
)
|
||||
if out.get("ok") is False:
|
||||
return out
|
||||
out.setdefault("ok", True)
|
||||
return out
|
||||
|
||||
def list_exception_notify_users(self) -> list[dict[str, Any]]:
|
||||
"""角色勾了系统异常消息通知、且账号已绑企微。"""
|
||||
out = self._post("/inquiry/agent/account/listExceptionNotify", {})
|
||||
rows = out.get("staff") or out.get("result") or []
|
||||
if isinstance(rows, list):
|
||||
return [dict(x) for x in rows if isinstance(x, dict)]
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user