Code
public List filtrarConsultaColegiado(Long nIdePadronCol, Long nIdeNumEspecialidad, Long nIdeTipoImpre)throws Exception{
TypedQuery query=em.createQuery("select t from ColDetLogImpresion t "+
"join fetch t.colMaePadron r "+
"join fetch t.catDetCompendioNumEspec s "+
"join fetch t.catDetCompendioTipoImpresion u "+
"join fetch t.catDetCompendioTipoCol v "+
"join fetch t.catDetCompendioTipoEmision w "+
"join fetch t.segMaeUsuarioReg x "+
"where r.nIdePadronCol=:nIdePadronCol and s.nIdeDetalle=:nIdeNumEspecialidad and u.nIdeDetalle=:nIdeTipoImpre "+
"and t.dFecIniVig is not null "+
"and t.nVisualiza =:nVisualiza "+
"and trunc(current_date) between trunc(t.dFecIniVig) and coalesce(trunc(t.dFecFinVig), trunc(current_date)) "+
"order by t.nIdeLogImpre desc ",ColDetLogImpresion.class);
query.setParameter("nIdeNumEspecialidad", nIdeNumEspecialidad);
query.setParameter("nIdePadronCol",nIdePadronCol);
query.setParameter("nIdeTipoImpre",nIdeTipoImpre);
query.setParameter("nVisualiza",Constantes.YES);
Comentarios
Publicar un comentario