feat(xq0010): 重构执行配置界面并兼容 checkN 检查项(v1.2.12)

This commit is contained in:
2026-11-27 17:18:35 +08:00
parent bbf65bde3d
commit 947dc3067a
14 changed files with 1408 additions and 1000 deletions
@@ -5,21 +5,6 @@
所有业务模块统一经 config.logger 输出日志、config.require_session()/require_user_id() 取登录态。
登录态由底座注入(hr 平台),插件不自行读 cookies 文件、不做自动补登。
"""
import os
# ==================== 共享目录(与影刀版同路径) ====================
_APP_DATA_DIR = os.path.join(
os.getenv('LOCALAPPDATA') or os.getenv('APPDATA') or os.path.expanduser('~'),
'37duAutomation')
SESSIONS_DIR = os.path.join(_APP_DATA_DIR, '.sessions')
# ==================== HR 系统接口 ====================
HR_BASE_URL = "https://hr.37du.co"
GET_CUR_USER_INFO_URL = f"{HR_BASE_URL}/RedseaPlatform/PtUsers.mc?method=getCurUserInfo"
KQ_LIST_URL = f"{HR_BASE_URL}/RedseaPlatform/kqController/getPageAjaxList.mc"
SHIFT_URL = f"{HR_BASE_URL}/RedseaPlatform/redmagicapi/rf_p_kq_count_SelectBanci/getExecutePageResult.mc"
PAGE_MAX_SIZE = 500
# ==================== 输出配置(与影刀版一致) ====================
DEFAULT_SAVE_DIR = r"D:\资料\人资\考勤异常"
@@ -29,7 +14,8 @@ IS_ADJUSTED_CONFIRMED = "2" # 已确认异常(检查1)
IS_ADJUSTED_OPEN = "0" # 未调整异常(检查3 并集之一)
# 加班类型:空=全部、1=延时加班、2=法定假日加班、3=休息日加班
WORK_OVERTIME_TYPE_REST = "3"
WORK_OVERTIME_TYPE_DELAY = "1" # 延时加班(检查4)
WORK_OVERTIME_TYPE_REST = "3" # 休息日加班(检查2)
# 休息日半天加班判定阈值(ot_days / sys_ot_days / plan_ot_days ≈ 0.5)
HALF_DAY = 0.5