Redirect 302 redirect from GET @homepage (abc67d)

GET https://demo.appoloatiende.com/home/inicio

Query Metrics

66 Database Queries
13 Different statements
157.72 ms Query time
15 Invalid entities

Queries

Group similar statements

# Time Info
1 4.18 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  91
]
2 0.82 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  37
]
3 0.67 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  79
]
4 5.12 ms
SELECT v0_.id_ventanilla AS id_ventanilla_0, v0_.nombre_ventanilla AS nombre_ventanilla_1, v0_.mac_pc AS mac_pc_2, v0_.direccion_ip AS direccion_ip_3, v0_.activo AS activo_4, v0_.ventanilla_virtual AS ventanilla_virtual_5, v0_.tipo_agendamiento AS tipo_agendamiento_6, v0_.cantidad_tramites_x_cita AS cantidad_tramites_x_cita_7, v0_.ventanilla_masiva AS ventanilla_masiva_8, v0_.cantidad_cupos AS cantidad_cupos_9, v0_.com AS com_10, v0_.cantidad_cupos_extra AS cantidad_cupos_extra_11, v0_.ventanilla_preferencial AS ventanilla_preferencial_12, v0_.id_tramite_transferencia AS id_tramite_transferencia_13, v0_.id_sala AS id_sala_14 FROM ventanilla v0_ INNER JOIN sala s1_ ON v0_.id_sala = s1_.id_sala INNER JOIN sede s2_ ON s1_.id_sede = s2_.id INNER JOIN empresa e3_ ON s2_.id_enterprise = e3_.id_empresa WHERE v0_.activo = true AND s1_.activo = true AND s2_.activo = true AND e3_.activo = true ORDER BY v0_.nombre_ventanilla ASC
Parameters:
[]
5 0.83 ms
SELECT t0.id_sala AS id_sala_1, t0.nombre_sala AS nombre_sala_2, t0.activo AS activo_3, t0.id_sede AS id_sede_4 FROM sala t0 WHERE t0.id_sala = ?
Parameters:
[
  80
]
6 0.83 ms
SELECT t0.id AS id_1, t0.Nombre_sede AS nombre_sede_2, t0.Direccion_sede AS direccion_sede_3, t0.Telefono_sede AS telefono_sede_4, t0.activo AS activo_5, t0.visible_bot AS visible_bot_6, t0.descentralizada AS descentralizada_7, t0.fechainicio AS fechainicio_8, t0.fechafin AS fechafin_9, t0.id_ciudad AS id_ciudad_10, t0.id_enterprise AS id_enterprise_11 FROM sede t0 WHERE t0.id = ?
Parameters:
[
  76
]
7 0.60 ms
SELECT t0.id_empresa AS id_empresa_1, t0.nombre_empresa AS nombre_empresa_2, t0.nit_empresa AS nit_empresa_3, t0.activo AS activo_4, t0.url_empresa AS url_empresa_5, t0.ruta_banner_login AS ruta_banner_login_6, t0.ruta_doc_protocolo_bioseguridad AS ruta_doc_protocolo_bioseguridad_7, t0.ruta_doc_autenticacion_digital AS ruta_doc_autenticacion_digital_8 FROM empresa t0 WHERE t0.id_empresa = ?
Parameters:
[
  1
]
8 0.53 ms
SELECT t0.id_sala AS id_sala_1, t0.nombre_sala AS nombre_sala_2, t0.activo AS activo_3, t0.id_sede AS id_sede_4 FROM sala t0 WHERE t0.id_sala = ?
Parameters:
[
  2
]
9 0.48 ms
SELECT t0.id AS id_1, t0.Nombre_sede AS nombre_sede_2, t0.Direccion_sede AS direccion_sede_3, t0.Telefono_sede AS telefono_sede_4, t0.activo AS activo_5, t0.visible_bot AS visible_bot_6, t0.descentralizada AS descentralizada_7, t0.fechainicio AS fechainicio_8, t0.fechafin AS fechafin_9, t0.id_ciudad AS id_ciudad_10, t0.id_enterprise AS id_enterprise_11 FROM sede t0 WHERE t0.id = ?
Parameters:
[
  2
]
10 0.45 ms
SELECT t0.id_sala AS id_sala_1, t0.nombre_sala AS nombre_sala_2, t0.activo AS activo_3, t0.id_sede AS id_sede_4 FROM sala t0 WHERE t0.id_sala = ?
Parameters:
[
  3
]
11 0.50 ms
SELECT t0.id AS id_1, t0.Nombre_sede AS nombre_sede_2, t0.Direccion_sede AS direccion_sede_3, t0.Telefono_sede AS telefono_sede_4, t0.activo AS activo_5, t0.visible_bot AS visible_bot_6, t0.descentralizada AS descentralizada_7, t0.fechainicio AS fechainicio_8, t0.fechafin AS fechafin_9, t0.id_ciudad AS id_ciudad_10, t0.id_enterprise AS id_enterprise_11 FROM sede t0 WHERE t0.id = ?
Parameters:
[
  3
]
12 0.40 ms
SELECT t0.id_sala AS id_sala_1, t0.nombre_sala AS nombre_sala_2, t0.activo AS activo_3, t0.id_sede AS id_sede_4 FROM sala t0 WHERE t0.id_sala = ?
Parameters:
[
  69
]
13 0.56 ms
SELECT t0.id AS id_1, t0.Nombre_sede AS nombre_sede_2, t0.Direccion_sede AS direccion_sede_3, t0.Telefono_sede AS telefono_sede_4, t0.activo AS activo_5, t0.visible_bot AS visible_bot_6, t0.descentralizada AS descentralizada_7, t0.fechainicio AS fechainicio_8, t0.fechafin AS fechafin_9, t0.id_ciudad AS id_ciudad_10, t0.id_enterprise AS id_enterprise_11 FROM sede t0 WHERE t0.id = ?
Parameters:
[
  64
]
14 2.16 ms
SELECT t0_.id_tramite AS id_tramite_0, t0_.nombre AS nombre_1, t0_.descripcion AS descripcion_2, t0_.activo AS activo_3, t0_.letra_turnero AS letra_turnero_4, t0_.peso_en_franjas AS peso_en_franjas_5, t0_.visible_citas AS visible_citas_6, t0_.multiple AS multiple_7, t0_.validación_citas_placa_identificacion AS validacin_citas_placa_identificacion_8, t0_.turno_preferencial AS turno_preferencial_9, t0_.ver_botones_fin_efectivo_no_efectivo AS ver_botones_fin_efectivo_no_efectivo_10, t0_.posicion AS posicion_11, t0_.ruta_doc_requisitos AS ruta_doc_requisitos_12, t0_.tiempo_alerta AS tiempo_alerta_13, t0_.consecutivo_tramite AS consecutivo_tramite_14, t0_.tipo_documental AS tipo_documental_15, t0_.codigo_categoria AS codigo_categoria_16, t0_.id_enterprise AS id_enterprise_17, t0_.id_tipo_tramite AS id_tipo_tramite_18 FROM tramite t0_ INNER JOIN tramites_x_ventanilla t2_ ON t0_.id_tramite = t2_.tramite_id INNER JOIN ventanilla v1_ ON v1_.id_ventanilla = t2_.ventanilla_id WHERE t0_.activo = true AND t0_.visible_citas = true AND v1_.id_ventanilla IN (?, ?, ?, ?) ORDER BY t0_.posicion ASC
Parameters:
[
  810
  811
  812
  604
]
15 0.96 ms
SELECT t0.id_ventanilla AS id_ventanilla_1, t0.nombre_ventanilla AS nombre_ventanilla_2, t0.mac_pc AS mac_pc_3, t0.direccion_ip AS direccion_ip_4, t0.activo AS activo_5, t0.ventanilla_virtual AS ventanilla_virtual_6, t0.tipo_agendamiento AS tipo_agendamiento_7, t0.cantidad_tramites_x_cita AS cantidad_tramites_x_cita_8, t0.ventanilla_masiva AS ventanilla_masiva_9, t0.cantidad_cupos AS cantidad_cupos_10, t0.com AS com_11, t0.cantidad_cupos_extra AS cantidad_cupos_extra_12, t0.ventanilla_preferencial AS ventanilla_preferencial_13, t0.id_tramite_transferencia AS id_tramite_transferencia_14, t0.id_sala AS id_sala_15 FROM ventanilla t0 INNER JOIN tramites_x_ventanilla ON t0.id_ventanilla = tramites_x_ventanilla.ventanilla_id WHERE tramites_x_ventanilla.tramite_id = ?
Parameters:
[
  125
]
16 0.56 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ?
Parameters:
[
  84
]
17 0.56 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ?
Parameters:
[
  85
]
18 9.74 ms
SELECT ct.id_sede,
                   ct.sede,
                   ct.fecha,
                   ct.cantidad AS cupos_totales,
                   cd.cantidad AS cupos_disponibles
            FROM (
                SELECT sd.id AS id_sede,
                       sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja IN (1, 2, 3, 5)
                  AND txv.tramite_id = :tramiteId
                GROUP BY sd.id, sede, fecha
            ) ct
            JOIN (
                SELECT sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja = 1
                  AND txv.tramite_id = :tramiteId
                GROUP BY sede, fecha
            ) cd ON ct.sede = cd.sede AND ct.fecha = cd.fecha
Parameters:
[
  "fecha" => "2026-07-18"
  "tramiteId" => 125
]
19 1.86 ms
SELECT dh.*
                FROM sede s, sala sl, ventanilla v, tramites_x_ventanilla txv,
                    datos_horario dh, horario_x_ventanilla hv
                WHERE s.id = sl.id_sede
                AND sl.id_sala = v.id_sala
                AND v.id_ventanilla = txv.ventanilla_id
                AND v.id_ventanilla = hv.id_ventanilla
                AND hv.id_horario = dh.id_horario
                AND s.id = :idSite
                AND txv.tramite_id = :idProcedure
                AND dh.activo = true
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
]
20 2.87 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-18"
]
21 2.36 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-19"
]
22 2.81 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-20"
]
23 2.72 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-21"
]
24 2.60 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-22"
]
25 2.76 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-23"
]
26 4.05 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-24"
]
27 4.04 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 64
  "idProcedure" => 125
  "fechaActual" => "2026-07-25"
]
28 0.95 ms
SELECT t0.id_ventanilla AS id_ventanilla_1, t0.nombre_ventanilla AS nombre_ventanilla_2, t0.mac_pc AS mac_pc_3, t0.direccion_ip AS direccion_ip_4, t0.activo AS activo_5, t0.ventanilla_virtual AS ventanilla_virtual_6, t0.tipo_agendamiento AS tipo_agendamiento_7, t0.cantidad_tramites_x_cita AS cantidad_tramites_x_cita_8, t0.ventanilla_masiva AS ventanilla_masiva_9, t0.cantidad_cupos AS cantidad_cupos_10, t0.com AS com_11, t0.cantidad_cupos_extra AS cantidad_cupos_extra_12, t0.ventanilla_preferencial AS ventanilla_preferencial_13, t0.id_tramite_transferencia AS id_tramite_transferencia_14, t0.id_sala AS id_sala_15 FROM ventanilla t0 INNER JOIN tramites_x_ventanilla ON t0.id_ventanilla = tramites_x_ventanilla.ventanilla_id WHERE tramites_x_ventanilla.tramite_id = ?
Parameters:
[
  15
]
29 9.43 ms
SELECT ct.id_sede,
                   ct.sede,
                   ct.fecha,
                   ct.cantidad AS cupos_totales,
                   cd.cantidad AS cupos_disponibles
            FROM (
                SELECT sd.id AS id_sede,
                       sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja IN (1, 2, 3, 5)
                  AND txv.tramite_id = :tramiteId
                GROUP BY sd.id, sede, fecha
            ) ct
            JOIN (
                SELECT sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja = 1
                  AND txv.tramite_id = :tramiteId
                GROUP BY sede, fecha
            ) cd ON ct.sede = cd.sede AND ct.fecha = cd.fecha
Parameters:
[
  "fecha" => "2026-07-18"
  "tramiteId" => 15
]
30 2.48 ms
SELECT dh.*
                FROM sede s, sala sl, ventanilla v, tramites_x_ventanilla txv,
                    datos_horario dh, horario_x_ventanilla hv
                WHERE s.id = sl.id_sede
                AND sl.id_sala = v.id_sala
                AND v.id_ventanilla = txv.ventanilla_id
                AND v.id_ventanilla = hv.id_ventanilla
                AND hv.id_horario = dh.id_horario
                AND s.id = :idSite
                AND txv.tramite_id = :idProcedure
                AND dh.activo = true
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
]
31 2.63 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-18"
]
32 2.72 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-19"
]
33 2.68 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-20"
]
34 2.54 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-21"
]
35 2.39 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-22"
]
36 2.83 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-23"
]
37 2.55 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-24"
]
38 2.43 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 2
  "idProcedure" => 15
  "fechaActual" => "2026-07-25"
]
39 0.76 ms
SELECT t0.id_ventanilla AS id_ventanilla_1, t0.nombre_ventanilla AS nombre_ventanilla_2, t0.mac_pc AS mac_pc_3, t0.direccion_ip AS direccion_ip_4, t0.activo AS activo_5, t0.ventanilla_virtual AS ventanilla_virtual_6, t0.tipo_agendamiento AS tipo_agendamiento_7, t0.cantidad_tramites_x_cita AS cantidad_tramites_x_cita_8, t0.ventanilla_masiva AS ventanilla_masiva_9, t0.cantidad_cupos AS cantidad_cupos_10, t0.com AS com_11, t0.cantidad_cupos_extra AS cantidad_cupos_extra_12, t0.ventanilla_preferencial AS ventanilla_preferencial_13, t0.id_tramite_transferencia AS id_tramite_transferencia_14, t0.id_sala AS id_sala_15 FROM ventanilla t0 INNER JOIN tramites_x_ventanilla ON t0.id_ventanilla = tramites_x_ventanilla.ventanilla_id WHERE tramites_x_ventanilla.tramite_id = ?
Parameters:
[
  122
]
40 5.50 ms
SELECT ct.id_sede,
                   ct.sede,
                   ct.fecha,
                   ct.cantidad AS cupos_totales,
                   cd.cantidad AS cupos_disponibles
            FROM (
                SELECT sd.id AS id_sede,
                       sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja IN (1, 2, 3, 5)
                  AND txv.tramite_id = :tramiteId
                GROUP BY sd.id, sede, fecha
            ) ct
            JOIN (
                SELECT sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja = 1
                  AND txv.tramite_id = :tramiteId
                GROUP BY sede, fecha
            ) cd ON ct.sede = cd.sede AND ct.fecha = cd.fecha
Parameters:
[
  "fecha" => "2026-07-18"
  "tramiteId" => 122
]
41 1.62 ms
SELECT dh.*
                FROM sede s, sala sl, ventanilla v, tramites_x_ventanilla txv,
                    datos_horario dh, horario_x_ventanilla hv
                WHERE s.id = sl.id_sede
                AND sl.id_sala = v.id_sala
                AND v.id_ventanilla = txv.ventanilla_id
                AND v.id_ventanilla = hv.id_ventanilla
                AND hv.id_horario = dh.id_horario
                AND s.id = :idSite
                AND txv.tramite_id = :idProcedure
                AND dh.activo = true
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
]
42 2.75 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-18"
]
43 2.46 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-19"
]
44 2.28 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-20"
]
45 2.47 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-21"
]
46 2.49 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-22"
]
47 2.37 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-23"
]
48 2.23 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-24"
]
49 3.45 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 3
  "idProcedure" => 122
  "fechaActual" => "2026-07-25"
]
50 0.82 ms
SELECT t0.id_ventanilla AS id_ventanilla_1, t0.nombre_ventanilla AS nombre_ventanilla_2, t0.mac_pc AS mac_pc_3, t0.direccion_ip AS direccion_ip_4, t0.activo AS activo_5, t0.ventanilla_virtual AS ventanilla_virtual_6, t0.tipo_agendamiento AS tipo_agendamiento_7, t0.cantidad_tramites_x_cita AS cantidad_tramites_x_cita_8, t0.ventanilla_masiva AS ventanilla_masiva_9, t0.cantidad_cupos AS cantidad_cupos_10, t0.com AS com_11, t0.cantidad_cupos_extra AS cantidad_cupos_extra_12, t0.ventanilla_preferencial AS ventanilla_preferencial_13, t0.id_tramite_transferencia AS id_tramite_transferencia_14, t0.id_sala AS id_sala_15 FROM ventanilla t0 INNER JOIN tramites_x_ventanilla ON t0.id_ventanilla = tramites_x_ventanilla.ventanilla_id WHERE tramites_x_ventanilla.tramite_id = ?
Parameters:
[
  124
]
51 5.66 ms
SELECT ct.id_sede,
                   ct.sede,
                   ct.fecha,
                   ct.cantidad AS cupos_totales,
                   cd.cantidad AS cupos_disponibles
            FROM (
                SELECT sd.id AS id_sede,
                       sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja IN (1, 2, 3, 5)
                  AND txv.tramite_id = :tramiteId
                GROUP BY sd.id, sede, fecha
            ) ct
            JOIN (
                SELECT sd.nombre_sede AS sede,
                       f.fecha_franja AS fecha,
                       COUNT(*) AS cantidad
                FROM franja f
                JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
                JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
                JOIN datos_horario dh ON hv.id_horario = dh.id_horario
                JOIN sala s ON v.id_sala = s.id_sala
                JOIN sede sd ON s.id_sede = sd.id
                JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
                WHERE f.fecha_franja >= :fecha
                  AND f.fecha_franja < CAST(:fecha AS date) + INTERVAL '1 day'
                  AND v.activo = true
                  AND dh.activo = true
                  AND f.id_tipo_estado_franja = 1
                  AND txv.tramite_id = :tramiteId
                GROUP BY sede, fecha
            ) cd ON ct.sede = cd.sede AND ct.fecha = cd.fecha
Parameters:
[
  "fecha" => "2026-07-18"
  "tramiteId" => 124
]
52 1.39 ms
SELECT dh.*
                FROM sede s, sala sl, ventanilla v, tramites_x_ventanilla txv,
                    datos_horario dh, horario_x_ventanilla hv
                WHERE s.id = sl.id_sede
                AND sl.id_sala = v.id_sala
                AND v.id_ventanilla = txv.ventanilla_id
                AND v.id_ventanilla = hv.id_ventanilla
                AND hv.id_horario = dh.id_horario
                AND s.id = :idSite
                AND txv.tramite_id = :idProcedure
                AND dh.activo = true
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
]
53 2.55 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-18"
]
54 2.40 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-19"
]
55 3.88 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-20"
]
56 3.96 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-21"
]
57 4.02 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-22"
]
58 3.97 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-23"
]
59 3.81 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-24"
]
60 3.22 ms
SELECT sd.id AS id_sede,
						sd.nombre_sede AS sede,
						f.id_tipo_estado_franja AS estado,
						COUNT(*) AS cantidad
					FROM franja f
					JOIN ventanilla v ON f.id_ventanilla = v.id_ventanilla
					JOIN horario_x_ventanilla hv ON v.id_ventanilla = hv.id_ventanilla
					JOIN datos_horario dh ON hv.id_horario = dh.id_horario
					JOIN sala s ON v.id_sala = s.id_sala
					JOIN sede sd ON s.id_sede = sd.id
					JOIN tramites_x_ventanilla txv ON v.id_ventanilla = txv.ventanilla_id
					WHERE f.fecha_franja = :fechaActual
					AND v.activo = true
					AND dh.activo = true
					AND txv.tramite_id = :idProcedure
					AND sd.id = :idSite
					AND f.id_tipo_estado_franja IN (1, 2, 3, 4, 5)
					
					GROUP BY sd.id, sede, estado
