Files

56 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 智能回收运营平台
面向工厂内网部署的称重与设备管理后台,按公开演示后台的业务范围重新实现,不复用对方代码或视觉素材。
## 已实现
- 工作台:投放量、称重次数、待核对数据、设备在线率、最近流水
- 废料称重:记录查询、统计、CSV 导出
- 事件列表:按投放事件聚合原子称重记录
- 地磅核对:台秤与地磅偏差判定
- 导体追溯:RFID、批次、皮重、毛重、净重、MES 状态
- 人员设备:人员、人脸版本、车间、设备心跳、满溢率
- 告警中心:接单、关闭、阈值配置
- 系统设置:角色、车间、设备监控、MES、审计日志
- 终端模拟:废料投放与导体称重流程演示
- 设备接口:Token、投放、心跳、状态、告警、人员拉取、人脸查询、同步回执
## 本机开发
需要 Node.js 22 或更高版本:
```bash
npm ci
npm run dev
```
浏览器访问 `http://localhost:3000`
## Ubuntu 24.04 部署
推荐使用 Docker Compose
```bash
docker compose up -d --build
```
后台地址:`http://服务器IP:3000`。数据库持久化在 Docker 卷 `console-data` 中。
首次部署后建议在路由器或防火墙中只允许内网访问,并通过 Nginx 配置 HTTPS。
## 设备接口示例
```text
POST /api/v1/auth/tokens
POST /api/v1/devices/{deviceId}/deliveries
POST /api/v1/devices/{deviceId}/heartbeat
POST /api/v1/devices/{deviceId}/status
POST /api/v1/devices/{deviceId}/alerts
GET /api/v1/devices/{deviceId}/people/incremental?cursor=0
GET /api/v1/devices/{deviceId}/faces/{personId}
POST /api/v1/devices/{deviceId}/sync-acks
GET /api/v1/deliveries/{recordId}
```
当前版本用于本地联调。正式投产前还需要补充设备密钥、签名校验、管理员登录和自动备份。