调价后的新价格写入报价单;多段段前的货物带到各段,协同群不再把体积里的星号吃掉。海运字段齐了先核对再查价。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-03 22:39:54 +08:00
co-authored by Cursor
parent 0a14b4cc15
commit 7c77e45e03
32 changed files with 1384 additions and 75 deletions
@@ -213,6 +213,15 @@ class AttachmentInquiryTests(unittest.TestCase):
self.assertIn(copy.ATTACH_RECOGNIZING, self._bodies())
sess = get_sea_text_flow().session_of("s1")
self.assertIsNotNone(sess)
self.assertEqual(sess.phase, "wait_confirm")
self.assertFalse((sess.work_order_no or "").strip())
self.assertTrue(sess.pending_files)
self.assertIn(copy.SEA_CONFIRM_TAIL, self._bodies()[-1])
handle_text_inquiry(
InboundMessage(sender_id="s1", message_id="sea-ok", content="确定"),
store=self.store,
)
sess = get_sea_text_flow().session_of("s1")
self.assertTrue((sess.work_order_no or "").strip())
ticket = get_sea_text_flow().ledger.get_ticket(work_order_no=sess.work_order_no)
self.assertTrue(ticket.attachments)
@@ -267,6 +276,13 @@ class AttachmentInquiryTests(unittest.TestCase):
self.assertEqual(len(acks), 1)
self.assertEqual(acks[0], copy.IMAGE_RECOGNIZING)
sess = get_sea_text_flow().session_of("s1")
self.assertTrue(sess and sess.phase == "wait_confirm")
self.assertIn(copy.SEA_CONFIRM_TAIL, self._bodies()[-1])
handle_text_inquiry(
InboundMessage(sender_id="s1", message_id="sea-ok", content="确定"),
store=self.store,
)
sess = get_sea_text_flow().session_of("s1")
self.assertTrue(sess and sess.work_order_no)
def test_mid_clarify_then_attach_is_new_ticket(self) -> None:
@@ -276,6 +292,10 @@ class AttachmentInquiryTests(unittest.TestCase):
injected_facts=COMPLETE_SEA,
injected_mode="SEA",
)
handle_text_inquiry(
InboundMessage(sender_id="s1", message_id="old-ok", content="确定"),
store=self.store,
)
wo_old = get_sea_text_flow().session_of("s1").work_order_no
handle_attachment_inquiry(
InboundMessage(sender_id="s1", message_id="m2", content="我有个excel要询价"),
@@ -292,6 +312,10 @@ class AttachmentInquiryTests(unittest.TestCase):
"empty": False,
},
)
handle_text_inquiry(
InboundMessage(sender_id="s1", message_id="new-ok", content="确定"),
store=self.store,
)
wo_new = get_sea_text_flow().session_of("s1").work_order_no
self.assertNotEqual(wo_old, wo_new)
self.assertIsNotNone(get_sea_text_flow().ledger.get_ticket(work_order_no=wo_old))