feat(asset): integrate inspection records with prepare and delivery order

- Add inspection_record_id column to asset_vehicle_prepare and asset_delivery_order tables
- Add inspectionRecordId field to VehiclePrepareDO, DeliveryOrderDO, and their RespVOs
- Auto-create inspection record from matched template when creating a prepare record
- Auto-complete inspection record when completing a prepare record
- Clone prepare inspection record to delivery order on delivery order creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-13 10:06:55 +08:00
parent 1dca703caa
commit 46485289a2
8 changed files with 604 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
-- 交车单表增加验车记录关联字段
ALTER TABLE asset_delivery_order
ADD COLUMN inspection_record_id bigint DEFAULT NULL COMMENT '关联验车记录';

View File

@@ -0,0 +1,3 @@
-- 备车表增加验车记录关联字段
ALTER TABLE asset_vehicle_prepare
ADD COLUMN inspection_record_id bigint DEFAULT NULL COMMENT '关联验车记录' AFTER defect_photos;