fixes bug #9037
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@74361 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2f37fdd2ff
commit
5f6cdee190
|
@ -64,6 +64,7 @@ public class CasetaPeaje implements Serializable, Comparable<CasetaPeaje>, Clone
|
|||
|
||||
@OneToMany(mappedBy = "pracaPedagioId", cascade=CascadeType.ALL)
|
||||
@LazyCollection(LazyCollectionOption.FALSE)
|
||||
@Where(clause="ACTIVO=1")
|
||||
private List<PrecioFixoPedagio> lsPrecoFixoPedagio;
|
||||
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@ public interface CasetaPeajeService extends GenericService<CasetaPeaje, Integer>
|
|||
public Boolean validarDescricaoCasetaPeaje(CasetaPeaje casetaPeaje);
|
||||
public List<CasetaPeaje> buscarTodosOrdenadoPorDescricao();
|
||||
public void deletarVigencias(List<CasetaPeajeExcepcion> cpes);
|
||||
public CasetaPeaje suscribirOrActualizacion(CasetaPeaje casetaPeaje);
|
||||
}
|
|
@ -86,4 +86,14 @@ public class CasetaPeajeServiceImpl implements CasetaPeajeService {
|
|||
public void deletarVigencias(List<CasetaPeajeExcepcion> cpes) {
|
||||
casetaPeajeDAO.deletarVigencias(cpes);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CasetaPeaje suscribirOrActualizacion(CasetaPeaje casetaPeaje) {
|
||||
if(casetaPeaje.getCasetaPeajeId() == null) {
|
||||
return suscribir(casetaPeaje);
|
||||
} else {
|
||||
return actualizacion(casetaPeaje);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,7 +14,9 @@ import com.rjconsultores.ventaboletos.dao.PrecioFixoPedagioDAO;
|
|||
import com.rjconsultores.ventaboletos.dao.hibernate.PrecioFixoPedagioHibernateDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PrecioFixoPedagio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||
import com.rjconsultores.ventaboletos.service.PrecioFixoPedagioService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -78,7 +80,10 @@ public class PrecioFixoPedagioServiceImpl implements PrecioFixoPedagioService {
|
|||
|
||||
@Transactional
|
||||
public void borrar(PrecioFixoPedagio entidad) {
|
||||
precioFixoPedagioDAO.borrar(entidad);
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(new java.util.Date());
|
||||
entidad.setActivo(false);
|
||||
precioFixoPedagioDAO.actualizacion(entidad);
|
||||
|
||||
}
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue