Files
37duAutomation/app/service/hrbp/ehr/common/config.py
T
puddy 8375df692a feat: 新增部门排班查询接口与排班异常校验优化
1. 新增按部门查询排班集合的接口能力,替换原模糊匹配排班名的校验逻辑
2. 新增门店技师序列的排除规则,优化异常判定范围
3. 修复导入统计分页截断问题,完善全量数据抓取逻辑
4. 更新钉钉推送模板与测试账号配置
5. 补全离职电子签流程相关文档
2026-08-31 16:24:25 +08:00

79 lines
4.9 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
# ---------- 银行字典接口 ----------
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天过期,自动重新拉取
# ---------- 员工花名册(自定义导出)页面 ----------
# 花名册自定义导出页面
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=待增减人员"
# 预入职台账(排班异常识别)自定义导出页面(aa.md 提供)
PRE_ENTRY_ROSTER_URL = "https://hr.37du.co/RedseaPlatform/PtPortal.mc?method=classic#ajax&1&nworktoday-40175-24311-01818-07406&nworktoday-40175-24311|/RedseaPlatform/hrRoster/10fe9cd6-b094-11ea-b588-14187743d052/getCustomCommonList.mc?_t=1787581570094&clickFlag=true&treePermitType=permit&useSealTreeData=0&menuName=预入职台账&_t=1787581570094"
# 调动台账(排班异常识别)自定义导出页面(aa.md 提供)
TRANSFER_ROSTER_URL = "https://hr.37du.co/RedseaPlatform/PtPortal.mc?method=classic#ajax&1&nworktoday-40175-24311-01818-39687&nworktoday-40175-24311|/RedseaPlatform/hrRoster/1123d951-b094-11ea-b588-14187743d052/getCustomCommonList.mc?clickFlag=true&treePermitType=permit&useSealTreeData=0&menuName=%E8%B0%83%E5%8A%A8%E5%8F%B0%E8%B4%A6"
# 花名册自定义导出模板(下拉框中全部模板,后续各业务场景可按需选用)
ROSTER_TEMPLATE_NAME = "员工基础信息" # 默认模板
ROSTER_TEMPLATE_CADRE_SELECT = "干部选拔信息" # 干部选拔
ROSTER_TEMPLATE_INDIVIDUAL_TAX = "个税申报基础信息" # 个税申报
ROSTER_TEMPLATE_EMPLOYER_INSURANCE = "雇主险增减员导出模板" # 雇主险增减员
ROSTER_TEMPLATE_SHIFT_ABNORMAL = "排班异常识别导出" # 排班异常识别(预入职台账)
# ---------- 考勤异常查询接口 ----------
# 获取当前用户信息(用于校验 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"
# 查询排班接口
SHIFT_URL = "https://hr.37du.co/RedseaPlatform/redmagicapi/rf_p_kq_count_SelectBanci/getExecutePageResult.mc"
# 按部门查询排班集合接口(aa.md 提供):org_name=部门名,返回该部门全部排班
# (data.list 记录含 work_date_name 排班名、org_name 部门名,逐条记录 = 一个排班)
WORK_DATE_QUERY_URL = "https://hr.37du.co/RedseaPlatform/redmagicapi/rf_s_kq_work_date_query/redApiExec.mc"
# 查询请假记录接口
LEAVE_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# 查询加班记录接口
OVERTIME_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# 查询打卡记录接口
KQ_DATA_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.mc"
# ---------- 考勤统计报表(逐日出勤,aa.md 提供) ----------
# 分页查询"考勤统计报表",每人一行含 v_1~v_最后一天(当月逐日出勤状态),返回 JSON
MONTH_ATT_REPORT_URL = "https://hr.37du.co/RedseaPlatform/pt/report/excel/detail/getPageAjax.mc"
MONTH_ATT_REPORT_ID = "f880c52a619446e0b74e3820b898d53b"
# 集团根组织 struId(aa.md 中 struId / belongUnitStruId / ds1.struId / ds2.stru_id 共用)
COMPANY_STRU_ID = "596bae33-50e9-11ec-b526-822ff8ed5b28"
# 假期类型编码映射已上移到 HR 平台共享层 app/service/hrbp/common/config.py(VACATION_TYPE_MAP),
# 由 ehr / oa 两系统统一引用,避免 oa 反向依赖 ehr。需要时从此处 import:
# from app.service.hrbp.common.config import VACATION_TYPE_MAP