You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
943 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 体检报告3小时查看限制设计
## 需求
出报告 3 小时后才允许用户查看体检报告。
## 时间依据
PEIS 接口 `QueryExamReport` 返回的 `报告日期` 字段为报告生成/完成时间(格式:`2026-05-29T07:03:18`)。
## 实现方案
仅在后端 `ReportController::list()` 方法中增加过滤逻辑列表不可见则用户无法访问任何报告相关页面详情、对比、趋势分析、PDF 下载)。
### 改动文件
- `app/Http/Controllers/ReportController.php``list()` 方法
### 过滤条件
1. `体检状态` 必须为 `'报告已出'`
2. `报告日期 + 3 小时 ≤ 当前时间``time() < strtotime($reportDate) + 10800` 则跳过)
3. `报告日期` 为空的记录不做时间过滤(仅做状态过滤)
### 不修改范围
- 前端(UniApp)代码
- 路由
- 数据库
- 配置
- `info()`、`contrast()`、`analysis()`、`down_pdf()` 等其他后端方法