feat(ehr): 添加出勤统计报告导出并更新缺勤分析

1. 新增考勤统计报表接口与导出功能,支持全集团逐日出勤数据拉取和Excel导出
2. 重构请休假异常分析逻辑,改用考勤统计报表作为精确数据源替代排班+旷工接口
3. 新增跨月追溯缓存机制,优化大批次员工分析性能
4. 补充缺勤类型统计备注字段,提升分析准确性
This commit is contained in:
2026-08-22 00:58:22 +08:00
parent ce0422979a
commit 39bf3e14a0
13 changed files with 966 additions and 234 deletions
+7
View File
@@ -55,6 +55,13 @@ OVERTIME_URL = "https://hr.37du.co/RedseaPlatform/kqController/getPageAjaxList.m
# 查询打卡记录接口
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