chore(pl): add script to remount orphaned transport dibang stop links.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-09-05 18:43:10 +08:00
1 parent 4e3c2a9ffb
commit 45ed795501
2 files changed
+354

No files matched your search

@@ -0,0 +1,17 @@
-- 备忘:修复 PO20260904024 悬空地磅 link(stop/product 软删重建后未改挂)
-- 生产确认后执行;亦可使用 scripts/fix_pl_transport_db_link_stop_ids.py --plan-no PO20260904024 --apply
--
-- 背景:
-- link 4AAE759627054CAAB6B5F36D4888CBA4 仍指向软删送货段/产品,
-- 详情按当前段 id 过滤 →「暂无关联地磅单」。
-- 目标:
-- stop_id 1D4CB037… → 2036E1B2CEC54509ABC2B22DAA5786F3
-- plan_product_id DA6B3548… → 537B42A6B7E54D7CBD4C90DC73B185E7
UPDATE pl_transport_db_link
SET stop_id = '2036E1B2CEC54509ABC2B22DAA5786F3',
plan_product_id = '537B42A6B7E54D7CBD4C90DC73B185E7',
update_time = NOW()
WHERE id = '4AAE759627054CAAB6B5F36D4888CBA4'
AND plan_id = '551307353C99489786756A3F26C49020'
AND del_flag = 0;