feat(hrbp.oa): 新增离职电子签流程审核模块

完成离职电子签全流程开发,包括:
1. 新增模块目录与基础初始化文件
2. 实现表单解析、校验逻辑、审批入口与报告生成
3. 扩展通知模块兼容离职电子签场景,新增未完成待跟进统计
4. 补充接口文档与示例代码
This commit is contained in:
2026-08-20 23:28:05 +08:00
parent dc8d038e34
commit d773f783eb
8 changed files with 1698 additions and 7 deletions
+11 -5
View File
@@ -102,20 +102,21 @@ def build_push_summary(results: list, subject: str = "") -> str:
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") == "超期"]
pending = [r for r in results if r.get("decision") == "未完成"]
abnormal = [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 and not overdue and not abnormal:
if not passed and not rejected and not review and not overdue and not pending and not abnormal:
return ""
def _item(r):
# 兼容请假(leave_info/假期类型)与加班(overtime_info/加班类型)
info = r.get("leave_info") or r.get("overtime_info") or {}
title = r.get("title", "") or info.get("请假人员") or info.get("加班人员") or "未知"
# 兼容请假(leave_info/假期类型)、加班(overtime_info/加班类型)与离职电子签(resign_info/员工姓名)
info = r.get("leave_info") or r.get("overtime_info") or r.get("resign_info") or {}
title = r.get("title", "") or info.get("请假人员") or info.get("加班人员") or info.get("员工姓名") or "未知"
vtype = info.get("假期类型") or info.get("加班类型") or ""
return f"{title}-{vtype}" if vtype else title
all_pass = (not rejected and not review and not overdue and not abnormal and not failed)
all_pass = (not rejected and not review and not overdue and not pending and not abnormal and not failed)
lines = []
if all_pass:
@@ -148,6 +149,11 @@ def build_push_summary(results: list, subject: str = "") -> str:
for r in overdue:
lines.append(_item(r))
lines.append(f"处理原因:{r.get('note') or r.get('error') or '未知'}")
if pending:
lines.append(f"未完成待跟进 {len(pending)} 条,分别是:")
for r in pending:
lines.append(_item(r))
lines.append(f"原因:{r.get('note') or r.get('error') or '未知'}")
if abnormal:
lines.append(f"审批异常 {len(abnormal)} 条,分别是:")
for r in abnormal: