Files
37duAutomation/app/service/hrbp/ehr/common/config.py
T
puddy 3a8571d995 refactor: 统一所有缓存/会话文件的存储路径
1.  重构会话管理模块,新增app.common.app_paths统一管理缓存路径,所有登录态与缓存统一迁移至%LOCALAPPDATA%\37duAutomation\.sessions
2.  更新所有涉及文件存储路径的代码,包括考勤、工资卡、社保、审批等模块
3.  新增银行字典缓存功能,统一管理银行编码映射
4.  添加雇主险业务模块,实现花名册筛选复制功能
5.  更新.gitignore,将所有.sessions目录纳入忽略列表
6.  删除影刀脚本旧的本地缓存文件
7.  优化加班审批校验逻辑,新增提前到岗型加班校验规则
8.  完善工资卡核对功能,补充开卡银行信息展示
2026-08-13 21:20:55 +08:00

51 lines
2.8 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.ehr.common
@FileName: config.py
@Author: 小布丁
@CreateTime: 2026-08-08 10:40
@Description: HR 系统配置,集中管理接口地址、分页大小等常量(供各业务模块复用)
@Version: 1.0.0
"""
# ---------- 银行卡(工资卡)信息查询接口 ----------
# 分页查询工资卡信息(aa.md 提供),返回 JSON
WAGE_CARD_URL = "https://hr.37du.co/RedseaPlatform/getPageAjax/HrStaffWageCard.mc"
# 单页最大抓取条数
PAGE_MAX_SIZE = 500
# ---------- 银行字典接口(aa.md 提供,按 BANK_TYPE 匹配 code -> 开卡银行) ----------
BANK_DICT_URL = "https://hr.37du.co/RedseaPlatform/PtCodeTypeValue.mc?method=getCodeValueByCodes"
BANK_DICT_CODE_TYPE = "WAGE.BANKTYPE"
BANK_DICT_EXPIRE_SEC = 7 * 24 * 60 * 60 # 缓存7天过期,自动重新拉取
# ---------- 员工花名册(自定义导出)页面 ----------
# 花名册自定义导出页面(aa.md 提供),基于 DrissionPage 浏览器自动化操作
ROSTER_URL = "https://hr.37du.co/RedseaPlatform/PtPortal.mc?method=classic#ajax&1&nworktoday-40175-24311-77128-52242&nworktoday-40175-24311|/RedseaPlatform/hrRoster/1116da64-b094-11ea-b588-14187743d052/getCustomCommonList.mc?clickFlag=true&treePermitType=permit&useSealTreeData=0&menuName=%E5%91%98%E5%B7%A5%E8%8A%B1%E5%90%8D%E5%86%8C"
# 花名册自定义导出模板(下拉框中全部模板,后续各业务场景可按需选用)
ROSTER_TEMPLATE_NAME = "员工基础信息" # 默认模板
ROSTER_TEMPLATE_CADRE_SELECT = "干部选拔信息" # 干部选拔
ROSTER_TEMPLATE_INDIVIDUAL_TAX = "个税申报基础信息" # 个税申报
ROSTER_TEMPLATE_EMPLOYER_INSURANCE = "雇主险增减员导出模板" # 雇主险增减员
# ---------- 考勤异常查询接口 ----------
# 获取当前用户信息(用于校验 cookies 有效性,并取得查询考勤异常所需的 userId / rootId(treecode))
GET_CUR_USER_INFO_URL = "https://hr.37du.co/RedseaPlatform/PtUsers.mc?method=getCurUserInfo"
# 分页查询考勤异常(aa.md 提供)
ATTENDANCE_ABNORMAL_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# 考勤异常确认/调整接口(abnormalIds=异常单据id,type=1 表示自动确认)
ATTENDANCE_ADJUST_URL = "https://hr.37du.co/RedseaPlatform/abnormalAdjust/KqCountAbnormal.mc"
# 查询排班接口(aa.md 提供,用于过滤虚假异常)
SHIFT_URL = "https://hr.37du.co/RedseaPlatform/redmagicapi/rf_p_kq_count_SelectBanci/getExecutePageResult.mc"
# 查询请假记录接口(aa.md 提供,用于过滤虚假异常)
LEAVE_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# 查询加班记录接口(aa.md 提供,用于过滤虚假异常)
OVERTIME_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"