feat: 新增考勤异常模块、银行卡校验、OCR附件检测等功能

1. 新增考勤异常查询与导出模块,支持当月异常拉取、Excel导出、钉钉推送提醒
2. 完善请假/加班流程解析与校验,新增附件下载、OCR核验能力
3. 新增银行卡信息校验模块,支持在职/离职员工工资卡数据核对与异常导出
4. 新增通用OCR工具模块,支持病假/婚假/产检假附件关键词检测与日期提取
5. 新增门店请休假异常名单、银行卡检查等需求文档
6. 重构部分现有模块代码,优化配置与接口调用逻辑
7. 新增测试文件与工具类,完善项目基础能力
This commit is contained in:
2026-08-11 17:26:24 +08:00
parent 7e46b5cc06
commit 9927066abb
30 changed files with 2749 additions and 189 deletions
+9 -3
View File
@@ -68,7 +68,7 @@ def build_push_summary(results: list, subject: str = "") -> str:
"""
根据校验结果生成钉钉推送的文字消息(多行)。
通过/驳回/人工复核三组均以文字说明推送(不再只发表格):
通过/驳回/人工复核/超期四组均以文字说明推送(不再只发表格):
- 全部通过:用简洁格式
【{subject}审批】本次审批 N 条{subject}申请,
分别是:
@@ -101,9 +101,10 @@ def build_push_summary(results: list, subject: str = "") -> str:
passed = [r for r in results if r.get("decision") == "通过"]
rejected = [r for r in results if r.get("decision") == "驳回"]
review = [r for r in results if r.get("decision") == "人工复核"]
overdue = [r for r in results if r.get("decision") == "超期"]
failed = [r for r in results if r.get("decision") == "失败"]
if not passed and not rejected and not review:
if not passed and not rejected and not review and not overdue:
return ""
def _item(r):
@@ -113,7 +114,7 @@ def build_push_summary(results: list, subject: str = "") -> str:
vtype = info.get("假期类型") or info.get("加班类型") or ""
return f"{title}-{vtype}" if vtype else title
all_pass = (not rejected and not review and not failed)
all_pass = (not rejected and not review and not overdue and not failed)
lines = []
if all_pass:
@@ -141,6 +142,11 @@ def build_push_summary(results: list, subject: str = "") -> str:
for r in review:
lines.append(_item(r))
lines.append(f"详情页:{r.get('detail_url') or '无'}")
if overdue:
lines.append(f"超期待人资处理 {len(overdue)} 条,分别是:")
for r in overdue:
lines.append(_item(r))
lines.append(f"处理原因:{r.get('note') or r.get('error') or '未知'}")
if failed:
lines.append(f"另有处理失败 {len(failed)} 条,请查看日志。")