✨ Major Features: - Complete RAG system for hotel website analysis - Hybrid audit with BGE-M3 embeddings + Natasha NER - Universal horizontal Excel reports with dashboards - Multi-region processing (SPb, Orel, Chukotka, Kamchatka) 📊 Completed Regions: - Орловская область: 100% (36/36) - Чукотский АО: 100% (4/4) - г. Санкт-Петербург: 93% (893/960) - Камчатский край: 87% (89/102) 🔧 Infrastructure: - PostgreSQL with pgvector extension - BGE-M3 embeddings API - Browserless for web scraping - N8N workflows for automation - S3/Nextcloud file storage 📝 Documentation: - Complete DB schemas - API documentation - Setup guides - Status reports
55 lines
1.5 KiB
Python
55 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
||
"""
|
||
Тестовый скрипт для проверки РКН колонок
|
||
"""
|
||
|
||
import psycopg2
|
||
import json
|
||
from urllib.parse import unquote
|
||
|
||
# Конфигурация БД
|
||
DB_CONFIG = {
|
||
'host': '147.45.189.234',
|
||
'port': 5432,
|
||
'database': 'hotels_db',
|
||
'user': 'gen_user',
|
||
'password': unquote('gen_user%40password')
|
||
}
|
||
|
||
def test_rkn_data():
|
||
"""Тестируем РКН данные"""
|
||
try:
|
||
conn = psycopg2.connect(**DB_CONFIG)
|
||
cursor = conn.cursor()
|
||
|
||
# Получаем данные отеля с РКН
|
||
cursor.execute("""
|
||
SELECT id, full_name, rkn_registry_status, rkn_registry_number, rkn_registry_date
|
||
FROM hotel_main
|
||
WHERE region_name = 'Чукотский автономный округ'
|
||
LIMIT 1
|
||
""")
|
||
|
||
result = cursor.fetchone()
|
||
if result:
|
||
print(f"Отель: {result[1]}")
|
||
print(f"РКН статус: {result[2]}")
|
||
print(f"РКН номер: {result[3]}")
|
||
print(f"РКН дата: {result[4]}")
|
||
|
||
# Проверяем логику
|
||
rkn_status = result[2]
|
||
rkn_in_registry = "ДА" if rkn_status and rkn_status.lower() == 'found' else "НЕТ"
|
||
print(f"Результат: {rkn_in_registry}")
|
||
|
||
cursor.close()
|
||
conn.close()
|
||
|
||
except Exception as e:
|
||
print(f"Ошибка: {e}")
|
||
|
||
if __name__ == "__main__":
|
||
test_rkn_data()
|
||
|
||
|