feat: 新增离职电子签流程审批功能,重构请假OCR业务逻辑

1.  新增离职电子签全流程校验:包括附件下载、PDF解析、表单与文书核验
2.  重构通用OCR模块,剥离业务逻辑到单独的请假附件检测模块
3.  新增PyMuPDF依赖用于PDF文本与扫描件OCR解析
4.  新增附件清单查询接口与离职附件检测工具类
This commit is contained in:
2026-08-31 11:55:25 +08:00
parent 9cfa096ec8
commit 3b5ce2d219
17 changed files with 1454 additions and 771 deletions
+7 -2
View File
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
"""
OCR 附件检测测试入口。
实际逻辑已迁移至 app/utils/ocr.py,本文件仅做导入与自测。
通用图像识别见 app/utils/ocr.py,请假附件业务检测见
app/service/hrbp/oa/leave/attachment_check.py,本文件仅做导入与自测。
"""
import os
@@ -12,7 +13,11 @@ _PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if _PROJECT_ROOT not in sys.path:
sys.path.insert(0, _PROJECT_ROOT)
from app.utils.ocr import check_leave_attachment, marriage_within_one_year, extract_dates
from app.service.hrbp.oa.leave.attachment_check import (
check_leave_attachment,
marriage_within_one_year,
extract_dates,
)
if __name__ == "__main__":