feat(reports): stabilize on-demand generation, live presence and 1C fallback

This commit is contained in:
2026-09-25 13:00:11 +03:00
parent 2f8cc1bffd
commit 90656944c5
42 changed files with 13410 additions and 6778 deletions
+5 -3
View File
@@ -36,7 +36,9 @@ def get_all_exceptions_from_db() -> Dict[str, List[str]]:
"position_keywords": [],
"include_fio": [],
"turnstile_fio": [],
"turnstile_departments": []
"turnstile_departments": [],
"fligel_fio": [], # ⭐️ Сотрудники с доступом через Флигель (DoorIndex = 23)
"fligel_departments": [] # ⭐️ Отделы с доступом через Флигель
}
with get_connection() as conn:
@@ -56,8 +58,8 @@ def get_all_exceptions_from_db() -> Dict[str, List[str]]:
def add_exception_to_db(category: str, value: str, comment: str = "") -> bool:
init_exceptions_table()
# ФИО очищаем и приводим к нормализованному виду
val_clean = normalize_fio(value) if category in ["fio", "include_fio", "turnstile_fio"] else value.strip()
# Нормализуем ФИО в том числе для реестра флигеля
val_clean = normalize_fio(value) if category in ["fio", "include_fio", "turnstile_fio", "fligel_fio"] else value.strip()
if not val_clean:
return False
with get_connection() as conn: