fixed bug #9685 - Alteração para aceitar a configuração de tipo de passagem normal.
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@73346 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6b29d35e55
commit
2978d27a24
|
@ -8,21 +8,21 @@ import java.io.Serializable;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
|
@ -134,13 +134,13 @@ public class CategoriaCtrl implements Serializable {
|
|||
|
||||
for (CategoriaDescuento cd : lsCategorias) {
|
||||
boolean esVisible = true;
|
||||
for (Integer id : idsCategoriasNoVisible) {
|
||||
if(cd.getCategoria()!=null){
|
||||
if (id.equals(cd.getCategoria().getCategoriaId())) {
|
||||
esVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (Integer id : idsCategoriasNoVisible) {
|
||||
// if(cd.getCategoria()!=null){
|
||||
// if (id.equals(cd.getCategoria().getCategoriaId())) {
|
||||
// esVisible = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (esVisible) {
|
||||
listCategoriasVisibles.add(cd);
|
||||
|
|
|
@ -16,6 +16,8 @@ public interface CategoriaCtrlService {
|
|||
|
||||
public CategoriaCtrl suscribir(CategoriaCtrl entidad);
|
||||
|
||||
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl entidad);
|
||||
|
||||
public CategoriaCtrl actualizacion(CategoriaCtrl entidad);
|
||||
|
||||
public void borrar(CategoriaCtrl entidad);
|
||||
|
|
|
@ -4,6 +4,15 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.CategoriaCtrlDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.CategoriaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.CategoriaClase;
|
||||
|
@ -15,13 +24,6 @@ import com.rjconsultores.ventaboletos.entidad.CategoriaMercado;
|
|||
import com.rjconsultores.ventaboletos.entidad.CategoriaPeriodo;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaCtrlService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -37,10 +39,12 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
|||
@Autowired
|
||||
private CategoriaDAO categoriaDAO;
|
||||
|
||||
@Override
|
||||
public CategoriaCtrl obtenerID(Integer id) {
|
||||
return categoriaCtrlDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CategoriaCtrl suscribir(CategoriaCtrl entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
@ -57,7 +61,8 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
|||
*
|
||||
* @param categoriaCtrl
|
||||
*/
|
||||
private void checarCategoriaAdulto(CategoriaCtrl categoriaCtrl) {
|
||||
@Override
|
||||
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl categoriaCtrl) {
|
||||
boolean existeAdulto = false;
|
||||
List<CategoriaDescuento> lsCategorias = new ArrayList<CategoriaDescuento>();
|
||||
lsCategorias.addAll(categoriaCtrl.getCategoriaDescuentoList());
|
||||
|
@ -72,8 +77,10 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
|||
lsCategorias.add(categoriaDescuentoAdulto);
|
||||
}
|
||||
categoriaCtrl.setCategoriaDescuentoList(lsCategorias);
|
||||
return categoriaCtrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CategoriaCtrl actualizacion(CategoriaCtrl entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
@ -83,6 +90,7 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
|||
return categoriaCtrlDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void borrar(CategoriaCtrl entidad) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue