Diagnóstico y fix SQL Server: SERVERNAME, TDS_Version, Puerto explicitos

This commit is contained in:
desoladorxx
2026-07-22 16:11:54 -05:00
commit cd18c4ca5e
48 changed files with 8389 additions and 0 deletions

28
backend/diag_canal.py Normal file
View File

@@ -0,0 +1,28 @@
# diag_canal.py — Revisa num_indice 1161: pauta en basebi vs conjuntos.
import services as S
NI = "1161"
pm = S._pauta_cruda() # {num_indice: {pauta, estado, contar}}
cp = S._conjunto_pauta() # {pauta: [conjuntos]}
info = pm.get(NI)
print(f"num_indice {NI} en basebi_programacion:", info)
cod = info.get("pauta") if info else None
print(f" -> pauta (cod): {cod!r}")
print(f" -> conjuntos por esa pauta: {cp.get(str(cod).strip()) if cod else '(sin cod)'}")
# Buscar en la matriz esa fila
d = S.leads_dashboard("2026","5","TODOS","TODOS","TODOS")["matriz_cursos"]
for c in d["filas"]:
if str(c["num_indice"]) == NI:
print(f"\nEn la matriz -> pauta={c['pauta']!r} conjuntos={c.get('conjuntos')}")
break
else:
print(f"\n(num_indice {NI} no esta en la matriz de mayo)")
# Buscar en conjunto_pauta si algun conjunto tiene ese nombre TEAC_TRUJILLO_MAY...
print("\nBuscando conjunto 'TEAC_TRUJILLO_MAY' en conjunto_pauta:")
for pauta, cjs in cp.items():
for cj in cjs:
if "TEAC_TRUJILLO_MAY" in str(cj).upper():
print(f" pauta={pauta!r} -> {cj}")