# Results Overview Project Analysis Dialog Backend Implementation Plan

> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** 明确结果总览项目分析弹窗本轮后端不新增接口、不改查询口径，并通过定向回归验证现有结果总览接口足以支撑前端静态高保真弹窗的上下文装配。

**Architecture:** 延续当前 `CcdiProjectOverviewController + Service + Mapper` 结果总览链路，不创建新的项目分析详情接口，也不改动现有仪表盘、风险人员总览、模型卡片和模型命中人员列表接口。后端本轮只做边界确认、契约回归和文档沉淀，确保前端在“不扩接口”的约束下实现统一弹窗。

**Tech Stack:** Java 21, Spring Boot 3, MyBatis XML, Maven

---

### Task 1: 确认现有接口边界足够支撑弹窗上下文

**Files:**
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/controller/CcdiProjectOverviewControllerContractTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/service/impl/CcdiProjectOverviewServiceImplTest.java`

- [ ] **Step 1: Review current contract coverage**

确认本轮前端弹窗只依赖以下现有数据：

- 风险人员总览行数据
- 模型命中人员列表行数据
- 已有项目基础信息

并在设计文档中再次核对以下“不做”边界未漂移：

- 不新增 `/project-analysis/*` 类接口
- 不新增详情 DTO / VO
- 不修改现有结果总览统计口径

若此步发现设计文档边界与当前后端现实不一致，仅回到设计评审阶段修正文档；不要在本轮后端实施中直接扩接口。

- [ ] **Step 2: Run existing contract tests**

Run:

```bash
mvn test -pl ccdi-project -Dtest=CcdiProjectOverviewControllerContractTest,CcdiProjectOverviewServiceImplTest
```

Expected:

- `PASS`

- [ ] **Step 3: If any test fails, only repair unintended regression**

若失败：

- 先确认是否为本轮前端改动误触发的契约边界问题
- 仅允许修复与结果总览现有接口稳定性直接相关的问题
- 禁止借机新增详情接口或扩展弹窗专用查询

- [ ] **Step 4: Re-run the same tests**

Run:

```bash
mvn test -pl ccdi-project -Dtest=CcdiProjectOverviewControllerContractTest,CcdiProjectOverviewServiceImplTest
```

Expected:

- `PASS`

- [ ] **Step 5: Commit**

```bash
git commit --allow-empty -m "确认结果总览项目分析弹窗后端边界"
```

### Task 2: 做结果总览后端回归并补充记录

**Files:**
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/controller/CcdiProjectOverviewControllerContractTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/mapper/CcdiProjectOverviewMapperRiskModelPeopleTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/mapper/CcdiProjectOverviewMapperRiskModelCardsTest.java`
- Create: `docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-backend-verification.md`
- Create: `docs/reports/implementation/2026-03-25-results-overview-project-analysis-dialog-backend-implementation.md`

- [ ] **Step 1: Run backend regression**

Run:

```bash
mvn test -pl ccdi-project -Dtest=CcdiProjectOverviewControllerContractTest,CcdiProjectOverviewMapperRiskModelPeopleTest,CcdiProjectOverviewMapperRiskModelCardsTest
```

Expected:

- 全部 `PASS`

- [ ] **Step 2: Write verification record**

在 `docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-backend-verification.md` 记录：

- 执行命令
- 执行时间
- 结果
- 结论：本轮后端无需新增接口

- [ ] **Step 3: Write implementation record**

在 `docs/reports/implementation/2026-03-25-results-overview-project-analysis-dialog-backend-implementation.md` 记录：

- 本轮后端不改源码
- 维持的接口边界
- 维持的查询口径
- 回归验证结果

- [ ] **Step 4: Confirm no backend source files were modified**

Run:

```bash
git diff --name-only -- ccdi-project ruoyi-admin ruoyi-common ruoyi-framework ruoyi-system
```

Expected:

- 无输出，或仅出现与本轮直接相关且经确认必须修复的结果总览稳定性文件

- [ ] **Step 5: Commit**

```bash
git add docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-backend-verification.md docs/reports/implementation/2026-03-25-results-overview-project-analysis-dialog-backend-implementation.md
git commit -m "补充结果总览项目分析弹窗后端记录"
```
