checkpoint: 提交当前工作区代码(同义词配置初版 + 既有流程改动)
- 新增 inq_synonym 表、62组同义词种子与智能体只读接口 - Python 同义词加载/归一化与 1板/2箱 机读 - 同步当前分支既有协作、报价识别、陆运等改动
This commit is contained in:
@@ -1116,12 +1116,15 @@ class SeaTmsCardTests(unittest.TestCase):
|
||||
payload = copy.sea_tms_hit_wecom_payload(
|
||||
work_order_no="WO202609150030", quote=long_quote
|
||||
)
|
||||
self.assertEqual(
|
||||
payload["template_card"]["quote_area"]["quote_text"], card_text
|
||||
)
|
||||
sub = payload["template_card"]["sub_title_text"]
|
||||
card = payload["template_card"]
|
||||
# 卡片名称保留;主标题只留「价格明细」(button_interaction 必填);
|
||||
# 费用合计引用条、报价有效期不再展示。
|
||||
self.assertEqual(card["source"]["desc"], "TMS标准报价")
|
||||
self.assertEqual(card["main_title"], {"title": "价格明细"})
|
||||
self.assertNotIn("quote_area", card)
|
||||
sub = card["sub_title_text"]
|
||||
self.assertIn("时效:1天", sub)
|
||||
self.assertIn("报价有效期:2026-09-30", sub)
|
||||
self.assertNotIn("报价有效期", sub)
|
||||
|
||||
def test_sea_hit_sends_detail_text_before_card(self) -> None:
|
||||
"""
|
||||
@@ -1282,13 +1285,12 @@ class SeaSkipAndPullTests(unittest.TestCase):
|
||||
cards = [
|
||||
x.get("template_card") or {}
|
||||
for x in self.extras
|
||||
if (x.get("template_card") or {}).get("main_title", {}).get("title", "").endswith("报价方案")
|
||||
if (x.get("template_card") or {}).get("main_title", {}).get("title") == "报价方案"
|
||||
]
|
||||
self.assertTrue(cards)
|
||||
rows = {r["keyname"]: r["value"] for r in cards[0].get("horizontal_content_list") or []}
|
||||
self.assertIn("海运", rows.get("航线", ""))
|
||||
self.assertIn("箱型", rows)
|
||||
self.assertNotIn("包装", rows)
|
||||
# 方案卡只留短标题和三个按钮,字段行与引用条不再重复。
|
||||
self.assertNotIn("horizontal_content_list", cards[0])
|
||||
self.assertNotIn("quote_area", cards[0])
|
||||
again = self.flow.on_button(
|
||||
sender_id="s1", action=copy.BTN_SKIP_COLLAB, reply=self._reply
|
||||
)
|
||||
@@ -2044,17 +2046,12 @@ class SeaContinueTests(unittest.TestCase):
|
||||
titles = [
|
||||
(c.get("main_title") or {}).get("title") or "" for c in cards if c
|
||||
]
|
||||
self.assertTrue(any(t == f"{wo}报价方案" for t in titles))
|
||||
rows = {}
|
||||
self.assertTrue(any(t == "报价方案" for t in titles))
|
||||
# 方案卡只留短标题和三个按钮,字段行与引用条不再重复。
|
||||
for card in cards:
|
||||
if (card.get("main_title") or {}).get("title") == f"{wo}报价方案":
|
||||
rows = {
|
||||
r["keyname"]: r["value"]
|
||||
for r in card.get("horizontal_content_list") or []
|
||||
}
|
||||
self.assertIn("海运", rows.get("航线", ""))
|
||||
self.assertIn("箱型", rows)
|
||||
self.assertNotIn("包装", rows)
|
||||
if (card.get("main_title") or {}).get("title") == "报价方案":
|
||||
self.assertNotIn("horizontal_content_list", card)
|
||||
self.assertNotIn("quote_area", card)
|
||||
|
||||
def test_continue_from_ledger_uses_sea_collab_card(self) -> None:
|
||||
"""进程无书签:主账海运已报价应回收海运协同卡,不是空运卡。"""
|
||||
@@ -2376,7 +2373,10 @@ class SeaGroupOpsTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(phase, "file_type_rejected")
|
||||
texts = [x.get("content") or "" for x in self.groups.sent if x.get("kind") == "text"]
|
||||
self.assertIn("群里只收 Excel 和 PDF,其它文件不会存入工单", texts)
|
||||
self.assertTrue(
|
||||
any("我无法识别您的内容" in t and "文字格式" in t for t in texts),
|
||||
texts,
|
||||
)
|
||||
ticket = self.ledger.get_ticket(work_order_no=wo)
|
||||
self.assertFalse(ticket.attachments)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user