feat(xq0011): 支持检查项选择并增加岗位等核心字段到异常名单
This commit is contained in:
@@ -150,3 +150,35 @@ def set_roster_path(path):
|
||||
|
||||
def get_roster_path():
|
||||
return _roster_path or _default_roster(DEFAULT_SAVE_DIR)
|
||||
|
||||
|
||||
# 排班预处理结果(run() 预处理阶段一次拉取,检查1/2 直接消费,不再各自请求)
|
||||
_earliest_shift_map: dict = {} # 工号 → 检查月最早排班日期(ISO 字符串,检查1 二次入职识别)
|
||||
_staff_team_map: dict = {} # 工号 → 当月出现最多的排班方案名(检查2)
|
||||
|
||||
|
||||
def set_shift_data(earliest_map: dict, staff_team_map: dict):
|
||||
"""注入排班预处理结果(seal_data_export.load_shift_data 产出)。"""
|
||||
global _earliest_shift_map, _staff_team_map
|
||||
_earliest_shift_map = dict(earliest_map or {})
|
||||
_staff_team_map = dict(staff_team_map or {})
|
||||
|
||||
|
||||
def get_shift_data():
|
||||
"""返回 (工号→最早排班日期映射, 工号→排班方案名映射);未预处理时为空 dict。"""
|
||||
return _earliest_shift_map, _staff_team_map
|
||||
|
||||
|
||||
# 预处理封存行缓存(run() 预读一次,检查1~6 复用,避免各自重复读大文件)
|
||||
_seal_rows_cache: list = None
|
||||
|
||||
|
||||
def set_seal_rows(rows: list):
|
||||
"""注入预处理封存行(seal_data_export.load_seal_rows 产出的最终行列表,含剔除)。"""
|
||||
global _seal_rows_cache
|
||||
_seal_rows_cache = rows
|
||||
|
||||
|
||||
def get_seal_rows():
|
||||
"""返回预处理的封存行列表;未预读时返回 None。"""
|
||||
return _seal_rows_cache
|
||||
|
||||
Reference in New Issue
Block a user