Files
shanxia2.0/docs/sql/migrations/2026-11-07-pl-vehicle-recharge-apply-no-prefix.sql
T
wuzilongandCursor cc5cf78bcd feat(pl): 增加百链充值类型,并保留计划产品与证件上传时间。
充值单号按类型使用 ETC、YK、SX、BL 前缀;更换装货客户清空产品时不抹掉已有计划产品;运输证件列表展示上传时间。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-07 17:55:21 +08:00

15 lines
645 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ETC/油卡充值申请单号按充值类型校正前缀。
-- etc 保持 ETC;fuel 开头的 ETC 改为 YK;shanxia 开头的 ETC 改为 SX。
-- 只替换前三个字符,日期和两位序号不变。已是目标前缀的记录不改。
-- 含软删除行,避免唯一索引下恢复后仍显示旧前缀。可重复执行。
UPDATE `pl_vehicle_recharge_apply`
SET `apply_no` = CONCAT('YK', SUBSTRING(`apply_no`, 4))
WHERE `recharge_type` = 'fuel'
AND `apply_no` LIKE 'ETC%';
UPDATE `pl_vehicle_recharge_apply`
SET `apply_no` = CONCAT('SX', SUBSTRING(`apply_no`, 4))
WHERE `recharge_type` = 'shanxia'
AND `apply_no` LIKE 'ETC%';