--- schema: "hl-changelog/v2" ticket: "5895" title: "看板代际筛选放宽+槽位头车型大类字段——确认执行页逐日车费完整、槽位卡头显示车型大类名" consumer: "admin" change_type: "修改接口" author: "wx(GIT)" backend_status: "deployed" gateway_status: "verified" frontend_status: "pending" frontend_owner: "mmg" frontend_ref: "" target_release: "" verified_at: "" status_note: "后端已修复并部署测试服,API 实测通过。修复两块:(1) BUG1 确认执行页逐日车费 3 天只显示 1 天+总车费「价格不完整」——BoardOrderService.selectCurrentDailyPlanRows 代际筛选放宽为「当前代际 && (finalized=1 或 assigned/holding)」,buildVehicleFeeSummaries 已派切片有 protocolPrice 按日累加、无则读 vehicle_fee_total 兜底;(2) BUG5 排车页「车辆槽位 N」卡片头新增 vehicleCategoryKey/vehicleCategoryLabel 字段(未派=需求车型大类,已派=实际车辆车型大类)。实测订单 26-3698:dailyVehiclePlan 返回 3 天(08-17/18/19 各 calendarPrice=800.00/assignmentPrice=800.00/priceSource=CALENDAR)、vehicleFeeSummaries amount=2400.00;vehicleSlots[0] vehicleCategoryKey=suv/vehicleCategoryLabel=SUV。" updated_at: "2026-08-12" base: "dev-v3" --- # 看板代际筛选放宽+槽位头车型大类字段(#5895 / PR #5904) > **服务**: hl-fleet-service > **PR**: #5904(本条主修复)+ #5907(别名标签补丁,另条 changelog) > **日期**: 2026-08-12 > **背景**: 用户报障两个 BUG:(BUG1) 确认执行页逐日车费 3 天只显示 1 天、总车费「价格不完整」;(BUG5) 排车页「车辆槽位 N」卡片头只显示车牌,应显示车型大类名(多个和车牌一样分割显示)。 --- ## 变更接口 `GET /admin/fleet/board/orders/{orderId}`(看板订单详情) --- ## 改动一:BUG1 确认执行页逐日车费完整 **根因**:`selectCurrentDailyPlanRows` 代际筛选过严,只认「当前代际且 finalized=1」的派车方案行;换版/改派后旧行被排除 → `dailyVehiclePlan` 漏天、`vehicleFeeSummaries` 算不出总价。 **修复**: - 筛选放宽为「当前代际 && (`dispatch_plan_finalized=1` 或 派单 status=assigned/holding)」——已派/已锁定的实际执行行也纳入。 - `buildVehicleFeeSummaries` 计费:已派切片有 `protocolPrice` 按日累加;无 `protocolPrice` 时读 `vehicle_fee_total` 兜底(不再恒返「价格不完整」)。 **响应字段(值修复,无结构变化)**: | 字段 | 旧 | 新 | |---|---|---| | `dailyVehiclePlan` | 只返回 1 天 | 返回完整服务天数(26-3698 实测 3 天) | | `vehicleFeeSummaries[].amount` | 「价格不完整」 | 正确总价(26-3698 实测 2400.00 = 3×800) | | `dailyVehiclePlan[].calendarPrice/assignmentPrice/priceSource` | 漏天 | 逐日正确(800.00 / 800.00 / CALENDAR) | ## 改动二:BUG5 槽位头车型大类字段(新增) `vehicleSlots[]` 每项新增两个字段: | 字段 | 类型 | 说明 | |---|---|---| | `vehicleCategoryKey` | string | 车型大类规范 key(`suv`/`mpv`/`bus`/`sedan` 等)。未派=需求车型大类;已派=实际车辆车型大类(`fleet_vehicle_type.type_key` 别名经 normalize 归一)。 | | `vehicleCategoryLabel` | string | 车型大类中文标签(`SUV`/`商务车`/`大巴`/`轿车` 等),卡片头显示用。 | **示例**(26-3698 / 2086270138171994114,已派 suv 槽位): ```json { "assignmentSlotId": "344659955019812864", "requiredVehicleType": "suv", "requiredVehicleTypeLabel": "SUV", "vehicleCategoryKey": "suv", "vehicleCategoryLabel": "SUV", "requiredSeats": 7, "slotStatus": "assigned", "vehiclePlate": "蒙A-H7777", "vehicleModel": "丰田汉兰达", "driverName": "阿拉坦" } ``` **前端展示建议**:「车辆槽位 N」卡片头 = `vehicleCategoryLabel` + 车牌(已派)/ 需求车型(未派),多槽位按 `fleetItemIndex` 排序分割显示。 ## 验证证据(测试服 API 实测,订单 26-3698 / 2086270138171994114) - `dailyVehiclePlan`:3 天(2026-08-17/18/19),逐日 `calendarPrice=800.00 / assignmentPrice=800.00 / priceSource=CALENDAR`。 - `vehicleFeeSummaries`:`amount=2400.00`(3×800)。 - `vehicleSlots[0]`:`vehicleCategoryKey=suv / vehicleCategoryLabel=SUV`(#5907 补丁后;#5904 原始曾返回别名 `suv2`,见另条 changelog)。 ## 关联 / 联系人 ### 联系人 - **后端负责人**: @wx