refactor: 重构项目代码结构与依赖管理

1.  **依赖与导入路径修正
    - 移除所有本地sys.path插入,统一使用绝对包导入
    - 修复logger导入路径,统一从app.utils导入
    - 重构intelligent_retry.py移除冗余导入
    - 统一hrbp各模块的导入路径

2.  **项目配置与构建
    - 新增pyproject.toml配置文件,规范项目元数据与依赖声明
    - 更新requirements.txt新增pyautogui、pywin32、pyperclip依赖

3.  **业务模块重构
    - 重构请假/加班审批模块的导入路径与内部逻辑
    - 重命名审批结果描述(将"不通过"改为"驳回")
    - 统一代码中的箭头符号(将→改为->)
    - 新增请假表单解析模块、钉钉通知模块
    - 重构加班/请假校验模块的报告生成逻辑,统一报告格式与推送流程

4.  **测试与文档
    - 新增端到端测试脚本与统一测试运行器
    - 完善README.md文档,补充项目结构、功能说明与使用方法
    - 新增钉钉消息推送工具文档
    - 新增测试用例与辅助工具

5.  **其他优化
    - 修复common/parser.py中的正则表达式兼容单引号的HTML属性
    - 新增session_manager.py移除冗余导入与路径修正
    - 新增OA审批报告生成逻辑优化,支持分组统计与详细清单输出
This commit is contained in:
2026-08-07 00:18:49 +08:00
parent 249088614d
commit 8c97d48382
30 changed files with 4580 additions and 288 deletions
+2 -6
View File
@@ -9,15 +9,11 @@
"""
import functools
import os
import random
import sys
import time
from typing import Callable
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from logger import get_logger
from app.utils.logger import get_logger
logger = get_logger(__name__)
@@ -76,4 +72,4 @@ def retry(max_attempts: int = 3) -> Callable:
) from last_exc
return wrapper
return decorator
return decorator