合并 feat/continue-deal-card-20261009:报价发出后继续工单重发成交卡;空运锁舱补参与看板滚动一并收下。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -95,6 +95,35 @@ def ticket_is_paused(ticket: Any) -> bool:
|
||||
return bool(ticket_exception_type(ticket))
|
||||
|
||||
|
||||
def ticket_pause_step(ticket: Any) -> str:
|
||||
"""暂停是哪一步留下的。查价、锁舱、释放各算各的。"""
|
||||
if ticket is None:
|
||||
return ""
|
||||
if isinstance(ticket, dict):
|
||||
step = str(
|
||||
ticket.get("system_exception_step") or ticket.get("systemExceptionStep") or ""
|
||||
).strip()
|
||||
payload = ticket.get("system_exception_payload") or ticket.get("systemExceptionPayload") or {}
|
||||
else:
|
||||
step = str(getattr(ticket, "system_exception_step", "") or "").strip()
|
||||
payload = getattr(ticket, "system_exception_payload", {}) or {}
|
||||
if step:
|
||||
return step
|
||||
if isinstance(payload, dict):
|
||||
return str(payload.get("step") or "").strip()
|
||||
return ""
|
||||
|
||||
|
||||
def cabin_failure_pause(ticket: Any) -> bool:
|
||||
"""
|
||||
锁舱或释放失败留下的暂停。
|
||||
|
||||
群里已经回过失败原因,并通知了 IT。之后的手工报价、补字段、成交不能再被
|
||||
「TMS接口异常」挡住。查价失败的暂停不在这里,那种仍要停。
|
||||
"""
|
||||
return ticket_pause_step(ticket) in {STEP_TMS_LOCK, STEP_TMS_RELEASE, STEP_TMS_CABIN}
|
||||
|
||||
|
||||
def extract_work_order_nos(text: str) -> list[str]:
|
||||
"""从原话抽出正式工单号(WO + 日期流水)。不认虚拟号。"""
|
||||
import re
|
||||
|
||||
Reference in New Issue
Block a user