feat: 更新3个插件版本并优化XQ0006考勤异常处理逻辑
- XQ0036门店员工起调薪处理:版本升至0.1.6,优化纳税单位解析逻辑,优先使用接口返回值,新增金色印象、金色湖畔、后浪会馆的纳税单位兜底规则 - XQ0047微盟数据导出:版本升至1.0.5,新增等待生成上限配置项,优化轮询超时处理逻辑 - XQ0006 EHR系统周考勤异常处理:版本升至1.4.1,重构推送逻辑,支持组织架构范围选择,新增dws推送通道,优化自动确认范围为整月轻微异常,新增组织架构同步功能
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""纳税单位兜底:优先沿用已显示/花名册值,缺省时按部门全路径中的会馆匹配。"""
|
||||
"""纳税单位解析:优先取接口实时返回值,缺省时再按部门层级兜底。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -7,10 +7,20 @@ from .. import config
|
||||
|
||||
|
||||
def resolve(row: dict, started: dict = None, staff_base: dict = None) -> dict:
|
||||
"""返回 {id, name, source};纳税单位缺失时始终按部门全路径兜底。"""
|
||||
"""返回 {id, name, source}。
|
||||
|
||||
取值优先级:待办行 si_area/si_name(接口实时值)→ 已起薪记录 → 花名册 → 部门层级兜底。
|
||||
待办行是当前组织口径,换店调薪时比已起薪记录里的旧值更准。
|
||||
"""
|
||||
started = started or {}
|
||||
staff_base = staff_base or {}
|
||||
|
||||
unit_id = config.text(row.get("si_area"))
|
||||
if unit_id:
|
||||
return {"id": unit_id,
|
||||
"name": config.text(row.get("si_name")) or config.TAX_UNITS.get(unit_id, ""),
|
||||
"source": "待办(接口)"}
|
||||
|
||||
unit_id = config.text(started.get("taxUnitId"))
|
||||
if unit_id:
|
||||
return {"id": unit_id,
|
||||
@@ -23,8 +33,12 @@ def resolve(row: dict, started: dict = None, staff_base: dict = None) -> dict:
|
||||
"name": config.TAX_UNITS.get(unit_id, ""),
|
||||
"source": "花名册"}
|
||||
|
||||
unit_id, unit_name = config.tax_unit_by_org_path(row.get("ORG_FULL_PATH"))
|
||||
unit_id, unit_name = config.tax_unit_by_org_path(
|
||||
row.get("ORG_FULL_PATH"),
|
||||
post=row.get("POST_ORG_NAME"),
|
||||
brand=config.brand_for_unit(row.get("BELONG_UNIT_ORG_NAME")),
|
||||
)
|
||||
if unit_id:
|
||||
return {"id": unit_id, "name": unit_name, "source": "部门全路径"}
|
||||
return {"id": unit_id, "name": unit_name, "source": "部门层级"}
|
||||
|
||||
return {"id": "", "name": "", "source": "未匹配"}
|
||||
|
||||
Reference in New Issue
Block a user