перед настройкой выгрузки из СКУД, вместо ps1.
This commit is contained in:
@@ -57,19 +57,18 @@ def load_scud_data():
|
||||
val_status = str(row.get(status_col, '')).strip().lower() if status_col else ''
|
||||
val_time = str(row.get(start_col, '')).strip() if start_col else ''
|
||||
|
||||
# Разделение: Слово "Отсутствовал" в СКУД или пустая метка времени = ФИЗИЧЕСКИ НЕ БЫЛО
|
||||
if 'отсутствовал' in val_status or val_time in ['нет входа', 'none', 'nan', '', '00:00']:
|
||||
return False
|
||||
|
||||
# Во всех остальных случаях (есть время прохода) считаем, что человек ФИЗИЧЕСКИ переступил порог
|
||||
return True
|
||||
|
||||
df_scud['Пришел'] = df_scud.apply(is_person_present, axis=1)
|
||||
|
||||
# Отмечаем флаг исключений, но НЕ удаляем сразу
|
||||
df_scud['is_excluded'] = df_scud.apply(
|
||||
lambda r: is_excluded(r.get('Сотрудник', ''), r.get('Подразделение', ''), r.get('Должность', ''), exceptions),
|
||||
axis=1
|
||||
)
|
||||
return df_scud[~df_scud['is_excluded']].copy()
|
||||
return df_scud
|
||||
|
||||
def load_all_data():
|
||||
df_scud = load_scud_data()
|
||||
|
||||
Reference in New Issue
Block a user