陆运选定线路后,私聊明细补报价有效期,群摘要只用已选线路并不再重复标题。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 10:04:07 +08:00
co-authored by Cursor
parent 049ee51c3c
commit 6e3e09a316
5 changed files with 188 additions and 6 deletions
+12 -2
View File
@@ -418,7 +418,12 @@ class LandTextInquiryFlow(SeaTextInquiryFlow):
self._save(sess)
return "ledger_fail"
sess.quote = quote
copy.remember_tms_quote(sess, raw_quote)
# 整包留给 H5 重选。已只有一条时,群摘要用的 TMS 价必须是投影后的那条。
sess.land_route_quote = dict(raw_quote)
if needs_route_pick(raw_quote):
copy.remember_tms_quote(sess, raw_quote)
else:
copy.remember_tms_quote(sess, quote)
sess.status = "已报价"
if needs_route_pick(raw_quote):
return self._offer_land_routes(sess=sess, work_order_no=no, quote=raw_quote, reply=reply)
@@ -485,7 +490,9 @@ class LandTextInquiryFlow(SeaTextInquiryFlow):
return "route_expired"
from agent.schema.land_route_options import group_land_routes, project_selected_route
raw_quote = dict(sess.tms_quote or sess.quote or {})
stored = dict(getattr(sess, "land_route_quote", None) or {})
# 选定后 tms_quote 已收成一条,重选必须回到整包,否则第二条线路会丢。
raw_quote = stored if group_land_routes(stored) else dict(sess.tms_quote or sess.quote or {})
routes = group_land_routes(raw_quote)
if index < 0 or index >= len(routes):
reply("没有这条线路,请重新打开页面选择。")
@@ -502,6 +509,9 @@ class LandTextInquiryFlow(SeaTextInquiryFlow):
clear_quote_file_ready(sess.work_order_no)
self._ledger.upsert_quote(work_order_no=sess.work_order_no, quote=quote, to_status="已报价")
if not stored:
sess.land_route_quote = dict(raw_quote)
copy.remember_tms_quote(sess, quote)
sess.quote = quote
sess.status = "已报价"
sess.wait_version += 1