海运补问保留贸易条款;陆运多车型价表按列回填,车型码不进起始地

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-29 10:53:30 +08:00
co-authored by Cursor
parent 56ba8e93b5
commit eca0a7ad93
10 changed files with 809 additions and 18 deletions
+15
View File
@@ -335,6 +335,21 @@ class OralExtractTests(unittest.TestCase):
self.assertIn("重量(KG):1.5KG", shown)
self.assertNotIn("1.5KGS", shown)
def test_broken_decimal_space_keeps_full_weight_volume(self) -> None:
"""小数点后空格不得只抽到小数段:578. 5KG/1. 03CBM → 578.5KG/1.03CBM。"""
from agent.schema.field_validate import harvest_oral_measures
text = "1个木箱/578. 5KG/1. 03CBM空运普货1箱托盘到MAA"
facts = harvest_oral_measures(text, {})
self.assertEqual(facts.get("毛重"), "578.5KG")
self.assertEqual(facts.get("体积"), "1.03CBM")
self.assertNotEqual(facts.get("毛重"), "5KG")
self.assertNotEqual(facts.get("体积"), "03CBM")
fullwidth = harvest_oral_measures("茶叶,578. 5KG,1。03CBM,托盘", {})
self.assertEqual(fullwidth.get("毛重"), "578.5KG")
self.assertEqual(fullwidth.get("体积"), "1.03CBM")
def test_dimension_text_is_volume_without_multiplying(self) -> None:
from agent.schema.field_validate import harvest_oral_measures