落地陆运群内协同:按填写样例拉群并只列本单协同项,进群把私聊已抽到的字段带上。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,13 +53,12 @@ class LandCopyTest(unittest.TestCase):
|
||||
)
|
||||
self.assertIn("通关口岸(非必填):", text)
|
||||
|
||||
def test_hk_shows_load(self):
|
||||
def test_hk_lcl_shows_vehicle_not_load_field(self):
|
||||
text = copy.land_confirm_card(
|
||||
{
|
||||
"运输类型": "中港",
|
||||
"运输类型": "中港零担/集拼",
|
||||
"线路类别": "东南亚",
|
||||
"运输分类": "急件",
|
||||
"中港装载方式": "零担/集拼",
|
||||
"起运港": "广州",
|
||||
"目的港": "香港",
|
||||
"品名": "衣服",
|
||||
@@ -67,25 +66,26 @@ class LandCopyTest(unittest.TestCase):
|
||||
"报价日期": "2026-09-17",
|
||||
}
|
||||
)
|
||||
self.assertIn("零担/集拼", text)
|
||||
self.assertIn("运输类型(必填):中港零担/集拼", text)
|
||||
self.assertIn("车型/数量(必填):9米6/1", text)
|
||||
self.assertNotIn("\n数量(必填)", text)
|
||||
self.assertNotIn("中港装载方式", text)
|
||||
self.assertIn("通关口岸(非必填)", text)
|
||||
|
||||
def test_hk_full_truck_hides_vehicle(self):
|
||||
text = copy.land_confirm_card(
|
||||
{
|
||||
"运输类型": "中港",
|
||||
"运输类型": "中港整车",
|
||||
"线路类别": "东南亚",
|
||||
"运输分类": "急件",
|
||||
"中港装载方式": "整车",
|
||||
"起运港": "广州",
|
||||
"目的港": "香港",
|
||||
"品名": "衣服",
|
||||
"报价日期": "2026-09-17",
|
||||
}
|
||||
)
|
||||
self.assertIn("整车", text)
|
||||
self.assertIn("运输类型(必填):中港整车", text)
|
||||
self.assertNotIn("车型/数量", text)
|
||||
self.assertNotIn("中港装载方式", text)
|
||||
|
||||
def test_domestic_ftl_one_field(self):
|
||||
text = copy.land_confirm_card(
|
||||
@@ -134,7 +134,7 @@ class LandCopyTest(unittest.TestCase):
|
||||
facts = {
|
||||
"运输类型": "国内运输拼车",
|
||||
"线路类别": "国内城配/拖车/打包",
|
||||
"运输分类": "普件,常用线路/常规车型",
|
||||
"运输分类": "普件(东南亚、中港常用线路/常规车型)",
|
||||
"起运港": "泉州市",
|
||||
"目的港": "南京市",
|
||||
"品名": "通信机柜及线缆配件",
|
||||
@@ -201,6 +201,66 @@ class LandCopyTest(unittest.TestCase):
|
||||
self.assertIn("9米6/1", rows["货物"])
|
||||
self.assertNotIn("CBM", rows["货物"])
|
||||
|
||||
def test_land_brief_only_ltl_collab(self):
|
||||
text = copy.sea_group_brief(
|
||||
work_order_no="WO1",
|
||||
facts={
|
||||
"运输类型": "国内运输拼车",
|
||||
"线路类别": "国内长途/零担",
|
||||
"运输分类": "急件",
|
||||
"起运港": "广州",
|
||||
"目的港": "深圳",
|
||||
"品名": "衣服",
|
||||
"体积": "1",
|
||||
"毛重": "1",
|
||||
"报价日期": "2026-09-18",
|
||||
},
|
||||
quote=None,
|
||||
collab_facts={"包装方式": "纸箱"},
|
||||
sales_name="销",
|
||||
product_names=["产"],
|
||||
has_price=False,
|
||||
transport_mode="陆运",
|
||||
)
|
||||
self.assertIn("包装方式:纸箱", text)
|
||||
self.assertIn("客户名称:-", text)
|
||||
self.assertIn("货值:-", text)
|
||||
self.assertIn("是否为危险品:-", text)
|
||||
self.assertNotIn("贸易条款", text)
|
||||
self.assertNotIn("商品海关编码", text)
|
||||
self.assertNotIn("海关编码", text)
|
||||
|
||||
def test_land_brief_ftl_longhaul_order(self):
|
||||
text = copy.sea_group_brief(
|
||||
work_order_no="WO2",
|
||||
facts={
|
||||
"运输类型": "国内运输整车",
|
||||
"线路类别": "国内长途/零担",
|
||||
"运输分类": "急件",
|
||||
"起运港": "广州",
|
||||
"目的港": "深圳",
|
||||
"品名": "衣服",
|
||||
"车型/数量": "9米/1",
|
||||
"报价日期": "2026-09-18",
|
||||
},
|
||||
quote=None,
|
||||
collab_facts={},
|
||||
sales_name="销",
|
||||
product_names=["产"],
|
||||
has_price=False,
|
||||
transport_mode="陆运",
|
||||
)
|
||||
collab = text.split("协同补充字段")[1]
|
||||
self.assertLess(collab.find("客户名称"), collab.find("货值"))
|
||||
self.assertLess(collab.find("货值"), collab.find("包装方式"))
|
||||
self.assertNotIn("贸易条款", text)
|
||||
|
||||
def test_land_unrecognized_lists_keys(self):
|
||||
keys = ("客户名称", "包装方式", "货值", "是否为危险品")
|
||||
text = copy.group_fields_not_recognized(keys=keys, business_line="LAND")
|
||||
self.assertIn("客户名称", text)
|
||||
self.assertNotIn("货好时间", text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user