feat: 询价流程接入事件异常等待起停

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 18:28:35 +08:00
co-authored by Cursor
parent fc1b85113d
commit a878b046d2
11 changed files with 131 additions and 5 deletions
@@ -1028,6 +1028,9 @@ def emit_group_deal(
)
if callable(carder):
carder(chat_id=chat_id, template_card=payload.get("template_card") or {})
from agent.policy.event_exception import WAIT_DEAL, start_wait
start_wait(getattr(flow, "ledger", None), work_order_no=no, wait_kind=WAIT_DEAL)
def apply_group_deal(
@@ -1485,6 +1488,10 @@ def _save_product_quote(
saved = writer(work_order_no=no, quote=persist, to_status="已报价") or {}
if not saved.get("ok") and saved.get("error"):
logger.warning("产品报价未入主账 wo=%s err=%s", no, saved.get("error"))
elif (kind or "").strip() != "adjust":
from agent.policy.event_exception import clear_wait
clear_wait(flow.ledger, work_order_no=no)
if sess is not None:
sess.quote = dict(quote)
sess.status = "已报价"