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