Files
guoju0808/ry-ocr/.env.example
T
郭庆泰 c3eb8ed9c3 feat: OCR 服务 + 会议材料模块
ry-ocr/ (新)
  本地发票识别微服务 (PaddleOCR 3.x + FastAPI, 8801)
  - QR 优先: 扫到二维码即取开票时间/发票号/金额; 没扫到/格式不合法直接判非发票, 不跑 OCR
  - 配置 QR_FULL_OCR 控制快路径(false, 0.2s)还是全字段(true, 4.5s)
  - /recognize/invoice (multipart) + /recognize/invoice/by-path (本地路径, 白名单) + /recognize/text
  - is_invoice / from_qr / qr_raw / qr_error / error_code 字段
  - 12 字段发票抽取 (regex + 启发式, 左右主体识别)
  - 超时保护 (15s 单页 / 60s 总流程) + PaddleOCR 单例 + ThreadPoolExecutor

ry-api/ruoyi-business/
  - pom.xml: 加 hutool-http/json/core 5.8.27, lombok 1.18.30 (OcrClient @Slf4j 所需)
  - ocr/: OcrClient + InvoiceResult/Fields/Line + ZipExtractor + InvoiceOcrScheduler
  - oss/: OssUploader + OssConfMeta (OCR 识别后重传 OSS)
  - config/: OcrConfig + OcrExecutorConfig (后台线程池)
  - service/impl/InvoiceOcrService: 后台提交 OCR, ZIP 路径解压识别, 替换场景先清旧
  - 会议材料 CRUD 全套 (BizMeetingAuditLog/Executor/Invoice/Material/Supervisor):
    controller + service + mapper + domain + xml

ry-vue3/
  - MeetingDetail.vue (新建): 会议详情页 (含评分维度章节, 改只读)
  - Meetings.vue / OssFileUploader.vue / router / Login.vue: 适配新字段

ry-api/ruoyi-admin/
  - RuoYiApplication.java + application.yml: 启用 @Async 异步支持

_self/
  - manager_meetings.md / manager_meeting_detail.md: 文档
2026-08-22 00:23:22 +08:00

39 lines
1.1 KiB
Bash
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.
# ===== OCR 服务配置 =====
# 服务端口
APP_HOST=0.0.0.0
APP_PORT=8801
# 是否使用 GPUtrue/false
USE_GPU=false
# OCR 语言(ch / en / chinese_cht
OCR_LANG=ch
# OCR 模型: "mobile" (CPU 友好, 默认) / "server" (高精度, 需 GPU)
OCR_ENGINE=mobile
# 单文件最大体积(MB
MAX_UPLOAD_MB=20
# PDF DPI(清晰数字 PDF 150 够用,扫描件建议 250~300
PDF_DPI=150
# 路径接口允许的根目录(Windows 用分号;Linux 用冒号:分隔多个),空 = 禁用
# 安全考虑:默认空,需显式开启
# ALLOWED_DIRS=E:\gitee\guoju-hegui;D:\uploads
# 单页 OCR 识别超时(秒)- CPU mobile 约 4 秒, 建议 15
OCR_PAGE_TIMEOUT_S=15
# 整流程超时(秒) - 包括 PDF 转图 + OCR + 字段抽取
OCR_TOTAL_TIMEOUT_S=60
# QR 识别:
# true = 扫到 QR 后仍跑全量 OCR + 字段抽取 (向后兼容)
# false = 扫到 QR 后直接返回 QR 里的 3 个核心字段 (开票时间/发票号/金额), 跳过 OCR
# 没扫到 QR 或 QR 格式不合法时一律回退到 OCR 流水线
QR_FULL_OCR=true
# 日志级别(DEBUG/INFO/WARNING
LOG_LEVEL=INFO