data_processor.py aktualisiert

This commit is contained in:
2025-07-28 11:13:25 +00:00
parent 22af96c375
commit 36e7ac157a

View File

@@ -1511,15 +1511,15 @@ class DataProcessor:
)
# Updates für die drei Zielspalten vorbereiten
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Vorschlag Branche"] + 1)}{row_num}', 'values': [[result.get('branch')]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Branche Konfidenz"] + 1)}{row_num}', 'values': [[result.get('confidence')]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Begruendung Abweichung Branche"] + 1)}{row_num}', 'values': [[result.get('justification')]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Vorschlag Branche"]["index"] + 1)}{row_num}', 'values': [[result.get('branch')]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Branche Konfidenz"]["index"] + 1)}{row_num}', 'values': [[result.get('confidence')]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Begruendung Abweichung Branche"]["index"] + 1)}{row_num}', 'values': [[result.get('justification')]]})
# Auch den Timestamp aktualisieren
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Timestamp letzte Pruefung"] + 1)}{row_num}', 'values': [[now_timestamp]]})
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Timestamp letzte Pruefung"]["index"] + 1)}{row_num}', 'values': [[now_timestamp]]})
except Exception as e:
self.logger.error(f"FEHLER bei Branchen-Neubewertung für Zeile {row_num}: {e}")
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Vorschlag Branche"] + 1)}{row_num}', 'values': [['FEHLER (Prozess)']]} )
all_sheet_updates.append({'range': f'{self.sheet_handler._get_col_letter(COLUMN_MAP["Chat Vorschlag Branche"]["index"] + 1)}{row_num}', 'values': [['FEHLER (Prozess)']]} )
# Batch-Update Logik (vereinfacht, um es hier zu zeigen)
if len(all_sheet_updates) >= 200: # 50 Zeilen * 4 Updates pro Zeile