fixed bug #7557
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@58235 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e3d4b54da3
commit
78b3f31ae8
|
@ -3,7 +3,10 @@ package com.rjconsultores.ventaboletos.dao;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeajeVigencia;
|
||||||
|
|
||||||
public interface ExcepcionPeajeDAO extends GenericDAO<ExcepcionPeaje, Integer> {
|
public interface ExcepcionPeajeDAO extends GenericDAO<ExcepcionPeaje, Integer> {
|
||||||
public List<ExcepcionPeaje> buscar(String descconvenio, String cveconvenio);
|
public List<ExcepcionPeaje> buscar(String descconvenio, String cveconvenio);
|
||||||
|
|
||||||
|
public void deletarVigencias(List<ExcepcionPeajeVigencia> epv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.Criteria;
|
import org.hibernate.Criteria;
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.criterion.Order;
|
import org.hibernate.criterion.Order;
|
||||||
|
@ -15,6 +16,7 @@ import org.springframework.stereotype.Repository;
|
||||||
import com.rjconsultores.ventaboletos.dao.ExcepcionPeajeDAO;
|
import com.rjconsultores.ventaboletos.dao.ExcepcionPeajeDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.AbastoCentral;
|
import com.rjconsultores.ventaboletos.entidad.AbastoCentral;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeajeVigencia;
|
||||||
|
|
||||||
@Repository("excepcionPeajeDAO")
|
@Repository("excepcionPeajeDAO")
|
||||||
public class ExcepcionPeajeHibernateDAO extends GenericHibernateDAO<ExcepcionPeaje, Integer>
|
public class ExcepcionPeajeHibernateDAO extends GenericHibernateDAO<ExcepcionPeaje, Integer>
|
||||||
|
@ -50,4 +52,17 @@ implements ExcepcionPeajeDAO {
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deletarVigencias(List<ExcepcionPeajeVigencia> excepcionPeajeVigencias) {
|
||||||
|
|
||||||
|
for (ExcepcionPeajeVigencia epv : excepcionPeajeVigencias) {
|
||||||
|
String hql = " update ExcepcionPeajeVigencia set activo = false, fecModif = :fecModif, usuarioId = :usuarioId where excepcionPeajeVigenciaId = " + epv.getExcepcionPeajeVigenciaId();
|
||||||
|
Query sq = getSession().createQuery(hql);
|
||||||
|
sq.setTimestamp("fecModif", epv.getFecmodif());
|
||||||
|
sq.setInteger("usuarioId", epv.getUsuarioId());
|
||||||
|
sq.executeUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@ package com.rjconsultores.ventaboletos.service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeajeVigencia;
|
||||||
|
|
||||||
public interface ExcepcionPeajeService extends GenericService<ExcepcionPeaje, Integer> {
|
public interface ExcepcionPeajeService extends GenericService<ExcepcionPeaje, Integer> {
|
||||||
|
|
||||||
public List<ExcepcionPeaje> buscar(String descconvenio, String cveconvenio);
|
public List<ExcepcionPeaje> buscar(String descconvenio, String cveconvenio);
|
||||||
|
|
||||||
|
public void deletarVigencias(List<ExcepcionPeajeVigencia> epv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.ExcepcionPeajeDAO;
|
import com.rjconsultores.ventaboletos.dao.ExcepcionPeajeDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeajeVigencia;
|
||||||
import com.rjconsultores.ventaboletos.service.ExcepcionPeajeService;
|
import com.rjconsultores.ventaboletos.service.ExcepcionPeajeService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@ -81,5 +82,10 @@ public class ExcepcionPeajeServiceImpl implements ExcepcionPeajeService {
|
||||||
|
|
||||||
excepcionPeajeDAO.actualizacion(entidad);
|
excepcionPeajeDAO.actualizacion(entidad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deletarVigencias(List<ExcepcionPeajeVigencia> epv) {
|
||||||
|
excepcionPeajeDAO.deletarVigencias(epv);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue