🔔 复查预警通知功能 - 安装部署
步骤 1: 检查必需文件
✅ 创建表的PHP脚本 (create_recheck_alerts_table.php) - 存在
❌ 创建表的SQL文件 (create_recheck_alerts_table.sql) - 不存在
✅ 添加字段的PHP脚本 (add_rectification_deadline_days_field.php) - 存在
❌ 添加字段的SQL文件 (add_rectification_deadline_days_field.sql) - 不存在
✅ 预警服务类 (includes/recheck_alert_service.php) - 存在
✅ 预警列表页面 (recheck_alerts.php) - 存在
✅ 预警API接口 (get_recheck_alerts.php) - 存在
✅ 定时任务脚本 (generate_alerts_cron.php) - 存在
步骤 2: 检查数据库表
✅ inspections 表的 rectification_deadline_days 字段已存在
步骤 3: 检查目录权限
步骤 4: 安装操作
步骤 5: 验证安装
❌ 安装未完成
请解决上述错误后重新运行此安装脚本。
步骤 6: 定时任务设置(可选)
设置定时任务自动生成预警(推荐)
Linux系统(cron):
0 9 * * * /usr/bin/php /vol1/1000/www/generate_alerts_cron.php
Windows系统(任务计划程序):
- 创建基本任务
- 触发器:每天
- 操作:启动程序
- 程序:php.exe
- 参数:/vol1/1000/www\generate_alerts_cron.php
问题汇总
❌ 错误:
- 缺少文件: create_recheck_alerts_table.sql
- 缺少文件: add_rectification_deadline_days_field.sql