Parameters:
[
  "idSite" => 76
  "idProcedure" => 124
  "fechaActual" => "2026-07-25"
]
61 1.00 ms
SELECT c0_.id_categoria AS id_categoria_0, c0_.nombre_categoria AS nombre_categoria_1, c0_.activo AS activo_2, c0_.id_empresa AS id_empresa_3 FROM categorias c0_ WHERE c0_.activo = 'S'
Parameters:
[]
62 0.81 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  114
]
63 0.48 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  91
]
64 0.51 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  27
]
65 0.53 ms
SELECT t0.id_parametro AS id_parametro_1, t0.descripcion_parametro AS descripcion_parametro_2, t0.valor AS valor_3, t0.tipo_dato AS tipo_dato_4, t0.cliente AS cliente_5 FROM parametros t0 WHERE t0.id_parametro = ? LIMIT 1
Parameters:
[
  43
]
66 0.66 ms
SELECT t0.id AS id_1, t0.nombre AS nombre_2, t0.boton_principal AS boton_principal_3, t0.boton_tabla AS boton_tabla_4, t0.columna_tabla AS columna_tabla_5, t0.titulo_tabla AS titulo_tabla_6 FROM tema t0 WHERE t0.id = ?
Parameters:
[
  1
]

Database Connections

Name Service
default doctrine.dbal.default_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Entities Mapping

Class Mapping errors
App\Entity\Parameter No errors.
App\Entity\ProcedureWindow
  • The mappings App\Entity\ProcedureWindow#schedule and App\Entity\Schedule#procedureWindow are inconsistent with each other.
App\Entity\Interval
  • The association App\Entity\Interval#templateInterval refers to the inverse side field App\Entity\TemplateInterval#interval which does not exist.
App\Entity\Schedule
  • The mappings App\Entity\Schedule#specialDate and App\Entity\SpecialDate#schedule are inconsistent with each other.
  • The association App\Entity\Schedule#procedureWindow refers to the inverse side field App\Entity\ProcedureWindow#schedules which does not exist.
App\Entity\WaitingRoom No errors.
App\Entity\StateAppointmentWindow No errors.
App\Entity\Procedure
  • The mappings App\Entity\Procedure#enterprise and App\Entity\Enterprise#procedures are inconsistent with each other.
  • The association App\Entity\Procedure#typeProcess refers to the inverse side field App\Entity\TypeProcess#procedures which does not exist.
  • The field App\Entity\Procedure#sites is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Site#procedures does not contain the required 'inversedBy="sites"' attribute.
  • The field App\Entity\Procedure#appointments is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Appointment#procedures does not contain the required 'inversedBy="appointments"' attribute.
  • The field App\Entity\Procedure#procedureWindows is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\ProcedureWindow#procedures does not contain the required 'inversedBy="procedureWindows"' attribute.
  • The field App\Entity\Procedure#ticketDispensers is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\TicketDispenser#enabledProcedures does not contain the required 'inversedBy="ticketDispensers"' attribute.
