员工岗位可重新启用;调价认空运航线;会话存档跳号补拉;陆运报价按车型列回填
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -721,5 +721,56 @@ class AirQuoteSheetInquiryOnlyTests(unittest.TestCase):
|
||||
self.assertNotIn("友通达", blob)
|
||||
|
||||
|
||||
class QuoteIdNotOriginTests(unittest.TestCase):
|
||||
"""识图把报价编号错贴到起运地时必须丢掉,不能当港口查价。"""
|
||||
|
||||
def test_quote_no_labeled_as_origin_dropped(self) -> None:
|
||||
text = (
|
||||
"报价编号:QT202610220088\n"
|
||||
"起运地:QT202610220088\n"
|
||||
"目的地:吉隆坡\n"
|
||||
"品名:茶叶\n"
|
||||
"件数:21件\n"
|
||||
"毛重:11KG\n"
|
||||
"体积:1.1*2.1*2.2\n"
|
||||
"包装类型:托盘\n"
|
||||
"运输方式:空运"
|
||||
)
|
||||
facts = extract_inquiry_snapshot(text, allow_b=False)["facts"]
|
||||
self.assertNotIn("起运港", facts)
|
||||
self.assertEqual(facts.get("目的港"), "吉隆坡")
|
||||
|
||||
def test_work_order_as_origin_dropped(self) -> None:
|
||||
text = (
|
||||
"起运地:WO202610220001\n"
|
||||
"目的地:吉隆坡\n"
|
||||
"品名:茶叶\n"
|
||||
"件数:10件\n"
|
||||
"毛重:11KG\n"
|
||||
"体积:1CBM\n"
|
||||
"包装方式:托盘\n"
|
||||
"空运"
|
||||
)
|
||||
facts = extract_inquiry_snapshot(text, allow_b=False)["facts"]
|
||||
self.assertNotIn("起运港", facts)
|
||||
self.assertEqual(facts.get("目的港"), "吉隆坡")
|
||||
|
||||
def test_real_city_origin_kept(self) -> None:
|
||||
text = (
|
||||
"报价编号:QT202610220088\n"
|
||||
"起运地:南京\n"
|
||||
"目的地:吉隆坡\n"
|
||||
"品名:茶叶\n"
|
||||
"件数:10件\n"
|
||||
"毛重:11KG\n"
|
||||
"体积:1CBM\n"
|
||||
"包装方式:托盘\n"
|
||||
"空运"
|
||||
)
|
||||
facts = extract_inquiry_snapshot(text, allow_b=False)["facts"]
|
||||
self.assertEqual(facts.get("起运港"), "南京")
|
||||
self.assertEqual(facts.get("目的港"), "吉隆坡")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user