# Results Overview Project Analysis Dialog Display Fix 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/impl/CcdiProjectOverviewServiceImplTest.java`

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

人工核对以下边界仍成立：

- 详情接口路径仍为 `/ccdi/project/overview/person-analysis/detail`
- 入参仍只有 `projectId` 和 `staffIdCard`
- 返回仍以 `basicInfo` 与 `abnormalDetail.groups` 为核心
- 本轮只改展示，不需要新增“头带 / 统一滚动 / 标签换行”专用字段

- [ ] **Step 2: Run the focused contract tests**

Run:

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

Expected:

- `PASS`

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

若失败：

- 不要直接新增接口或字段
- 先确认失败是否与当前前端展示修正无关
- 若确实发现契约缺口，停止执行并回到设计阶段补后端方案

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

Run:

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

Expected:

- `PASS`

- [ ] **Step 5: Commit**

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

### 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-26-results-overview-project-analysis-dialog-display-fix-backend-verification.md`
- Create: `docs/reports/implementation/2026-03-26-results-overview-project-analysis-dialog-display-fix-backend-record.md`

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

Run:

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

Expected:

- 全部 `PASS`

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

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

- 执行命令
- 执行日期
- 测试结果
- 结论：现有详情契约足以支撑本轮展示修正，后端无需扩展

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

在 `docs/reports/implementation/2026-03-26-results-overview-project-analysis-dialog-display-fix-backend-record.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-26-results-overview-project-analysis-dialog-display-fix-backend-verification.md docs/reports/implementation/2026-03-26-results-overview-project-analysis-dialog-display-fix-backend-record.md
git commit -m "补充项目分析弹窗后端边界记录"
```

## Done When

- 已确认当前详情接口契约足以支撑本轮展示修正
- 未引入任何与需求无关的后端补丁式改动
- 已留下后端验证记录与实施记录
- 若回归全部通过，后端执行结论明确为“无需改造”
