refactor: 重构雇主险业务,适配多类别拆分与影刀脚本整合

1.  重构ehr/common/config.py与employer_insurance/config.py,新增多类别配置与工具函数
2.  重写employer_insurance.py,支持按类别调度处理
3.  新增影刀共享模块与业务脚本,统一RPA开发规范
4.  移除旧版冗余的影刀脚本文件
This commit is contained in:
2026-08-19 11:30:23 +08:00
parent e32ea50e5d
commit bb35410153
23 changed files with 3692 additions and 2131 deletions
+10 -7
View File
@@ -15,14 +15,17 @@ WAGE_CARD_URL = "https://hr.37du.co/RedseaPlatform/getPageAjax/HrStaffWageCard.m
# 单页最大抓取条数
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_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=员工花名册"
# 待增减人员操作页面
ADD_SUB_URL = "https://hr.37du.co/RedseaPlatform/PtPortal.mc?method=classic#ajax&1&nworktoday-40175-13664-23874-98879&nworktoday-40175-13664|/RedseaPlatform/hrRoster/7984ae1a-16ec-11ed-bea9-822ff8ed5b28/getCustomCommonList.mc?menuName=待增减人员"
# 花名册自定义导出模板(下拉框中全部模板,后续各业务场景可按需选用)
ROSTER_TEMPLATE_NAME = "员工基础信息" # 默认模板
@@ -40,16 +43,16 @@ ATTENDANCE_ABNORMAL_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPag
# 考勤异常确认/调整接口(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"
# 查询打卡记录接口(aa.md 提供,sqlId=kq_data_query,按 base_code 工号查原始打卡流水)
# 查询打卡记录接口
KQ_DATA_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# 假期类型编码映射已上移到 HR 平台共享层 app/service/hrbp/common/config.py(VACATION_TYPE_MAP),