chore: update knowledge graphs after vehicle recharge workflow

Refresh AST graphs for backend/frontend and mark completed implementation plan steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-09-26 21:08:05 +08:00
1 parent 7b99040f9c
commit a3fbb92595
8 files changed
+16450 -22806

No files matched your search

@@ -50,7 +50,7 @@
**Files:**
- Create: `docs/sql/migrations/2026-09-26-pl-vehicle-recharge-workflow.sql`
- [ ] **Step 1: 编写迁移脚本核心内容**
- [x] **Step 1: 编写迁移脚本核心内容**
```sql
SET NAMES utf8mb4;
@@ -128,7 +128,7 @@ WHERE a.del_flag = 0
AND r.id IS NULL;
```
- [ ] **Step 2: 在测试库执行并核对**
- [x] **Step 2: 在测试库执行并核对**
```bash
cd backend && ./venv/bin/python -c "
@@ -140,7 +140,7 @@ Expected: 列存在;两节点;原 pending 无发放单变为 `in_approval` +
- [ ] **Step 3: 生产库执行同一脚本**(用户确认后)
- [ ] **Step 4: Commit**
- [x] **Step 4: Commit**
```bash
git add docs/sql/migrations/2026-09-26-pl-vehicle-recharge-workflow.sql
@@ -161,7 +161,7 @@ EOF
- Modify: `backend/app/schemas/pl/vehicle_recharge.py`
- Modify: `backend/app/services/bx/workflow.py`(`_DEFAULT_WORKFLOWS` + 保存节点时校验至多一个 `disburse`)
- [ ] **Step 1: 写失败测试(状态常量 / schema)**
- [x] **Step 1: 写失败测试(状态常量 / schema)**
```python
# backend/tests/test_pl_vehicle_recharge_workflow.py
@@ -171,7 +171,7 @@ def test_apply_statuses_include_workflow_states():
assert {"draft", "in_approval", "rejected", "disbursed", "cancelled"} <= APPLY_STATUSES
```
- [ ] **Step 2: 跑测确认失败**
- [x] **Step 2: 跑测确认失败**
```bash
cd backend && ./venv/bin/python -m pytest tests/test_pl_vehicle_recharge_workflow.py::test_apply_statuses_include_workflow_states -v
@@ -179,7 +179,7 @@ cd backend && ./venv/bin/python -m pytest tests/test_pl_vehicle_recharge_workflo
Expected: FAIL(`APPLY_STATUSES` 未定义或仍是旧集合)
- [ ] **Step 3: 实现 schema 常量与 Read 扩展字段**
- [x] **Step 3: 实现 schema 常量与 Read 扩展字段**
在 `vehicle_recharge.py` 增加:
@@ -201,7 +201,7 @@ if disburse_count > 1:
raise HTTPException(400, detail="发放登记节点至多一个")
```
- [ ] **Step 4: 跑测通过 + Commit**
- [x] **Step 4: 跑测通过 + Commit**
```bash
cd backend && ./venv/bin/python -m pytest tests/test_pl_vehicle_recharge_workflow.py -v
@@ -221,7 +221,7 @@ EOF
- Modify: `backend/app/services/pl_vehicle_recharge_service.py`
- Modify: `backend/app/api/pl/vehicle_recharge.py`
- [ ] **Step 1: 测试 submit 与再提交 round**
- [x] **Step 1: 测试 submit 与再提交 round**
```python
def test_submit_sets_in_approval_and_first_node(monkeypatch):
@@ -234,7 +234,7 @@ def test_resubmit_increments_round_keeps_history():
...
```
- [ ] **Step 2: 实现**
- [x] **Step 2: 实现**
- `create_apply`:`status="draft"`,`approval_round=0`,`wf_id/current_node=None`
- `update_apply` / `cancel`:仅 `draft`/`rejected`
@@ -245,7 +245,7 @@ def test_resubmit_increments_round_keeps_history():
- `status=in_approval`,绑定 `wf_id`、`current_node`
- `get_apply` / `apply_to_read`:附带 `approvals`(按 round、time)与关联 `record`
- [ ] **Step 3: 路由**
- [x] **Step 3: 路由**
```python
@router.post("/{apply_id}/submit")
@@ -253,7 +253,7 @@ def submit_apply(...):
return ok(svc.submit_apply(...))
```
- [ ] **Step 4: pytest + Commit**
- [x] **Step 4: pytest + Commit**
```bash
cd backend && ./venv/bin/python -m pytest tests/test_pl_vehicle_recharge_workflow.py -v
@@ -272,7 +272,7 @@ EOF
- Create: `backend/app/services/pl_vehicle_recharge_approval_service.py`
- Modify: `backend/app/api/pl/vehicle_recharge.py`(或新建 `vehicle_recharge_approval.py` 并注册)
- [ ] **Step 1: 测试**
- [x] **Step 1: 测试**
```python
def test_approve_advances_to_next_node(): ...
@@ -281,7 +281,7 @@ def test_disburse_writes_record_and_disbursed(): ...
def test_approve_forbidden_on_disburse_node(): ...
```
- [ ] **Step 2: 实现核心逻辑**
- [x] **Step 2: 实现核心逻辑**
```python
def _current_node_row(db, apply) -> BxWorkflowNode:
@@ -322,7 +322,7 @@ def list_done_for_me(...):
发放页 `create_record`:若 `apply_id` 非空且申请 `status=in_approval`(走审批),拒绝,提示去「充值审批」处理。
- [ ] **Step 3: pytest + Commit**
- [x] **Step 3: pytest + Commit**
```bash
git commit -m "$(cat <<'EOF'
@@ -340,7 +340,7 @@ EOF
- Modify: `web-admin/src/api/pl/index.ts`
- Modify: `web-admin/src/utils/pl-display.ts`
- [ ] **Step 1: 类型与方法**
- [x] **Step 1: 类型与方法**
```ts
// status: 'draft' | 'in_approval' | 'rejected' | 'disbursed' | 'cancelled'
@@ -353,9 +353,9 @@ disburseVehicleRecharge: (id, data) => request.post(`/transport/vehicle-recharge
// 流程:复用 bx workflow API bizType=vehicle_recharge,或 PL 封装
```
- [ ] **Step 2: `getPlRechargeApplyStatusLabel` / TagType 映射新五态**
- [x] **Step 2: `getPlRechargeApplyStatusLabel` / TagType 映射新五态**
- [ ] **Step 3: Commit**
- [x] **Step 3: Commit**
```bash
git commit -m "$(cat <<'EOF'
@@ -374,11 +374,11 @@ EOF
- Modify: `web-admin/src/router/modules/pl.ts`
- Modify: `web-admin/src/App.vue`(标题「充值审批流程」)
- [ ] **Step 1: 复制报销配置页,改 `bizType` 为 `vehicle_recharge`**
- [ ] **Step 2: 节点表单增加「节点动作」:`approve` / `disburse`**
- [ ] **Step 3: 路由 `vehicle-recharge-workflow`,meta.title=`充值审批流程`**
- [ ] **Step 4: 本地打开配置页,保存两节点,刷新仍在**
- [ ] **Step 5: Commit**
- [x] **Step 1: 复制报销配置页,改 `bizType` 为 `vehicle_recharge`**
- [x] **Step 2: 节点表单增加「节点动作」:`approve` / `disburse`**
- [x] **Step 3: 路由 `vehicle-recharge-workflow`,meta.title=`充值审批流程`**
- [x] **Step 4: 本地打开配置页,保存两节点,刷新仍在**
- [x] **Step 5: Commit**
```bash
git commit -m "$(cat <<'EOF'
@@ -396,13 +396,13 @@ EOF
- Create: `web-admin/src/views/pl/vehicle-recharge-approval/index.vue`
- Modify: `web-admin/src/router/modules/pl.ts`、`App.vue`
- [ ] **Step 1: P01 列表 + Tab「待我审批」「我已办」**
- [ ] **Step 2: 详情弹窗:申请信息 + 按轮次审批历史 + 发放信息(有则显示)**
- [ ] **Step 3: 待办操作区**
- [x] **Step 1: P01 列表 + Tab「待我审批」「我已办」**
- [x] **Step 2: 详情弹窗:申请信息 + 按轮次审批历史 + 发放信息(有则显示)**
- [x] **Step 3: 待办操作区**
- `action_type=approve`:通过 / 驳回(意见)
- `action_type=disburse`:驳回 / 发放表单(字段对齐现 `vehicle-recharge-record` 弹窗)
- [ ] **Step 4: 角标(可选):`pl_menu_badge` 增加充值审批 pending 计数,或本页自行展示条数**
- [ ] **Step 5: Commit**
- [x] **Step 4: 角标(可选):`pl_menu_badge` 增加充值审批 pending 计数,或本页自行展示条数**
- [x] **Step 5: Commit**
```bash
git commit -m "$(cat <<'EOF'
@@ -421,11 +421,11 @@ EOF
- Modify: `web-admin/src/views/pl/vehicle-recharge-apply/columnFilterDefs.ts`
- Modify: `web-admin/src/views/pl/vehicle-recharge-record/index.vue`
- [ ] **Step 1: 申请列表状态筛选项换新五态;工具栏增加「提交」(选中 draft/rejected)**
- [ ] **Step 2: 新建默认 draft;编辑仅 draft/rejected**
- [ ] **Step 3: 查看弹窗增加「审核记录」「发放信息」分区**
- [ ] **Step 4: 发放看板:对 `in_approval` 申请隐藏/禁用「发放」,提示走充值审批**
- [ ] **Step 5: Commit**
- [x] **Step 1: 申请列表状态筛选项换新五态;工具栏增加「提交」(选中 draft/rejected)**
- [x] **Step 2: 新建默认 draft;编辑仅 draft/rejected**
- [x] **Step 3: 查看弹窗增加「审核记录」「发放信息」分区**
- [x] **Step 4: 发放看板:对 `in_approval` 申请隐藏/禁用「发放」,提示走充值审批**
- [x] **Step 5: Commit**
```bash
git commit -m "$(cat <<'EOF'
@@ -439,10 +439,10 @@ EOF
### Task 9: 联调验收 + 图谱更新
- [ ] **Step 1: 按 spec §9 走通:提交 → 吴九华通过 → 汪璇登记 → 详情可见历史与发放**
- [ ] **Step 2: 驳回 → 改单再提 → 第 2 轮历史仍在**
- [ ] **Step 3: `./scripts/update-graph.sh all`(或 backend+frontend)**
- [ ] **Step 4: 将设计文档状态保持「已批准」;计划任务勾选完成**
- [ ] **Step 1: 按 spec §9 走通:提交 → 吴九华通过 → 汪璇登记 → 详情可见历史与发放**(待手工联调)
- [ ] **Step 2: 驳回 → 改单再提 → 第 2 轮历史仍在**(待手工联调)
- [x] **Step 3: `./scripts/update-graph.sh all`(或 backend+frontend)**
- [x] **Step 4: 将设计文档状态保持「已批准」;计划任务勾选完成**
---