# Results Overview Project Analysis Dialog Display Optimization Backend Implementation Plan

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

**Goal:** 验证结果总览“查看详情”窗口整体展示优化在当前后端契约下可直接落地，不新增接口、不扩展字段，只对现有详情链路做边界确认与回归留痕。

**Architecture:** 本轮设计明确属于前端展示层优化，后端默认不做开发改动。执行时先以 `CcdiProjectOverviewController + ICcdiProjectOverviewService + CcdiProjectOverviewServiceImpl + CcdiProjectOverviewMapper.xml` 的现有详情链路为基准，确认 `basicInfo`、`abnormalDetail.groups` 和既有异常分组口径足以支撑前端重排；若验证通过，则仅沉淀“后端无需改造”的验证记录，不强行制造补丁式变更。

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

---

### Task 1: 先验证现有详情接口契约足以支撑展示优化

**Files:**
- Verify: `ccdi-project/src/main/java/com/ruoyi/ccdi/project/controller/CcdiProjectOverviewController.java`
- Verify: `ccdi-project/src/main/java/com/ruoyi/ccdi/project/service/ICcdiProjectOverviewService.java`
- Verify: `ccdi-project/src/main/java/com/ruoyi/ccdi/project/service/impl/CcdiProjectOverviewServiceImpl.java`
- Verify: `ccdi-project/src/main/resources/mapper/ccdi/project/CcdiProjectOverviewMapper.xml`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/controller/CcdiProjectOverviewControllerContractTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/service/CcdiProjectOverviewServiceStructureTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/service/impl/CcdiProjectOverviewServiceImplTest.java`
- Test: `ccdi-project/src/test/java/com/ruoyi/ccdi/project/mapper/CcdiProjectOverviewMapperSqlTest.java`

- [ ] **Step 1: Review the existing backend boundary**

确认以下设计边界与现有代码一致：

- 详情接口路径仍为 `/ccdi/project/overview/person-analysis/detail`
- 入参仍只有 `projectId` 和 `staffIdCard`
- 返回仍以 `basicInfo` 与 `abnormalDetail.groups` 为核心
- 现有 `BANK_STATEMENT` / `OBJECT` 分组口径无需为本轮展示优化新增后端字段

- [ ] **Step 2: Run the focused backend regression tests**

Run:

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

Expected:

- `PASS`

- [ ] **Step 3: If tests fail, stop and reassess**

若任一测试失败：

- 不要直接补后端字段或新增接口
- 先定位失败原因是否为当前展示优化误判了后端边界
- 只有在确认现有契约确实不足时，才单独回到设计阶段补后端方案

- [ ] **Step 4: If tests pass, keep backend code unchanged**

通过后明确记录：

- 本轮不修改 Controller、Service、Mapper、SQL、DTO、VO
- 后端现有详情链路已满足前端展示层重排

- [ ] **Step 5: Commit**

```bash
# 本任务若无代码与文档改动，不产生提交。
```

### Task 2: 沉淀后端“无需改造”验证记录

**Files:**
- Create: `docs/reports/implementation/2026-03-25-results-overview-project-analysis-dialog-display-optimization-backend-record.md`
- Create: `docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-display-optimization-backend-verification.md`

- [ ] **Step 1: Write the backend verification record**

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

- 执行命令
- 执行日期
- 结果是否通过
- 若通过，明确“当前详情接口契约足以支撑本轮展示优化”

- [ ] **Step 2: Write the backend implementation record**

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

- 本轮目标为展示优化
- 已核对当前详情接口边界
- 本轮后端无需代码改动
- 若后续前端联调发现字段缺口，再单独开设计与实施计划

- [ ] **Step 3: Review git status**

Run:

```bash
git status --short
```

Expected:

- 只包含本次新增的后端验证记录与实施记录

- [ ] **Step 4: Commit**

```bash
git add docs/reports/implementation/2026-03-25-results-overview-project-analysis-dialog-display-optimization-backend-record.md docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-display-optimization-backend-verification.md
git commit -m "补充结果总览详情弹窗后端验证记录"
```

- [ ] **Step 5: Handoff**

执行结论应为以下二选一：

- `通过`：后端无需改造，进入前端实施计划
- `不通过`：停止实施，回到设计阶段补后端方案

## 完成标准

- 已确认当前详情接口契约足以支撑本轮展示优化
- 未引入任何与需求无关的后端补丁式改动
- 已留下后端验证记录与实施记录