App\Entity\Intern No errors.
App\Entity\Turn
  • The mappings App\Entity\Turn#citizenTurn and App\Entity\CitizenTurn#turns are inconsistent with each other.
  • The mappings App\Entity\Turn#remember_turns and App\Entity\RememberTurn#turn are inconsistent with each other.
App\Entity\Category
  • The mappings App\Entity\Category#formTemplate and App\Entity\FormTemplate#categories are inconsistent with each other.
  • The field App\Entity\Category#sites is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Site#categories does not contain the required 'inversedBy="sites"' attribute.
App\Entity\Site
  • The mappings App\Entity\Site#city and App\Entity\City#sites are inconsistent with each other.
  • The mappings App\Entity\Site#enterprise and App\Entity\Enterprise#sites are inconsistent with each other.
  • The association App\Entity\Site#waitingRooms refers to the owning side field App\Entity\WaitingRoom#sites which does not exist.
  • The association App\Entity\Site#ticketDispensers refers to the owning side field App\Entity\TicketDispenser#sites which does not exist.
App\Entity\Display No errors.
App\Entity\City
  • The association App\Entity\City#sites refers to the owning side field App\Entity\Site#City which does not exist.
  • The association App\Entity\City#id_Department refers to the inverse side field App\Entity\Department#Cities which does not exist.
App\Entity\Enterprise
  • The association App\Entity\Enterprise#sites refers to the owning side field App\Entity\Site#Enterprise which does not exist.
  • The field App\Entity\Enterprise#videos is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Video#enterprises does not contain the required 'inversedBy="videos"' attribute.
  • The association App\Entity\Enterprise#procedures refers to the owning side field App\Entity\Procedure#Enterprise which does not exist.
  • The field App\Entity\Enterprise#formTemplates is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\FormTemplate#enterprises does not contain the required 'inversedBy="formTemplates"' attribute.
  • The field App\Entity\Enterprise#interns is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Intern#enterprises does not contain the required 'inversedBy="interns"' attribute.
  • The field App\Entity\Enterprise#messages is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Message#enterprises does not contain the required 'inversedBy="messages"' attribute.
  • The field App\Entity\Enterprise#schedule is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Schedule#enterprises does not contain the required 'inversedBy="schedule"' attribute.
App\Entity\TicketDispenser
  • The mappings App\Entity\TicketDispenser#site and App\Entity\Site#ticketDispensers are inconsistent with each other.
  • If association App\Entity\TicketDispenser#site is many-to-one, then the inversed side App\Entity\Site#ticketDispensers has to be one-to-many.
  • If association App\Entity\TicketDispenser#intern is many-to-one, then the inversed side App\Entity\Intern#ticketDispensers has to be one-to-many.
App\Entity\Video
  • The field App\Entity\Video#displays is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Display#videos does not contain the required 'inversedBy="displays"' attribute.
App\Entity\FormTemplate
  • The field App\Entity\FormTemplate#tramite is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Procedure#form does not contain the required 'inversedBy="tramite"' attribute.
  • The field App\Entity\FormTemplate#turnProcedure is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Procedure#turnForm does not contain the required 'inversedBy="turnProcedure"' attribute.
  • The association App\Entity\FormTemplate#categories refers to the owning side field App\Entity\Category#formTemplates which does not exist.
App\Entity\Message
  • The field App\Entity\Message#displays is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\Display#messages does not contain the required 'inversedBy="displays"' attribute.
App\Entity\TypeProcess No errors.
App\Entity\ProceduresOrder No errors.
App\Entity\Appointment
  • The mappings App\Entity\Appointment#passportschedulingRequest and App\Entity\PassportSchedulingRequest#appointment are inconsistent with each other.
App\Entity\ScheduleData
  • The mappings App\Entity\ScheduleData#templateInterval and App\Entity\TemplateInterval#scheduleData are inconsistent with each other.
App\Entity\Theme No errors.