落地陆运群内协同:按填写样例拉群并只列本单协同项,进群把私聊已抽到的字段带上。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-18 13:38:02 +08:00
co-authored by Cursor
parent be95d823a2
commit 982b3a2317
25 changed files with 1451 additions and 315 deletions
@@ -226,6 +226,37 @@ class AirGroupCollabTests(unittest.TestCase):
self.assertEqual(phase, "activated")
self.assertEqual(self.ledger.find_by_collab_chat(chat_id="wr_air_1").work_order_no, wo2)
def test_activate_prefills_magnet(self) -> None:
created = self.ledger.create_ticket(
sender_id="sales1",
business_line="AIR",
facts={
"起运地": "上海",
"目的地": "洛杉矶",
"品名": "配件",
"件数": "3",
"毛重": "100",
"体积": "2",
"包装类型": "纸箱",
"报价日期": "2026-09-16",
"是否含磁": "是",
},
)
wo = created["work_order_no"]
self.ledger.upsert_quote(
work_order_no=wo,
quote={"total": "USD 800", "source": "TMS", "quoteId": "QT-AIR-1"},
to_status="已报价",
)
handle_air_group(
self._msg(sender="sales1", text=wo, chat="wr_air_1", mid="pre1"),
flow=self.flow,
ledger=self.ledger,
)
joined = "\n".join(self._texts())
self.assertIn("是否含磁:是", joined)
self.assertIn("是否含电:-", joined)
def test_second_group_occupied(self) -> None:
wo = self._create_air()
handle_air_group(