checkpoint: 提交当前工作区代码(同义词配置初版 + 既有流程改动)
- 新增 inq_synonym 表、62组同义词种子与智能体只读接口 - Python 同义词加载/归一化与 1板/2箱 机读 - 同步当前分支既有协作、报价识别、陆运等改动
This commit is contained in:
@@ -34,8 +34,10 @@ class LandCopyTest(unittest.TestCase):
|
||||
self.assertNotIn("通关口岸", text)
|
||||
self.assertNotIn("WO", text)
|
||||
self.assertIn('请回复“确定”进行TMS查价,内容有误时,请重新发内容。', text)
|
||||
self.assertIn("运输类型", text)
|
||||
self.assertIn("国内运输拼车", text)
|
||||
# 汇总只展示卡片字段:业务类型 / 报价场景,不再写内部运输类型。
|
||||
self.assertIn("业务类型(必填):国内拼车", text)
|
||||
self.assertIn("报价场景(必填):急件", text)
|
||||
self.assertNotIn("运输类型", text)
|
||||
|
||||
def test_cross_empty_customs(self):
|
||||
text = copy.land_confirm_card(
|
||||
@@ -68,7 +70,7 @@ class LandCopyTest(unittest.TestCase):
|
||||
"报价日期": "2026-09-17",
|
||||
}
|
||||
)
|
||||
self.assertIn("运输类型(必填):中港零担/集拼", text)
|
||||
self.assertIn("业务类型(必填):中港/亚/欧拼车", text)
|
||||
# 中港集拼按体积+毛重计费(与跨境集拼一致),不展示车型/数量。
|
||||
self.assertIn("体积(CBM)(必填):20CBM", text)
|
||||
self.assertIn("重量(KG)(必填):3000KG", text)
|
||||
@@ -89,7 +91,7 @@ class LandCopyTest(unittest.TestCase):
|
||||
"报价日期": "2026-09-17",
|
||||
}
|
||||
)
|
||||
self.assertIn("运输类型(必填):中港整车", text)
|
||||
self.assertIn("业务类型(必填):中港/亚/欧整车", text)
|
||||
self.assertIn("车型/数量(必填):9米6/1", text)
|
||||
self.assertNotIn("中港装载方式", text)
|
||||
|
||||
@@ -209,6 +211,32 @@ class LandCopyTest(unittest.TestCase):
|
||||
self.assertIn("货物品名(必填):茶叶", text.split(copy.CLARIFY_PASTE_HINT, 1)[0])
|
||||
self.assertIn("1.体积(CBM)(必填)", pending)
|
||||
|
||||
def test_land_labels_prefer_card_selection(self):
|
||||
"""卡片刚选的两项优先,旧事实里的类型/分类不能把它们盖掉。"""
|
||||
self.assertEqual(
|
||||
copy.land_biz_scenario_labels(
|
||||
{"陆运业务类型": "东南亚拼车", "报价场景": "急件"},
|
||||
biz_type_label="国内整车",
|
||||
quote_scenario="定制化(涉及标案、境外段清派、打包、超限、特殊要求)",
|
||||
),
|
||||
("国内整车", "定制化(涉及标案、境外段清派、打包、超限、特殊要求)"),
|
||||
)
|
||||
|
||||
def test_land_labels_derive_from_legacy_three_fields(self):
|
||||
"""历史单只有内部三项时,按卡片口径收回业务类型/报价场景。"""
|
||||
self.assertEqual(
|
||||
copy.land_biz_scenario_labels(
|
||||
{
|
||||
"运输类型": "中港零担/集拼",
|
||||
"线路类别": "中港/中亚/中欧",
|
||||
"运输分类": "急件",
|
||||
}
|
||||
),
|
||||
("中港/亚/欧拼车", "急件"),
|
||||
)
|
||||
# 国内整车/城配共用运输类型,单凭类型分不出业务类型,不能猜。
|
||||
self.assertEqual(copy.land_biz_scenario_labels({"运输类型": "国内运输整车"}), ("", ""))
|
||||
|
||||
def test_inquiry_card_lists_land_fields_and_wo(self):
|
||||
facts = {
|
||||
"运输类型": "国内运输拼车",
|
||||
@@ -238,7 +266,9 @@ class LandCopyTest(unittest.TestCase):
|
||||
)
|
||||
)
|
||||
self.assertIn("运输方式:陆运", fields)
|
||||
self.assertIn("运输类型:国内运输拼车", fields)
|
||||
self.assertIn("业务类型:国内拼车", fields)
|
||||
self.assertIn("报价场景:急件", fields)
|
||||
self.assertNotIn("运输类型", fields)
|
||||
self.assertIn("始发站:广州", fields)
|
||||
self.assertIn("货物品名:衣服", fields)
|
||||
self.assertNotIn("件数", fields)
|
||||
@@ -264,7 +294,9 @@ class LandCopyTest(unittest.TestCase):
|
||||
transport_mode="陆运",
|
||||
)
|
||||
self.assertIn("运输方式:陆运", text)
|
||||
self.assertIn("运输类型:国内运输拼车", text)
|
||||
self.assertIn("业务类型:国内拼车", text)
|
||||
self.assertIn("报价场景:-", text)
|
||||
self.assertNotIn("运输类型", text)
|
||||
self.assertIn("始发站:泉州市", text)
|
||||
self.assertIn("货物品名:通信机柜及线缆配件", text)
|
||||
self.assertIn("体积(CBM):10CBM", text)
|
||||
|
||||
Reference in New Issue
Block a user