|
|
766ee6a69a
|
fix: 统一所有服务时间为北京时间 + 处理/忽略时计算告警时长
- notify_dispatch: _mark_false_alarm 使用 beijing_now() + 计算 duration_ms
- alarm_event_service: handle_alarm 处理时自动计算 duration_ms 和 last_frame_time
- notification_service: datetime.utcnow() 替换为 beijing_now()
- device_service: datetime.now(timezone.utc) 替换为 beijing_now()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-09 16:27:30 +08:00 |
|
|
|
f81cc81ce6
|
refactor(service): 删除MQTT旧代码 + 修复边缘节点重复显示问题
**删除MQTT旧代码:**
- 删除 mqtt_service.py(已废弃的空壳)
- 从 config.py 删除 MQTTConfig 类和相关配置
- 从 schemas.py 删除 mqtt 字段
- 从 alert_service.py 删除 create_alert_from_mqtt 方法
- 告警上报已改为 HTTP + COS 方案,MQTT机制完全废弃
**修复边缘节点重复显示(方案A):**
- 清理 edge_devices 表历史数据(删除 edge_device_001、edge_inference_device)
- 禁用 DeviceService 的 handle_heartbeat 自动创建设备功能
- 边缘端未实现心跳机制,告警数从 alarm_event 表统计
- 运行时长、处理帧数字段设为 null(无心跳机制,不可用)
- 添加 count_alarms_by_edge_node 方法统计边缘节点告警数
**影响范围:**
- /admin-api/aiot/edge/device/page 接口返回数据调整
- /admin-api/aiot/edge/device/get 接口返回数据调整
- 确保不破坏现有功能(告警上报已改为HTTP)
|
2026-02-25 10:30:01 +08:00 |
|
|
|
6861fb6653
|
feat: 新增核心服务模块
- mqtt_service: MQTT 订阅服务,对接 ai_edge 告警和心跳
- notification_service: WebSocket 实时推送服务
- device_service: 边缘设备心跳管理和离线检测
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-02-05 13:56:57 +08:00 |
|