Commit Graph

9 Commits

Author SHA1 Message Date
kkfluous
57ecce2649 chore(sql): add full-chain setup script for tables and menus
Creates 5 tables in oneos_asset:
- asset_inspection_template, asset_inspection_template_item
- asset_inspection_record, asset_inspection_record_item
- asset_vehicle_replacement

Inserts 12 menu entries in oneos_system (5161-5174):
- 验车模板 page + 6 permission buttons (template CRUD + record query/update)
- 替换车管理 page + 4 permission buttons (CRUD)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:46:08 +08:00
kkfluous
04f0599efa 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>
2026-03-13 10:20:25 +08:00
kkfluous
b93ea71174 feat(asset): add vehicle replacement module with BPM approval workflow
Implement complete replacement vehicle management (替换车) supporting
temporary and permanent vehicle replacements under rental contracts,
with BPM-based approval flow, event-driven architecture, and CRUD APIs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:11:50 +08:00
kkfluous
46485289a2 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>
2026-03-13 10:06:55 +08:00
kkfluous
30e15b90ea refactor: 优化资产模块字段和业务逻辑
- 添加 OCR 模块到主 pom.xml
- 优化客户管理模块
  - 调整客户字段(customerNo -> customerCode)
  - 新增合作状态、省份城市等字段
  - 新增客户商务经理关联表
  - 优化客户查询和保存逻辑
- 优化停车场管理
  - 调整停车场字段结构
  - 优化字段命名和注释
- 优化车型管理
  - 新增车型分类、能源类型等字段
  - 优化保养项目管理
  - 新增车型简化查询接口
- 新增数据库脚本
  - 车辆类型字典数据
  - 停车场和车型字段更新脚本
2026-03-12 20:35:36 +08:00
kkfluous
3c36ff6adf 车辆管理模块:新增车辆查询接口和数据表结构 2026-03-12 13:19:37 +08:00
k kfluous
a2e2d5c27e refactor(asset): 优化保养项目设计,使用折中方案
变更内容:
1. 删除 maintainItemId 字段(冗余,无实际作用)
2. 保留 maintainItem 字段(直接存储项目名称)
3. 新增接口:获取已使用的保养项目列表(去重)
4. 前端可使用该接口提供下拉提示,提升用户体验
5. 添加 maintainItem 字段的非空校验

设计思路:
- 不引入保养项目字典表(避免过度设计)
- 通过 DISTINCT 查询提供已使用项目列表
- 用户可以输入新项目,也可以从已有项目中选择
- 后续如需规范化,可平滑升级到字典表方案
2026-03-12 09:54:00 +08:00
k kfluous
a614df46f3 feat: 新增资产管理模块 - 停车场和车型参数管理
- 停车场管理:CRUD + 业务校验 + 权限控制
- 车型参数管理:主子表关联 + 维保项目管理
- 数据库表结构:asset_parking, asset_vehicle_model, asset_vehicle_model_maintain_item
- 优化点:参数校验、业务逻辑校验、类型安全
2026-03-12 03:04:11 +08:00
k kfluous
3b7ec28653 Initial commit: OneOS backend based on yudao-cloud 2026-03-11 22:18:20 +08:00