feat(asset): enhance return order with inspection, BPM approval, and event-driven cross-module linkage
- Add sourceType/sourceId/deliveryOrderId to return order table and DO - Add inspectionRecordId to return order vehicle table and DO - Add createFromDelivery/createFromReplacement methods to auto-create return orders - Add startVehicleInspection/completeVehicleInspection for per-vehicle inspection flow - Add submitApproval/withdrawApproval/updateApprovalStatus for BPM workflow - Create ReturnApprovedEvent and ReturnOrderBpmListener - Create DeliveryCompletedEvent for future vehicle status tracking - Create VehicleStatusEventListener (TODO stubs for vehicle status updates) - Create ReturnOrderEventListener to auto-create return order on permanent replacement approval - Add BPM process definitions for replacement (with GM escalation) and return order approval Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
9
sql/2026-03-13-return-order-enhance.sql
Normal file
9
sql/2026-03-13-return-order-enhance.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- 还车单增强:添加来源类型、来源ID、关联交车单ID
|
||||
ALTER TABLE asset_return_order
|
||||
ADD COLUMN source_type tinyint DEFAULT NULL COMMENT '来源:1=手动 2=替换车触发',
|
||||
ADD COLUMN source_id bigint DEFAULT NULL COMMENT '来源业务ID',
|
||||
ADD COLUMN delivery_order_id bigint DEFAULT NULL COMMENT '关联交车单ID';
|
||||
|
||||
-- 还车车辆增强:添加验车记录关联
|
||||
ALTER TABLE asset_return_order_vehicle
|
||||
ADD COLUMN inspection_record_id bigint DEFAULT NULL COMMENT '关联验车记录';
|
||||
Reference in New Issue
Block a user