Files
37duAutomation/app/service/hrbp/oa/work_overtime/overtime_approval.py
T
puddy 7d5028c49a feat(oa): 搭建OA审批流程框架,实现请假/加班通用审批引擎
本次提交完成了OA人事审批系统的基础架构搭建:
1. 新增项目依赖包DrissionPage、python-dotenv
2. 初始化项目目录结构,创建通用工具包、日志模块、重试工具
3. 搭建HRBP OA系统模块,拆分公共配置、登录、会话管理、SSO解析、API接口
4. 实现请假、加班审批的通用流程引擎,抽离公共逻辑
5. 完善两个业务审批模块的校验入参文档,优化代码结构
6. 新增cookies持久化功能,支持复用登录态避免重复登录
7. 替换原有print日志为统一彩色日志系统
2026-08-06 00:09:55 +08:00

37 lines
1.1 KiB
Python
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.
# -*- coding: utf-8 -*-
"""
@Module: hrbp.oa.work_overtime.overtime_approval
@FileName: overtime_approval.py
@Author: 小布丁
@CreateTime: 2026-08-05 21:22
@Description: 加班审批流程入口(审批引擎见 common/approval_flow.py,校验规则见 validator.py,报告见 reporter.py)
@Version: 1.4.0
@Usage:
python -m hrbp.oa.work_overtime.overtime_approval
"""
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
try:
from ..common.approval_flow import run_flow
from .validator import validate_doc
from .reporter import generate_report
except ImportError:
from common.approval_flow import run_flow
from validator import validate_doc
from reporter import generate_report
def main() -> None:
"""加班审批:登录 → 查待办 → 解析SSO → 获取表单 → 校验 → 报告"""
run_flow(subject="加班", validate_doc=validate_doc, generate_report=generate_report)
if __name__ == "__main__":
main()