Files
bj_power/bj_power_mes/etc/bj_power_mes-api.yaml
T

88 lines
2.7 KiB
YAML
Raw 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.
Name: bj_power_mes
Host: 0.0.0.0
Port: 8888
Timeout: 10000
# 请求体上限:go-zero 默认仅 1MB,会拦住照片/PDF 上传;取各文件类型上限的最大值(50MB)
MaxBytes: 52428800
# PostgreSQL(独立库 bj_power_mes)
Database:
Host: 127.0.0.1
Port: 5432
User: postgres
Password: postgres
Dbname: bj_power_mes
MaxIdle: 10
MaxOpen: 20
# Redis(看板缓存 + 防击穿)
Redis:
Host: 127.0.0.1:6379
Type: node
# JWT(统一密钥 Hardman_2026,access 短有效 + refresh 滑动续签)
Auth:
AccessSecret: Hardman_2026
AccessExpire: 3600
# 项目间内部 API 鉴权(X-API-TOKEN)
Internal:
Token: Hardman_2026
# 命令行敏感操作门禁密码(migrate/reset-all/seed/change-password 需输入,独立于后台登录账号密码)
Cli:
AdminPassword: "Hardman_2026"
# 日志:按天存储 logs/bj_power_mes-2026-xx-xx.log,保留 30 天
Logger:
Level: INFO
Format: text
Filename: logs/bj_power_mes.log
Daily: true
MaxSize: 100
MaxBackups: 10
MaxAge: 30
Compress: false
Console: true
# WMS 内部接口(半成品流转等)
Wms:
BaseURL: http://127.0.0.1:8890
Token: Hardman_2026
# PLC 对接(mock 模式时 Enable=false,写入工序码 + 读完成信号)
Plc:
Enable: false
Host: 127.0.0.1
Port: 102
# 海康 AGV(RCS-Lite V1.5) 对接(2026-10-17 由 RCS-2000 改为 RCS-Lite 1.5):无签名鉴权
# 未接真实 RCS-Lite 前保持 mock(EnableMock: true);现场对接时填 EnableMock: false + BaseURL(默认端口 8182,含 /rCMS/services/rest/hikRpcService)
Agv:
EnableMock: true
BaseURL: ""
CarrierCode: ""
MapCode: ""
Priority: "1"
# 扫码中间件(键盘 HID 注入):默认关闭。需用扫码枪注入时才改 Enabled: true 并重启。
# 注意:若 MES 与 WMS 同机且都开,7757 谁先启动谁监听,后到的只记日志(不退出、不影响主进程)。
Scanner:
Enabled: false
# 附件统一存储(与 WMS 共用同一根目录,落盘 年/月/日/文件类型/uuid.ext,库内只存相对路径)
# 生产环境改 Dir: /data/bj_power/attachments
Upload:
Dir: "D:/hardman/bj_power/attachments"
MaxMB: 20 # 默认单文件上限 20MB
MaxSize:
PROCESS_PDF: 52428800 # 工艺流程作业指导书 50MB
INSPECTION_PHOTO: 20971520 # 检验/巡检照片 20MB
INSPECTION_PDF: 52428800 # 检验报告 50MB
DRAWING: 52428800 # 图纸 50MB
EXCEL_IMPORT: 10485760 # Excel 导入 10MB
LocalRetentionYears: 1 # 本地保留最近 1 年
DiskWarnPercent: 20 # 剩余空间 <20% 告警
DiskCriticalPercent: 10 # 剩余空间 <10% 提示清理/归档
DiskCheckHour: 7 # 每天 07:00 检测