From b3640741ef15ee7fda9f8799165783486a36bd73 Mon Sep 17 00:00:00 2001 From: wuzilong <704541015@qq.com> Date: Sat, 12 Sep 2026 08:50:19 +0800 Subject: [PATCH] docs: mark ETC-only vehicle recharge plan tasks complete Co-authored-by: Cursor --- ...2026-09-12-pl-vehicle-recharge-etc-only.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/superpowers/plans/2026-09-12-pl-vehicle-recharge-etc-only.md b/docs/superpowers/plans/2026-09-12-pl-vehicle-recharge-etc-only.md index 0cd1188b8..bfb91c77f 100644 --- a/docs/superpowers/plans/2026-09-12-pl-vehicle-recharge-etc-only.md +++ b/docs/superpowers/plans/2026-09-12-pl-vehicle-recharge-etc-only.md @@ -34,7 +34,7 @@ **Files:** - Create: `docs/sql/migrations/2026-09-12-pl-vehicle-recharge-etc-only.sql` -- [ ] **Step 1: 写 migration** +- [x] **Step 1: 写 migration** ```sql -- 车辆充值模块收窄为仅 ETC:菜单改名 + 加油字典软停用(不删业务数据) @@ -64,7 +64,7 @@ WHERE id = 'PL_RECHARGE_TYPE_FUEL' -- WHERE del_flag = 0 AND recharge_type = 'fuel' AND status = 'pending'; ``` -- [ ] **Step 2: Commit** +- [x] **Step 2: Commit** ```bash git add docs/sql/migrations/2026-09-12-pl-vehicle-recharge-etc-only.sql @@ -84,7 +84,7 @@ EOF - Modify: `backend/app/schemas/pl/vehicle_recharge.py` - Create: `backend/tests/test_vehicle_recharge_etc_only.py` -- [ ] **Step 1: 写失败单测(当前仍接受 fuel)** +- [x] **Step 1: 写失败单测(当前仍接受 fuel)** ```python """车辆充值模块收窄为仅 ETC。""" @@ -138,7 +138,7 @@ def test_record_create_rejects_fuel(): ) ``` -- [ ] **Step 2: 跑测确认失败** +- [x] **Step 2: 跑测确认失败** Run: @@ -148,7 +148,7 @@ cd backend && source venv/bin/activate && pytest tests/test_vehicle_recharge_etc Expected: `test_recharge_types_only_etc` FAIL(当前 `RECHARGE_TYPES == {"etc", "fuel"}`)。 -- [ ] **Step 3: 改 Schema** +- [x] **Step 3: 改 Schema** In `backend/app/schemas/pl/vehicle_recharge.py`: @@ -166,7 +166,7 @@ return v (`VehicleRechargeApplyCreate.validate_recharge_type` 与 `VehicleRechargeRecordCreate.validate_recharge_type` 两处。) -- [ ] **Step 4: 跑测确认通过** +- [x] **Step 4: 跑测确认通过** ```bash cd backend && source venv/bin/activate && pytest tests/test_vehicle_recharge_etc_only.py -v @@ -174,7 +174,7 @@ cd backend && source venv/bin/activate && pytest tests/test_vehicle_recharge_etc Expected: 全部 PASS。 -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add backend/app/schemas/pl/vehicle_recharge.py backend/tests/test_vehicle_recharge_etc_only.py @@ -193,14 +193,14 @@ EOF **Files:** - Modify: `backend/app/services/pl_vehicle_recharge_service.py` -- [ ] **Step 1: 在 service 顶部增加模块常量** +- [x] **Step 1: 在 service 顶部增加模块常量** ```python # 本期本模块仅服务 ETC;历史 fuel 行保留但不暴露 MODULE_RECHARGE_TYPE = "etc" ``` -- [ ] **Step 2: `_get_apply_row` / `_get_record_row` 增加类型条件** +- [x] **Step 2: `_get_apply_row` / `_get_record_row` 增加类型条件** In `_get_apply_row` filter add: @@ -216,7 +216,7 @@ PlVehicleRechargeRecord.recharge_type == MODULE_RECHARGE_TYPE, 保留原有 404 文案「申请单不存在」/「发放登记不存在」(与 spec:等同不存在)。 -- [ ] **Step 3: `list_applies` 基查询强制 etc** +- [x] **Step 3: `list_applies` 基查询强制 etc** 在初始 `.filter(tenant_no, del_flag == 0)` 中增加: @@ -226,7 +226,7 @@ PlVehicleRechargeApply.recharge_type == MODULE_RECHARGE_TYPE, (与列头 `recharge_type` / `recharge_type_in` AND 叠加:客户端传 fuel 时结果为空。) -- [ ] **Step 4: `list_pending_apply_options` 强制 etc** +- [x] **Step 4: `list_pending_apply_options` 强制 etc** 在其 `.filter(...)` 增加: @@ -234,7 +234,7 @@ PlVehicleRechargeApply.recharge_type == MODULE_RECHARGE_TYPE, PlVehicleRechargeApply.recharge_type == MODULE_RECHARGE_TYPE, ``` -- [ ] **Step 5: `list_records` 强制 etc** +- [x] **Step 5: `list_records` 强制 etc** 将可选: @@ -251,7 +251,7 @@ query = query.filter(PlVehicleRechargeRecord.recharge_type == MODULE_RECHARGE_TY (忽略请求里的 `recharge_type` 参数,避免绕过。) -- [ ] **Step 6: `list_disburse_board` 强制 etc** +- [x] **Step 6: `list_disburse_board` 强制 etc** 在申请基查询 `.filter(...)` 增加: @@ -259,7 +259,7 @@ query = query.filter(PlVehicleRechargeRecord.recharge_type == MODULE_RECHARGE_TY PlVehicleRechargeApply.recharge_type == MODULE_RECHARGE_TYPE, ``` -- [ ] **Step 7: 跑既有 + 新单测** +- [x] **Step 7: 跑既有 + 新单测** ```bash cd backend && source venv/bin/activate && pytest tests/test_vehicle_recharge_etc_only.py tests/test_pl_vehicle_ops_list_filters.py -v @@ -267,7 +267,7 @@ cd backend && source venv/bin/activate && pytest tests/test_vehicle_recharge_etc Expected: PASS。 -- [ ] **Step 8: Commit** +- [x] **Step 8: Commit** ```bash git add backend/app/services/pl_vehicle_recharge_service.py @@ -289,14 +289,14 @@ EOF - Modify: `web-admin/src/views/pl/vehicle-recharge-apply/index.vue` - Modify: `web-admin/src/views/pl/vehicle-recharge-record/index.vue` -- [ ] **Step 1: 路由标题** +- [x] **Step 1: 路由标题** In `web-admin/src/router/modules/pl.ts`,四处替换: - `'ETC加油申请'` → `'ETC充值申请'` - `'ETC加油发放登记'` → `'ETC充值发放登记'` -- [ ] **Step 2: 列头枚举** +- [x] **Step 2: 列头枚举** In `columnFilterDefs.ts`: @@ -304,7 +304,7 @@ In `columnFilterDefs.ts`: const RECHARGE_TYPE_OPTIONS = [{ value: 'etc', label: 'ETC' }] ``` -- [ ] **Step 3: 申请页** +- [x] **Step 3: 申请页** 1. File comment: `` 2. Form select — 删除加油 option,只保留: @@ -315,14 +315,14 @@ const RECHARGE_TYPE_OPTIONS = [{ value: 'etc', label: 'ETC' }] 3. 类型收窄:`rechargeType: 'etc' as 'etc'`(去掉 `| 'fuel'`) -- [ ] **Step 4: 发放页** +- [x] **Step 4: 发放页** 1. File comment: `` 2. 同样删除 `` 3. 收窄 `rechargeType` 类型同上 4. Optional:placeholder「ETC卡号/油卡号」→「ETC卡号」 -- [ ] **Step 5: 本地目视 / 类型检查** +- [x] **Step 5: 本地目视 / 类型检查** ```bash cd web-admin && pnpm exec vue-tsc --noEmit --pretty false 2>&1 | head -n 40 @@ -330,7 +330,7 @@ cd web-admin && pnpm exec vue-tsc --noEmit --pretty false 2>&1 | head -n 40 浏览器:侧栏标题、新建下拉、列头漏斗仅 ETC。 -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add web-admin/src/router/modules/pl.ts \ @@ -349,13 +349,13 @@ EOF ### Task 5: 图谱更新 + 手工验收清单 -- [ ] **Step 1: 更新知识图谱** +- [x] **Step 1: 更新知识图谱** ```bash ./scripts/update-graph.sh all ``` -- [ ] **Step 2: 手工验收(对照 spec)** +- [x] **Step 2: 手工验收(对照 spec)** | # | 检查项 | 期望 | |---|--------|------| @@ -367,7 +367,7 @@ EOF | 6 | etc 全流程 | 申请→待发放→发放正常 | | 7 | 字典管理 | 「加油」不再出现在有效选项 | -- [ ] **Step 3: Commit 图谱(若有 diff)** +- [x] **Step 3: Commit 图谱(若有 diff)** ```bash git add graphify-out backend/graphify-out web-admin/graphify-out