sincronização com trunk
parent
52dc7cf13b
commit
c1de02c0f9
|
@ -1,7 +1,7 @@
|
||||||
package com.rjconsultores.routing;
|
package com.rjconsultores.routing;
|
||||||
|
|
||||||
import java.sql.SQLFeatureNotSupportedException;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
|
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
|
||||||
|
|
||||||
public class MultipleDataSource extends AbstractRoutingDataSource {
|
public class MultipleDataSource extends AbstractRoutingDataSource {
|
||||||
|
@ -10,7 +10,7 @@ public class MultipleDataSource extends AbstractRoutingDataSource {
|
||||||
return DynamicDataSourceHolder.getRouteKey();
|
return DynamicDataSourceHolder.getRouteKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException{
|
public Logger getParentLogger(){
|
||||||
return null;
|
return Logger.getLogger("MultipleDataSource");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,10 @@ public enum TipoEventoExtra {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TAXA_CONVENIENCIA_SVI";
|
return "TAXA_CONVENIENCIA_SVI";
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
TARIFA_SAFER{
|
||||||
|
public String toString() {
|
||||||
|
return "TARIFA_SAFER";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ public interface ConexionDAO extends GenericDAO<Conexion, Integer> {
|
||||||
*/
|
*/
|
||||||
public void generarConexiones(Integer usuarioId);
|
public void generarConexiones(Integer usuarioId);
|
||||||
|
|
||||||
public List<ConexionVO> buscarConexiones(Integer origenId, Integer destinoId);
|
public List<ConexionVO> buscarConexiones(boolean isBuscaAgrupada, Integer origenId, Integer destinoId);
|
||||||
|
|
||||||
public List<Conexion> buscarPorConexionCtrl(Long conexcionCtrlId);
|
public List<Conexion> buscarPorConexionCtrl(Long conexcionCtrlId);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@ public interface ConexionRutaTramoCtrlDAO extends GenericDAO<ConexionRutaTramoCt
|
||||||
|
|
||||||
public List<Parada> buscarTodasLocalidadesDestinoC(Integer conexionRutaConfId);
|
public List<Parada> buscarTodasLocalidadesDestinoC(Integer conexionRutaConfId);
|
||||||
|
|
||||||
public List<Parada> buscarPorConexionRutaConf(Integer conexionRutaConfId, char tipo);
|
public List<Parada> buscarLocalidadesPorConexionRutaConfAndEixo(Integer conexionRutaConfId, char tipo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ public interface CtrlSerieBPeDAO extends GenericDAO<CtrlSerieBPe, Long> {
|
||||||
|
|
||||||
public Boolean gerarSeqSerieBPe(Integer empresaId, String estado, Integer minvalue) throws RuntimeException;
|
public Boolean gerarSeqSerieBPe(Integer empresaId, String estado, Integer minvalue) throws RuntimeException;
|
||||||
public Integer buscarSequencia(Integer empresaId, String estado);
|
public Integer buscarSequencia(Integer empresaId, String estado);
|
||||||
|
public Integer buscarSerieEmb(Integer empresaId, String estado) throws RuntimeException;
|
||||||
|
|
||||||
public CtrlSerieBPe buscarPorEmpresaEstado(Integer empresaId, Integer estadoId);
|
public CtrlSerieBPe buscarPorEmpresaEstado(Integer empresaId, Integer estadoId);
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.dao;
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.AgrupamentoParada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
@ -56,4 +57,7 @@ public interface ParadaDAO {
|
||||||
public List<Parada> buscarListaPorIds(List<Integer> paradaIds);
|
public List<Parada> buscarListaPorIds(List<Integer> paradaIds);
|
||||||
|
|
||||||
public Parada buscarPorId(Integer paradaId);
|
public Parada buscarPorId(Integer paradaId);
|
||||||
|
|
||||||
|
public List<Parada> buscarPorAgrupamentoParadaId(AgrupamentoParada agrupamentoParada);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,6 @@ public interface SapDAO extends GenericDAO<FechamentoCntcorrente, Long> {
|
||||||
|
|
||||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar);
|
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar);
|
||||||
|
|
||||||
public boolean atualizaFechamento(Long fechamentocntcorrenteId) throws Exception;
|
public boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
|
@ -58,7 +58,7 @@ public class CategoriaDescuentoHibernateDAO
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
|
|
||||||
sql.append(" SELECT coalesce(cd.indnaoaplicatarifaminima, 0) as tarifa ");
|
sql.append(" SELECT cd.indnaoaplicatarifaminima as tarifa ");
|
||||||
sql.append(" from categoria_descuento cd ");
|
sql.append(" from categoria_descuento cd ");
|
||||||
sql.append(" inner join categoria_ctrl cc ");
|
sql.append(" inner join categoria_ctrl cc ");
|
||||||
sql.append(" on cc.categoriactrl_id = cd.categoriactrl_id ");
|
sql.append(" on cc.categoriactrl_id = cd.categoriactrl_id ");
|
||||||
|
@ -66,6 +66,7 @@ public class CategoriaDescuentoHibernateDAO
|
||||||
sql.append(" and cc.activo = 1 ");
|
sql.append(" and cc.activo = 1 ");
|
||||||
sql.append(" where cd.categoria_id = :categoriaId ");
|
sql.append(" where cd.categoria_id = :categoriaId ");
|
||||||
sql.append(" and cd.activo = 1 ");
|
sql.append(" and cd.activo = 1 ");
|
||||||
|
sql.append(" and cd.indnaoaplicatarifaminima = 1 ");
|
||||||
|
|
||||||
Query query = getSession().createSQLQuery(sql.toString())
|
Query query = getSession().createSQLQuery(sql.toString())
|
||||||
.addScalar("tarifa", BooleanType.INSTANCE);
|
.addScalar("tarifa", BooleanType.INSTANCE);
|
||||||
|
@ -73,8 +74,8 @@ public class CategoriaDescuentoHibernateDAO
|
||||||
query.setParameter("empresaId", empresaId );
|
query.setParameter("empresaId", empresaId );
|
||||||
query.setParameter("categoriaId", categoriaId );
|
query.setParameter("categoriaId", categoriaId );
|
||||||
|
|
||||||
Boolean retorno = (Boolean)query.uniqueResult();
|
List<Boolean> retorno = (List<Boolean>)query.list();
|
||||||
|
|
||||||
return Boolean.FALSE.equals(retorno);
|
return retorno !=null && !retorno.isEmpty() && Boolean.TRUE.equals(retorno.get(0)) ? Boolean.TRUE : Boolean.FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -78,6 +79,9 @@ public class ConexionHibernateDAO extends GenericHibernateDAO<Conexion, Integer>
|
||||||
conexionVO.setGrupo(((BigDecimal) oc[3]).intValue());
|
conexionVO.setGrupo(((BigDecimal) oc[3]).intValue());
|
||||||
conexionVO.setTramoOrigen((String) oc[4]);
|
conexionVO.setTramoOrigen((String) oc[4]);
|
||||||
conexionVO.setTramoDestino((String) oc[5]);
|
conexionVO.setTramoDestino((String) oc[5]);
|
||||||
|
|
||||||
|
conexionVO.setBuscaAgruapada(false);
|
||||||
|
|
||||||
conexionVOs.add(conexionVO);
|
conexionVOs.add(conexionVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,11 +89,85 @@ public class ConexionHibernateDAO extends GenericHibernateDAO<Conexion, Integer>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConexionVO> buscarConexiones(Integer origenId, Integer destinoId) {
|
public List<ConexionVO> buscarConexiones(boolean isBuscaAgrupada, Integer origenId, Integer destinoId) {
|
||||||
|
|
||||||
|
String queryStr = getQueryConexiones(origenId, destinoId);
|
||||||
|
|
||||||
|
Query query = getSession().createSQLQuery(queryStr);
|
||||||
|
List<Object[]> list = query.list();
|
||||||
|
|
||||||
|
List<ConexionVO> vos = new ArrayList<ConexionVO>();
|
||||||
|
for (Object[] o : list) {
|
||||||
|
ConexionVO vo = new ConexionVO();
|
||||||
|
vo.setGrupo(((BigDecimal) o[0]).intValue());
|
||||||
|
vo.setConexionCtrlId(((BigDecimal) o[1]).longValue());
|
||||||
|
vo.setConOrigen((String) o[2]);
|
||||||
|
vo.setConDestino((String) o[3]);
|
||||||
|
vo.setTramoOrigen((String) o[4]);
|
||||||
|
vo.setTramoDestino((String) o[5]);
|
||||||
|
vo.setBuscaAgruapada(isBuscaAgrupada);
|
||||||
|
|
||||||
|
vos.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBuscaAgrupada) {
|
||||||
|
return agruparConexiones(vos);
|
||||||
|
}
|
||||||
|
|
||||||
|
return vos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ConexionVO> agruparConexiones(List<ConexionVO> conexiones) {
|
||||||
|
|
||||||
|
LinkedHashMap<String, List<ConexionVO>> map = new LinkedHashMap<String, List<ConexionVO>>();
|
||||||
|
|
||||||
|
List<ConexionVO> agrpVo = new ArrayList<ConexionVO>();
|
||||||
|
|
||||||
|
String grupoTrecho = null;
|
||||||
|
Integer grupo = null;
|
||||||
|
for (ConexionVO vo : conexiones) {
|
||||||
|
|
||||||
|
if (grupo == null)
|
||||||
|
grupo = vo.getGrupo();
|
||||||
|
|
||||||
|
if (!grupo.equals(vo.getGrupo())) {
|
||||||
|
if (!map.containsKey(grupoTrecho)) {
|
||||||
|
map.put(grupoTrecho, agrpVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
grupo = vo.getGrupo();
|
||||||
|
grupoTrecho = null;
|
||||||
|
agrpVo = new ArrayList<ConexionVO>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grupo.equals(vo.getGrupo())) {
|
||||||
|
|
||||||
|
if (grupoTrecho == null) {
|
||||||
|
grupoTrecho = vo.getTramoOrigen() + ";" + vo.getTramoDestino() + ";";
|
||||||
|
} else {
|
||||||
|
grupoTrecho += vo.getTramoOrigen() + ";" + vo.getTramoDestino() + ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
agrpVo.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ConexionVO> agrupados = new ArrayList<ConexionVO>();
|
||||||
|
for (Map.Entry<String, List<ConexionVO>> entry : map.entrySet()) {
|
||||||
|
agrupados.addAll(entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
return agrupados;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getQueryConexiones(Integer origenId, Integer destinoId) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(" select cc.conexionctrl_id as conexionCtrlId, occ.descparada as conOrigen, dcc.descparada as conDestino, ");
|
sb.append(" select ");
|
||||||
sb.append(" c.numgrupo as grupo, oc.descparada as tramoOrigen, dc.descparada as tramoDestino ");
|
sb.append(" c.numgrupo as grupo, ");
|
||||||
|
sb.append(" cc.conexionctrl_id as conexionCtrlId, occ.descparada as conOrigen, dcc.descparada as conDestino, ");
|
||||||
|
sb.append(" oc.descparada as tramoOrigen, dc.descparada as tramoDestino, c.numsecuencia as numsecuencia ");
|
||||||
sb.append(" from conexion_ctrl cc ");
|
sb.append(" from conexion_ctrl cc ");
|
||||||
sb.append(" inner join conexion_conf conf ");
|
sb.append(" inner join conexion_conf conf ");
|
||||||
sb.append(" on conf.conexionctrl_id = cc.conexionctrl_id, ");
|
sb.append(" on conf.conexionctrl_id = cc.conexionctrl_id, ");
|
||||||
|
@ -105,31 +183,17 @@ public class ConexionHibernateDAO extends GenericHibernateDAO<Conexion, Integer>
|
||||||
sb.append(" and dcc.parada_id = cc.destino_id ");
|
sb.append(" and dcc.parada_id = cc.destino_id ");
|
||||||
sb.append(" and oc.parada_id = c.origen_id ");
|
sb.append(" and oc.parada_id = c.origen_id ");
|
||||||
sb.append(" and dc.parada_id = c.destino_id ");
|
sb.append(" and dc.parada_id = c.destino_id ");
|
||||||
|
|
||||||
if (origenId != null) {
|
if (origenId != null) {
|
||||||
sb.append(" and cc.origen_id = ").append(origenId);
|
sb.append(" and cc.origen_id = ").append(origenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destinoId != null) {
|
if (destinoId != null) {
|
||||||
sb.append(" and cc.destino_id = ").append(destinoId);
|
sb.append(" and cc.destino_id = ").append(destinoId);
|
||||||
}
|
}
|
||||||
sb.append(" order by occ.descparada, dcc.descparada, cc.conexionctrl_id, c.numgrupo, c.numsecuencia, oc.descparada, dc.descparada ");
|
|
||||||
|
|
||||||
Query query = getSession().createSQLQuery(sb.toString());
|
sb.append(" order by conOrigen, conDestino, conexionCtrlId, grupo, numsecuencia, tramoOrigen, tramoDestino ");
|
||||||
List<Object[]> list = query.list();
|
return sb.toString();
|
||||||
|
|
||||||
List<ConexionVO> vos = new ArrayList<ConexionVO>();
|
|
||||||
for (Object[] o : list) {
|
|
||||||
ConexionVO vo = new ConexionVO();
|
|
||||||
vo.setConexionCtrlId(((BigDecimal) o[0]).longValue());
|
|
||||||
vo.setConOrigen((String) o[1]);
|
|
||||||
vo.setConDestino((String) o[2]);
|
|
||||||
vo.setGrupo(((BigDecimal) o[3]).intValue());
|
|
||||||
vo.setTramoOrigen((String) o[4]);
|
|
||||||
vo.setTramoDestino((String) o[5]);
|
|
||||||
|
|
||||||
vos.add(vo);
|
|
||||||
}
|
|
||||||
|
|
||||||
return vos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -116,9 +116,12 @@ public class ConexionRutaTramoCtrlHibernateDAO extends GenericHibernateDAO<Conex
|
||||||
return new ArrayList<Parada>(paradas);
|
return new ArrayList<Parada>(paradas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Busca localidades de acordo com o conexionRutaConfId e pelo eixo informado ('A', 'B', 'C')
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<Parada> buscarPorConexionRutaConf(Integer conexionRutaConfId, char tipo) {
|
public List<Parada> buscarLocalidadesPorConexionRutaConfAndEixo(Integer conexionRutaConfId, char tipo) {
|
||||||
|
|
||||||
String filtro = "";
|
String filtro = "";
|
||||||
String join = "";
|
String join = "";
|
||||||
|
|
|
@ -451,8 +451,25 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
||||||
StringBuffer hql = new StringBuffer();
|
StringBuffer hql = new StringBuffer();
|
||||||
hql.append(" FROM Corrida ");
|
hql.append(" FROM Corrida ");
|
||||||
hql.append(" WHERE id.corridaId = " + id);
|
hql.append(" WHERE id.corridaId = " + id);
|
||||||
|
hql.append(origem != null ? " AND origem.paradaId = :origem " : "");
|
||||||
|
hql.append(destino != null ? " AND destino.paradaId = :destino " : "");
|
||||||
|
hql.append(ruta != null ? " AND ruta.rutaId = :ruta " : "");
|
||||||
|
hql.append(numRuta != null ? " AND ruta.numRuta = :numruta " : "");
|
||||||
|
|
||||||
Query squery = getSession().createQuery(hql.toString());
|
Query squery = getSession().createQuery(hql.toString());
|
||||||
|
|
||||||
|
if (origem != null)
|
||||||
|
squery.setParameter("origem", origem);
|
||||||
|
|
||||||
|
if (destino != null)
|
||||||
|
squery.setParameter("destino", destino);
|
||||||
|
|
||||||
|
if (ruta != null)
|
||||||
|
squery.setParameter("ruta", ruta);
|
||||||
|
|
||||||
|
if (numRuta != null)
|
||||||
|
squery.setParameter("numruta", numRuta.toString());
|
||||||
|
|
||||||
squery.setMaxResults(NumberUtils.INTEGER_ONE);
|
squery.setMaxResults(NumberUtils.INTEGER_ONE);
|
||||||
|
|
||||||
List<Corrida> lsCorridasAux = squery.list();
|
List<Corrida> lsCorridasAux = squery.list();
|
||||||
|
|
|
@ -72,6 +72,33 @@ public class CtrlSerieBPeHibernateDAO extends GenericHibernateDAO<CtrlSerieBPe,
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer buscarSerieEmb(Integer empresaId, String estadoId) throws RuntimeException {
|
||||||
|
|
||||||
|
log.info(String.format("Conferindo sequence empresaId:%s, estado:%s",empresaId,estadoId));
|
||||||
|
|
||||||
|
try {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("select se.serie ");
|
||||||
|
sb.append("from CtrlSerieEmbarcada se ");
|
||||||
|
sb.append("where se.activo = 1 ");
|
||||||
|
sb.append("and se.empresa.empresaId = :empresaId ");
|
||||||
|
sb.append("and se.estado.estadoId = :estadoId ");
|
||||||
|
sb.append(" order by cast(se.serie as integer) DESC ");
|
||||||
|
|
||||||
|
Query qry = getSession().createQuery(sb.toString());
|
||||||
|
qry.setLong("empresaId", empresaId);
|
||||||
|
qry.setString("estadoId", estadoId);
|
||||||
|
qry.setMaxResults(1);
|
||||||
|
Integer serie = Integer.valueOf((String) (qry.uniqueResult() == null ? "1" : qry.uniqueResult()));
|
||||||
|
|
||||||
|
return (serie == 0 ? 1 : serie);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer buscarSequencia(Integer empresaId, String estado) {
|
public Integer buscarSequencia(Integer empresaId, String estado) {
|
||||||
Integer retorno = null;
|
Integer retorno = null;
|
||||||
|
|
||||||
|
@ -121,10 +148,12 @@ public class CtrlSerieBPeHibernateDAO extends GenericHibernateDAO<CtrlSerieBPe,
|
||||||
sb.append("SELECT ctrl ");
|
sb.append("SELECT ctrl ");
|
||||||
sb.append("FROM CtrlSerieBPe ctrl ");
|
sb.append("FROM CtrlSerieBPe ctrl ");
|
||||||
sb.append("WHERE ctrl.activo = 1 AND ctrl.empresa.empresaId = :empresaId AND ctrl.estado.estadoId = :estadoId ");
|
sb.append("WHERE ctrl.activo = 1 AND ctrl.empresa.empresaId = :empresaId AND ctrl.estado.estadoId = :estadoId ");
|
||||||
|
sb.append(" order by cast(ctrl.serie as integer) DESC ");
|
||||||
|
|
||||||
Query qr = getSession().createQuery(sb.toString());
|
Query qr = getSession().createQuery(sb.toString());
|
||||||
qr.setInteger("empresaId", empresaId);
|
qr.setInteger("empresaId", empresaId);
|
||||||
qr.setInteger("estadoId", estadoId);
|
qr.setInteger("estadoId", estadoId);
|
||||||
|
qr.setMaxResults(1);
|
||||||
|
|
||||||
return (CtrlSerieBPe) qr.uniqueResult();
|
return (CtrlSerieBPe) qr.uniqueResult();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.AgrupamentoParada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
@ -163,4 +164,16 @@ public class ParadaHibernateDAO extends GenericHibernateDAO<Parada, Integer> imp
|
||||||
|
|
||||||
return (Parada) c.uniqueResult();
|
return (Parada) c.uniqueResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Parada> buscarPorAgrupamentoParadaId(AgrupamentoParada agrupamentoParada) {
|
||||||
|
if(agrupamentoParada !=null && agrupamentoParada.getAgrupamentoParadaId() !=null) {
|
||||||
|
Criteria c = this.makeCriteria();
|
||||||
|
c.add(Restrictions.eq("agrupamentoParada", agrupamentoParada));
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import com.rjconsultores.ventaboletos.vo.OrgaoConcedente.RelatorioGratuidadeAgep
|
||||||
@Repository("relatorioAgepanDAO")
|
@Repository("relatorioAgepanDAO")
|
||||||
public class RelatorioAgepanHibernateDAO extends HibernateDaoSupport implements RelatorioAgepanDAO {
|
public class RelatorioAgepanHibernateDAO extends HibernateDaoSupport implements RelatorioAgepanDAO {
|
||||||
|
|
||||||
public static int ORGAOCONCEDENTE_ID_AGEPAN = 4;
|
// public static int ORGAOCONCEDENTE_ID_AGEPAN = 4;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public RelatorioAgepanHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
public RelatorioAgepanHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
@ -45,6 +45,8 @@ public class RelatorioAgepanHibernateDAO extends HibernateDaoSupport implements
|
||||||
String tipGratuIds = parametros.get("tipGratuIds").toString();
|
String tipGratuIds = parametros.get("tipGratuIds").toString();
|
||||||
String linhaIds = parametros.get("linhaIds").toString();
|
String linhaIds = parametros.get("linhaIds").toString();
|
||||||
Integer empresa = parametros.get("empresa") != null ? Integer.valueOf(parametros.get("empresa").toString()) : null;
|
Integer empresa = parametros.get("empresa") != null ? Integer.valueOf(parametros.get("empresa").toString()) : null;
|
||||||
|
Integer orgaoConcendenteAgepanId = parametros.get("orgaoConcendenteAgepanId") != null ? Integer.valueOf(parametros.get("orgaoConcendenteAgepanId").toString()) : null;
|
||||||
|
|
||||||
|
|
||||||
String sQuery = getSql(fecInicioVenda, fecFinalVenda, linhaIds, tipGratuIds, empresa);
|
String sQuery = getSql(fecInicioVenda, fecFinalVenda, linhaIds, tipGratuIds, empresa);
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ public class RelatorioAgepanHibernateDAO extends HibernateDaoSupport implements
|
||||||
.setResultTransformer(new AliasToBeanResultTransformer(RelatorioGratuidadeAgepanVO.class));
|
.setResultTransformer(new AliasToBeanResultTransformer(RelatorioGratuidadeAgepanVO.class));
|
||||||
|
|
||||||
|
|
||||||
qr.setParameter("agepanId", ORGAOCONCEDENTE_ID_AGEPAN);
|
qr.setParameter("agepanId", orgaoConcendenteAgepanId);
|
||||||
qr.setParameter("fecInicioVenda", fecInicioVenda);
|
qr.setParameter("fecInicioVenda", fecInicioVenda);
|
||||||
qr.setParameter("fecFinalVenda", fecFinalVenda);
|
qr.setParameter("fecFinalVenda", fecFinalVenda);
|
||||||
if (empresa != null){
|
if (empresa != null){
|
||||||
|
|
|
@ -18,7 +18,6 @@ import org.hibernate.Query;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.transform.AliasToBeanResultTransformer;
|
import org.hibernate.transform.AliasToBeanResultTransformer;
|
||||||
import org.hibernate.type.BooleanType;
|
import org.hibernate.type.BooleanType;
|
||||||
import org.hibernate.type.IntegerType;
|
|
||||||
import org.hibernate.type.LongType;
|
import org.hibernate.type.LongType;
|
||||||
import org.hibernate.type.StringType;
|
import org.hibernate.type.StringType;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -723,7 +722,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
|
|
||||||
Integer idRemessa = Integer.valueOf(tupla[1].toString());
|
Integer idRemessa = Integer.valueOf(tupla[1].toString());
|
||||||
variavel = idRemessa;
|
variavel = idRemessa;
|
||||||
String codEmpresaBanco = tupla[5].toString() + tupla[6].toString();
|
Integer codEmpresaBanco = Integer.valueOf(tupla[5].toString() + tupla[6].toString());
|
||||||
String nomeEmpresa = tupla[4].toString();
|
String nomeEmpresa = tupla[4].toString();
|
||||||
|
|
||||||
if(cabecalhoRemessaItau == null){
|
if(cabecalhoRemessaItau == null){
|
||||||
|
@ -742,7 +741,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
|
|
||||||
arquivoRemessa.addItem(arquivoRemessaItem);
|
arquivoRemessa.addItem(arquivoRemessaItem);
|
||||||
|
|
||||||
}else if(!(cabecalhoRemessaItau.getAgencia().toString() + cabecalhoRemessaItau.getConta().toString()).equals(codEmpresaBanco)){
|
}else if(!(cabecalhoRemessaItau.getAgencia().toString() + cabecalhoRemessaItau.getConta().toString()).equals(codEmpresaBanco.toString())){
|
||||||
cabecalhoRemessaItau = new CabecalhoRemessaItau();
|
cabecalhoRemessaItau = new CabecalhoRemessaItau();
|
||||||
cabecalhoRemessaItau.setNumeroSequencialRemessa(idRemessa);
|
cabecalhoRemessaItau.setNumeroSequencialRemessa(idRemessa);
|
||||||
cabecalhoRemessaItau.setNumeroSequencialRegistro(contador);
|
cabecalhoRemessaItau.setNumeroSequencialRegistro(contador);
|
||||||
|
@ -765,7 +764,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
String []doc = tupla[9].toString().split("-");
|
String []doc = tupla[9].toString().split("-");
|
||||||
|
|
||||||
detalhe.setIdBoletoFechamento(Integer.valueOf(tupla[0].toString()));
|
detalhe.setIdBoletoFechamento(Integer.valueOf(tupla[0].toString()));
|
||||||
detalhe.setNumeroInscricao(Integer.valueOf(codEmpresaBanco));
|
detalhe.setNumeroInscricao(codEmpresaBanco);
|
||||||
detalhe.setAgencia(Integer.valueOf(tupla[5].toString()));
|
detalhe.setAgencia(Integer.valueOf(tupla[5].toString()));
|
||||||
detalhe.setConta(Integer.valueOf(tupla[6].toString()));
|
detalhe.setConta(Integer.valueOf(tupla[6].toString()));
|
||||||
detalhe.setDacConta(Integer.valueOf(tupla[7].toString()));
|
detalhe.setDacConta(Integer.valueOf(tupla[7].toString()));
|
||||||
|
@ -1694,27 +1693,24 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
sb.append(" fb.FECVENCIMENTO, ");
|
sb.append(" fb.FECVENCIMENTO, ");
|
||||||
sb.append(" fb.VALORDOCUMENTO, ");
|
sb.append(" fb.VALORDOCUMENTO, ");
|
||||||
sb.append(" fb.STATUS as status, ");
|
sb.append(" fb.STATUS as status, ");
|
||||||
sb.append(" fb.REMESSA_ID as remessaId, ");
|
sb.append(" fb.REMESSA_ID as remessaid, ");
|
||||||
sb.append(" fb.indboletoquitado as indBoletoQuitado ");
|
sb.append(" fb.indboletoquitado as indBoletoQuitado ");
|
||||||
sb.append(" FROM ");
|
sb.append(" FROM ");
|
||||||
sb.append(" FECHAMENTO_BOLETO fb ");
|
sb.append(" FECHAMENTO_BOLETO fb ");
|
||||||
sb.append(" INNER JOIN FECHAMENTO_CNTCORRENTE fc on fb.FECHAMENTOCNTCORRENTE_ID = fc.FECHAMENTOCNTCORRENTE_ID AND fc.ACTIVO = 1 ");
|
sb.append(" INNER JOIN FECHAMENTO_CNTCORRENTE fc on fb.FECHAMENTOCNTCORRENTE_ID = fc.FECHAMENTOCNTCORRENTE_ID AND fc.ACTIVO = 1 ");
|
||||||
sb.append(" WHERE fb.activo = 1 ");
|
sb.append(" WHERE fb.activo = 1 ");
|
||||||
sb.append(" AND (fb.nossonumero = :nossoNumero ");
|
sb.append(" AND fb.nossonumero = :nossoNumero ");
|
||||||
sb.append(" OR fb.nossonumero like :nossoNumeroComDigito ) ");
|
|
||||||
sb.append(" AND fc.EMPRESA_ID = :empresaId ");
|
sb.append(" AND fc.EMPRESA_ID = :empresaId ");
|
||||||
|
|
||||||
Query query = getSession().createSQLQuery(sb.toString())
|
Query query = getSession().createSQLQuery(sb.toString())
|
||||||
.addScalar("fechamentoboletoId", LongType.INSTANCE)
|
.addScalar("fechamentoboletoId", LongType.INSTANCE)
|
||||||
.addScalar("nossonumero", StringType.INSTANCE)
|
.addScalar("nossonumero", StringType.INSTANCE)
|
||||||
.addScalar("status", StringType.INSTANCE)
|
.addScalar("status", StringType.INSTANCE)
|
||||||
.addScalar("remessaId", IntegerType.INSTANCE)
|
.addScalar("remessaId", LongType.INSTANCE)
|
||||||
.addScalar("indBoletoQuitado", BooleanType.INSTANCE)
|
.addScalar("indBoletoQuitado", BooleanType.INSTANCE)
|
||||||
.setResultTransformer(new AliasToBeanResultTransformer(FechamentoBoleto.class));
|
.setResultTransformer(new AliasToBeanResultTransformer(FechamentoBoleto.class));
|
||||||
|
|
||||||
|
|
||||||
query.setString("nossoNumero", nossoNumero);
|
query.setString("nossoNumero", nossoNumero);
|
||||||
query.setString("nossoNumeroComDigito", nossoNumero+"-_");
|
|
||||||
query.setInteger("empresaId", empresaId);
|
query.setInteger("empresaId", empresaId);
|
||||||
|
|
||||||
FechamentoBoleto retorno = (FechamentoBoleto)query.uniqueResult();
|
FechamentoBoleto retorno = (FechamentoBoleto)query.uniqueResult();
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
setSessionFactory(factory);
|
setSessionFactory(factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar) {
|
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar) {
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!reenviar){
|
if(!reenviar){
|
||||||
sb.append(" AND ( fc.indintegradosap IS NULL OR fc.indintegradosap <> 1) ");
|
sb.append(" AND fc.indintegradosap IS NULL ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" ORDER BY ");
|
sb.append(" ORDER BY ");
|
||||||
|
@ -81,7 +82,8 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
query.setDate("dataAte", DateUtil.normalizarToFecha(dataAte));
|
query.setDate("dataAte", DateUtil.normalizarToFecha(dataAte));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
query.setMaxResults(100);
|
||||||
|
|
||||||
List<Object[]> list = query.list();
|
List<Object[]> list = query.list();
|
||||||
List<FechamentoCntCorrenteVO> retorno = new ArrayList<FechamentoCntCorrenteVO>();
|
List<FechamentoCntCorrenteVO> retorno = new ArrayList<FechamentoCntCorrenteVO>();
|
||||||
|
|
||||||
|
@ -123,7 +125,7 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean atualizaFechamento(Long fechamentocntcorrenteId) throws Exception {
|
public boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
|
||||||
|
|
||||||
if(fechamentocntcorrenteId == null ) {
|
if(fechamentocntcorrenteId == null ) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -135,7 +137,8 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
Statement stmt = con.createStatement();
|
Statement stmt = con.createStatement();
|
||||||
con.setAutoCommit(false);
|
con.setAutoCommit(false);
|
||||||
|
|
||||||
stmt.addBatch("UPDATE FECHAMENTO_CNTCORRENTE SET INDINTEGRADOSAP = 1 WHERE FECHAMENTOCNTCORRENTE_ID = " + fechamentocntcorrenteId);
|
stmt.addBatch("UPDATE FECHAMENTO_CNTCORRENTE SET INDINTEGRADOSAP = "+ status
|
||||||
|
+" WHERE FECHAMENTOCNTCORRENTE_ID = " + fechamentocntcorrenteId);
|
||||||
|
|
||||||
stmt.executeBatch();
|
stmt.executeBatch();
|
||||||
con.commit();
|
con.commit();
|
||||||
|
|
|
@ -17,11 +17,17 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "ALIQUOTAESTADODESTINO_SEQ", sequenceName = "ALIQUOTAESTADODESTINO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "ALIQUOTAESTADODESTINO_SEQ", sequenceName = "ALIQUOTAESTADODESTINO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "ALIQUOTA_ESTADO_DESTINO")
|
@Table(name = "ALIQUOTA_ESTADO_DESTINO")
|
||||||
public class AliquotaEstadoDestino implements Serializable {
|
public class AliquotaEstadoDestino implements Serializable, Auditavel<AliquotaEstadoDestino> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -51,6 +57,11 @@ public class AliquotaEstadoDestino implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private AliquotaEstadoDestino aliquotaEstadoDestinoClone;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object object) {
|
public boolean equals(Object object) {
|
||||||
|
@ -120,4 +131,23 @@ public class AliquotaEstadoDestino implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
aliquotaEstadoDestinoClone = new AliquotaEstadoDestino();
|
||||||
|
aliquotaEstadoDestinoClone = (AliquotaEstadoDestino) this.clone();
|
||||||
|
Hibernate.initialize(aliquotaEstadoDestinoClone.getEmpresaImposto());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AliquotaEstadoDestino getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return aliquotaEstadoDestinoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ import javax.persistence.TemporalType;
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoDescontoBPe;
|
import com.rjconsultores.ventaboletos.enums.TipoDescontoBPe;
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoDescontoMonitrip;
|
import com.rjconsultores.ventaboletos.enums.TipoDescontoMonitrip;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarLista;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -68,6 +70,7 @@ public class Categoria implements Serializable {
|
||||||
private GrupoCategoria grupoCategoria;
|
private GrupoCategoria grupoCategoria;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "categoria", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "categoria", cascade = CascadeType.ALL)
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "Categoria Orgao")
|
||||||
private List<OrgaoConcedente> orgaosConcedentes;
|
private List<OrgaoConcedente> orgaosConcedentes;
|
||||||
|
|
||||||
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
||||||
|
|
|
@ -10,11 +10,19 @@ import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "CategoriaBloqueioImpPosterior", tela = "Alteração Ponto de Venda/Categoria/Bloqueio/ImpPosterior")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "CAT_BLOQ_IMPPOSTERIOR_SEQ", sequenceName = "CAT_BLOQ_IMPPOSTERIOR_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "CAT_BLOQ_IMPPOSTERIOR_SEQ", sequenceName = "CAT_BLOQ_IMPPOSTERIOR_SEQ", allocationSize = 1)
|
||||||
@Table(name = "CATEGORIA_BLOQ_IMPPOSTERIOR")
|
@Table(name = "CATEGORIA_BLOQ_IMPPOSTERIOR")
|
||||||
public class CategoriaBloqueioImpPosterior {
|
public class CategoriaBloqueioImpPosterior implements Auditavel<CategoriaBloqueioImpPosterior> {
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CAT_BLOQ_IMPPOSTERIOR_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CAT_BLOQ_IMPPOSTERIOR_SEQ")
|
||||||
|
@ -26,6 +34,11 @@ public class CategoriaBloqueioImpPosterior {
|
||||||
@ManyToOne()
|
@ManyToOne()
|
||||||
@JoinColumn(name = "CATEGORIA_ID")
|
@JoinColumn(name = "CATEGORIA_ID")
|
||||||
private Categoria categoria;
|
private Categoria categoria;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private CategoriaBloqueioImpPosterior categoriaBloqueioImpPosteriorClone;
|
||||||
|
|
||||||
public Integer getCategoriaBloqueioImpPosteriorId() {
|
public Integer getCategoriaBloqueioImpPosteriorId() {
|
||||||
return categoriaBloqueioImpPosteriorId;
|
return categoriaBloqueioImpPosteriorId;
|
||||||
}
|
}
|
||||||
|
@ -65,4 +78,22 @@ public class CategoriaBloqueioImpPosterior {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
categoriaBloqueioImpPosteriorClone = new CategoriaBloqueioImpPosterior();
|
||||||
|
categoriaBloqueioImpPosteriorClone = (CategoriaBloqueioImpPosterior) this.clone();
|
||||||
|
Hibernate.initialize(categoriaBloqueioImpPosteriorClone.getPuntoventa());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CategoriaBloqueioImpPosterior getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return categoriaBloqueioImpPosteriorClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getCategoriaBloqueioImpPosteriorId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,20 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarEntidade;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "CategoriaOrgao", tela = "Alteração de Categoria Orgao Concedente")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "CATEGORIA_ORGAO_SEQ", sequenceName = "CATEGORIA_ORGAO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "CATEGORIA_ORGAO_SEQ", sequenceName = "CATEGORIA_ORGAO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "CATEGORIA_ORGAO")
|
@Table(name = "CATEGORIA_ORGAO")
|
||||||
public class CategoriaOrgao implements Serializable {
|
public class CategoriaOrgao implements Serializable, Auditavel<CategoriaOrgao> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -36,11 +45,16 @@ public class CategoriaOrgao implements Serializable {
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
@JoinColumn(name = "ORGAOCONCEDENTE_ID", referencedColumnName = "ORGAOCONCEDENTE_ID")
|
@JoinColumn(name = "ORGAOCONCEDENTE_ID", referencedColumnName = "ORGAOCONCEDENTE_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
@AuditarEntidade
|
||||||
private OrgaoConcedente orgao;
|
private OrgaoConcedente orgao;
|
||||||
@JoinColumn(name = "CATEGORIACTRL_ID", referencedColumnName = "CATEGORIACTRL_ID")
|
@JoinColumn(name = "CATEGORIACTRL_ID", referencedColumnName = "CATEGORIACTRL_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private CategoriaCtrl categoriaCtrl;
|
private CategoriaCtrl categoriaCtrl;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private CategoriaOrgao categoriaOrgaoClone;
|
||||||
|
|
||||||
public CategoriaOrgao() {
|
public CategoriaOrgao() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,4 +144,23 @@ public class CategoriaOrgao implements Serializable {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.CategoriaOrgao[categoriaorgaoId=" + categoriaorgaoId + "]";
|
return "com.rjconsultores.ventaboletos.entidad.CategoriaOrgao[categoriaorgaoId=" + categoriaorgaoId + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
categoriaOrgaoClone = new CategoriaOrgao();
|
||||||
|
categoriaOrgaoClone = (CategoriaOrgao) this.clone();
|
||||||
|
Hibernate.initialize(categoriaOrgaoClone.getOrgao());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CategoriaOrgao getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return categoriaOrgaoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getCategoriaorgaoId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ import java.util.List;
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.EnumType;
|
||||||
|
import javax.persistence.Enumerated;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
@ -24,6 +26,9 @@ import javax.persistence.Transient;
|
||||||
|
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TipoClasseServicoBPe;
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TipoDescontoMonitrip;
|
||||||
|
|
||||||
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@ -78,6 +83,10 @@ public class ClaseServicio implements Serializable, Auditavel<ClaseServicio> {
|
||||||
@Column(name = "INDNAOVENDESEGUROOPCIONAL")
|
@Column(name = "INDNAOVENDESEGUROOPCIONAL")
|
||||||
private Boolean indNaoVendeSeguroOpcional;
|
private Boolean indNaoVendeSeguroOpcional;
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(name = "desconto_monitrip")
|
||||||
|
private TipoClasseServicoBPe tipoDescontoMonitrip;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
private ClaseServicio claseServicioClone;
|
private ClaseServicio claseServicioClone;
|
||||||
|
@ -271,4 +280,12 @@ public class ClaseServicio implements Serializable, Auditavel<ClaseServicio> {
|
||||||
this.indNaoVendeSeguroOpcional = indNaoVendeSeguroOpcional;
|
this.indNaoVendeSeguroOpcional = indNaoVendeSeguroOpcional;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TipoClasseServicoBPe getTipoDescontoMonitrip() {
|
||||||
|
return tipoDescontoMonitrip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoDescontoMonitrip(TipoClasseServicoBPe tipoClasseServicoBPe) {
|
||||||
|
this.tipoDescontoMonitrip = tipoClasseServicoBPe;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,15 +17,23 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author vjcor
|
* @author vjcor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "CobrancaAdcPuntoVenta", tela = "Alteração Cobrança de Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "COBRANCA_ADC_SEQ", sequenceName = "COBRANCA_ADC_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "COBRANCA_ADC_SEQ", sequenceName = "COBRANCA_ADC_SEQ", allocationSize = 1)
|
||||||
@Table(name = "COBRANCA_ADC_PUNTO_VENTA")
|
@Table(name = "COBRANCA_ADC_PUNTO_VENTA")
|
||||||
public class CobrancaAdcPuntoVenta implements Serializable {
|
public class CobrancaAdcPuntoVenta implements Serializable, Auditavel<CobrancaAdcPuntoVenta> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -103,6 +111,10 @@ public class CobrancaAdcPuntoVenta implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private CobrancaAdcPuntoVenta cobrancaAdcPuntoVentaClone;
|
||||||
|
|
||||||
private Boolean getBoolean(Boolean valor) {
|
private Boolean getBoolean(Boolean valor) {
|
||||||
return valor == null ? false : valor;
|
return valor == null ? false : valor;
|
||||||
}
|
}
|
||||||
|
@ -315,5 +327,22 @@ public class CobrancaAdcPuntoVenta implements Serializable {
|
||||||
return this.getDescricao();
|
return this.getDescricao();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
cobrancaAdcPuntoVentaClone = new CobrancaAdcPuntoVenta();
|
||||||
|
cobrancaAdcPuntoVentaClone = (CobrancaAdcPuntoVenta) this.clone();
|
||||||
|
Hibernate.initialize(cobrancaAdcPuntoVentaClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CobrancaAdcPuntoVenta getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return cobrancaAdcPuntoVentaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getCobrancaAddPuntoVenta_id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,17 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "CoeficienteTarifa", tela = "Alteração de Coeficiente Tarifario")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "COEFICIENTE_TARIFA_SEQ", sequenceName = "COEFICIENTE_TARIFA_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "COEFICIENTE_TARIFA_SEQ", sequenceName = "COEFICIENTE_TARIFA_SEQ", allocationSize = 1)
|
||||||
@Table(name = "COEFICIENTE_TARIFA")
|
@Table(name = "COEFICIENTE_TARIFA")
|
||||||
public class CoeficienteTarifa implements Serializable {
|
public class CoeficienteTarifa implements Serializable, Auditavel<CoeficienteTarifa> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -38,6 +44,10 @@ public class CoeficienteTarifa implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private CoeficienteTarifa coeficienteTarifaClone;
|
||||||
|
|
||||||
public Integer getCoeficienteId() {
|
public Integer getCoeficienteId() {
|
||||||
return coeficienteId;
|
return coeficienteId;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +96,23 @@ public class CoeficienteTarifa implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CoeficienteTarifa getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return coeficienteTarifaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getCoeficienteId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
coeficienteTarifaClone = new CoeficienteTarifa();
|
||||||
|
coeficienteTarifaClone = (CoeficienteTarifa) this.clone();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return descCoeficiente + " - " + coeficiente;
|
return descCoeficiente + " - " + coeficiente;
|
||||||
|
|
|
@ -341,9 +341,6 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
@Column(name = "INDENVIADADOSAGENCIABPE")
|
@Column(name = "INDENVIADADOSAGENCIABPE")
|
||||||
private Boolean indEnviaDadosAgenciaBpe;
|
private Boolean indEnviaDadosAgenciaBpe;
|
||||||
|
|
||||||
@Column(name = "INDPRECOPORDEMANDA")
|
|
||||||
private Boolean indPrecoPorDemanda;
|
|
||||||
|
|
||||||
@Column(name = "INDRATEIOCOMISSAOGRUPOLINHA")
|
@Column(name = "INDRATEIOCOMISSAOGRUPOLINHA")
|
||||||
private Boolean indRateioComissaoGrupoLinha;
|
private Boolean indRateioComissaoGrupoLinha;
|
||||||
|
|
||||||
|
@ -396,6 +393,16 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
@Column(name = "INDSEGUROOPCIONALW2DIGITAL")
|
@Column(name = "INDSEGUROOPCIONALW2DIGITAL")
|
||||||
private Boolean indSeguroOpcionalW2Digital;
|
private Boolean indSeguroOpcionalW2Digital;
|
||||||
|
|
||||||
|
@Column(name = "INDCHECKINBLOQUEADOREMARCACAO")
|
||||||
|
private Boolean indCheckinBloqueadoRemarcacao;
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "INDAGRUPLOCCONEXAO")
|
||||||
|
private Boolean indAgrupLocConexao;
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "INDLIMITACATEGORIAPORCORRIDA")
|
||||||
|
private Boolean IndLimitaCategoriaPorCorrida;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
|
@ -1287,13 +1294,6 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
this.indEnviaDadosAgenciaBpe = indEnviaDadosAgenciaBpe;
|
this.indEnviaDadosAgenciaBpe = indEnviaDadosAgenciaBpe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getIndPrecoPorDemanda() {
|
|
||||||
return indPrecoPorDemanda == null ? false : indPrecoPorDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIndPrecoPorDemanda(Boolean indPrecoPorDemanda) {
|
|
||||||
this.indPrecoPorDemanda = indPrecoPorDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getIndRateioComissaoGrupoLinha() {
|
public Boolean getIndRateioComissaoGrupoLinha() {
|
||||||
return indRateioComissaoGrupoLinha == null ? false : indRateioComissaoGrupoLinha;
|
return indRateioComissaoGrupoLinha == null ? false : indRateioComissaoGrupoLinha;
|
||||||
|
@ -1471,5 +1471,28 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
this.indSeguroOpcionalW2Digital = indSeguroOpcionalW2Digital;
|
this.indSeguroOpcionalW2Digital = indSeguroOpcionalW2Digital;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndCheckinBloqueadoRemarcacao() {
|
||||||
|
return indCheckinBloqueadoRemarcacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndCheckinBloqueadoRemarcacao(Boolean indCheckinBloqueadoRemarcacao) {
|
||||||
|
this.indCheckinBloqueadoRemarcacao = indCheckinBloqueadoRemarcacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIndAgrupLocConexao() {
|
||||||
|
return indAgrupLocConexao!=null ? indAgrupLocConexao : Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndAgrupLocConexao(Boolean indAgrupLocConexao) {
|
||||||
|
this.indAgrupLocConexao = indAgrupLocConexao;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Boolean getIndLimitaCategoriaPorCorrida() {
|
||||||
|
return IndLimitaCategoriaPorCorrida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndLimitaCategoriaPorCorrida(Boolean indLimitaCategoriaPorCorrida) {
|
||||||
|
IndLimitaCategoriaPorCorrida = indLimitaCategoriaPorCorrida;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,16 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarLista;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "EMPRESA_IMPOSTO_SEQ", sequenceName = "EMPRESA_IMPOSTO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "EMPRESA_IMPOSTO_SEQ", sequenceName = "EMPRESA_IMPOSTO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "EMPRESA_IMPOSTO")
|
@Table(name = "EMPRESA_IMPOSTO")
|
||||||
public class EmpresaImposto implements Serializable {
|
public class EmpresaImposto implements Serializable, Auditavel<EmpresaImposto> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@ -161,9 +166,13 @@ public class EmpresaImposto implements Serializable {
|
||||||
@Column(name = "PORCFECP")
|
@Column(name = "PORCFECP")
|
||||||
private BigDecimal porcFECP;
|
private BigDecimal porcFECP;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private EmpresaImposto empresaImpostoClone;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OneToMany(mappedBy = "empresaImposto", cascade = CascadeType.ALL, orphanRemoval=true)
|
@OneToMany(mappedBy = "empresaImposto", cascade = CascadeType.ALL, orphanRemoval=true)
|
||||||
|
@NaoAuditar
|
||||||
private List<AliquotaEstadoDestino> lsAliquotaEstadoDestino;
|
private List<AliquotaEstadoDestino> lsAliquotaEstadoDestino;
|
||||||
|
|
||||||
|
|
||||||
|
@ -819,4 +828,23 @@ public class EmpresaImposto implements Serializable {
|
||||||
public void setLsAliquotaEstadoDestino(List<AliquotaEstadoDestino> lsAliquotaEstadoDestino) {
|
public void setLsAliquotaEstadoDestino(List<AliquotaEstadoDestino> lsAliquotaEstadoDestino) {
|
||||||
this.lsAliquotaEstadoDestino = lsAliquotaEstadoDestino;
|
this.lsAliquotaEstadoDestino = lsAliquotaEstadoDestino;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
empresaImpostoClone = new EmpresaImposto();
|
||||||
|
empresaImpostoClone = (EmpresaImposto) this.clone();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EmpresaImposto getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return empresaImpostoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getEmpresaImpostoId());
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -234,6 +234,15 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
||||||
@Column(name = "PLATAFORMASERVICOEXTRA")
|
@Column(name = "PLATAFORMASERVICOEXTRA")
|
||||||
private String plataformaServicoExtra;
|
private String plataformaServicoExtra;
|
||||||
|
|
||||||
|
@Column(name = "HORASALIDA_EXTRA")
|
||||||
|
@Temporal(TemporalType.TIME)
|
||||||
|
@AuditarAtributo(pattern = "HH:mm")
|
||||||
|
private Date horasalidaExtra;
|
||||||
|
|
||||||
|
@Column(name = "INDBLOQUEIAWEBAPOSSAIDA")
|
||||||
|
private Boolean indBloqueiaWebAposSaida;
|
||||||
|
|
||||||
|
|
||||||
public enum GerarFeriado {
|
public enum GerarFeriado {
|
||||||
// Declaração dos enum
|
// Declaração dos enum
|
||||||
GERARSEMPRE("GERAR SEMPRE", "S"),
|
GERARSEMPRE("GERAR SEMPRE", "S"),
|
||||||
|
@ -846,4 +855,20 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
||||||
public void setPlataformaServicoExtra(String plataformaServicoExtra) {
|
public void setPlataformaServicoExtra(String plataformaServicoExtra) {
|
||||||
this.plataformaServicoExtra = plataformaServicoExtra;
|
this.plataformaServicoExtra = plataformaServicoExtra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getHorasalidaExtra() {
|
||||||
|
return horasalidaExtra;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHorasalidaExtra(Date horasalidaExtra) {
|
||||||
|
this.horasalidaExtra = horasalidaExtra;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIndBloqueiaWebAposSaida() {
|
||||||
|
return indBloqueiaWebAposSaida == null ? false : indBloqueiaWebAposSaida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndBloqueiaWebAposSaida(Boolean indBloqueiaWebAposSaida) {
|
||||||
|
this.indBloqueiaWebAposSaida = indBloqueiaWebAposSaida;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -14,10 +14,16 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "FechamentoParamptovta", tela = "Alteração de Ponto de Venda/Fechamento Conta Corrente")
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "FECHAMENTO_PARAMPTOVTA")
|
@Table(name = "FECHAMENTO_PARAMPTOVTA")
|
||||||
public class FechamentoParamptovta implements Serializable {
|
public class FechamentoParamptovta implements Serializable, Auditavel<FechamentoParamptovta> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -30,6 +36,9 @@ public class FechamentoParamptovta implements Serializable {
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
private Integer diasemtransito;
|
private Integer diasemtransito;
|
||||||
private String tipopagamento;
|
private String tipopagamento;
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private FechamentoParamptovta fechamentoParamptovtaClone;
|
||||||
|
|
||||||
public FechamentoParamptovta() {
|
public FechamentoParamptovta() {
|
||||||
}
|
}
|
||||||
|
@ -146,7 +155,20 @@ public class FechamentoParamptovta implements Serializable {
|
||||||
this.tipopagamento = tipopagamento;
|
this.tipopagamento = tipopagamento;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
fechamentoParamptovtaClone = new FechamentoParamptovta();
|
||||||
|
fechamentoParamptovtaClone = (FechamentoParamptovta) this.clone();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
public FechamentoParamptovta getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return fechamentoParamptovtaClone;
|
||||||
|
}
|
||||||
|
@Transient
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getFechamentoparamptovtaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,26 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoCarteiraDigital;
|
import com.rjconsultores.ventaboletos.enums.TipoCarteiraDigital;
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "Forma Pagamento", tela = "Forma Pagamento")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "FORMA_PAGO_SEQ", sequenceName = "FORMA_PAGO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "FORMA_PAGO_SEQ", sequenceName = "FORMA_PAGO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "FORMA_PAGO")
|
@Table(name = "FORMA_PAGO")
|
||||||
public class FormaPago implements Serializable {
|
public class FormaPago implements Serializable, Auditavel<FormaPago> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -61,8 +67,10 @@ public class FormaPago implements Serializable {
|
||||||
private String cvePago;
|
private String cvePago;
|
||||||
@Column(name = "IMPFISCAL")
|
@Column(name = "IMPFISCAL")
|
||||||
private Boolean impfiscal;
|
private Boolean impfiscal;
|
||||||
|
@NaoAuditar
|
||||||
@OneToMany(mappedBy = "formaPago")
|
@OneToMany(mappedBy = "formaPago")
|
||||||
private List<ConfigRestriccionPago> configRestriccionPagoList;
|
private List<ConfigRestriccionPago> configRestriccionPagoList;
|
||||||
|
@NaoAuditar
|
||||||
@OneToMany(mappedBy = "formaPago")
|
@OneToMany(mappedBy = "formaPago")
|
||||||
private List<PricingFormapago> pricingFormapagoList;
|
private List<PricingFormapago> pricingFormapagoList;
|
||||||
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
||||||
|
@ -90,6 +98,10 @@ public class FormaPago implements Serializable {
|
||||||
@Column(name = "TIPOEVENTOEXTRA_ID")
|
@Column(name = "TIPOEVENTOEXTRA_ID")
|
||||||
private Long tipoEventoExtraId;
|
private Long tipoEventoExtraId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private FormaPago formaPagoClone;
|
||||||
|
|
||||||
public FormaPago() {
|
public FormaPago() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -312,4 +324,22 @@ public class FormaPago implements Serializable {
|
||||||
public void setTipoEventoExtraId(Long tipoEventoExtraId) {
|
public void setTipoEventoExtraId(Long tipoEventoExtraId) {
|
||||||
this.tipoEventoExtraId = tipoEventoExtraId;
|
this.tipoEventoExtraId = tipoEventoExtraId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FormaPago getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return formaPagoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getFormapagoId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
formaPagoClone = new FormaPago();
|
||||||
|
formaPagoClone = (FormaPago) this.clone();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,15 +21,23 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "FormaPagoDet", tela = "Alteração de Forma Pago Detalhe Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "FORMA_PAGO_DET_SEQ", sequenceName = "FORMA_PAGO_DET_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "FORMA_PAGO_DET_SEQ", sequenceName = "FORMA_PAGO_DET_SEQ", allocationSize = 1)
|
||||||
@Table(name = "FORMA_PAGO_DET")
|
@Table(name = "FORMA_PAGO_DET")
|
||||||
public class FormaPagoDet implements Serializable {
|
public class FormaPagoDet implements Serializable, Auditavel<FormaPagoDet> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -60,6 +68,9 @@ public class FormaPagoDet implements Serializable {
|
||||||
private Boolean indTotalBus;
|
private Boolean indTotalBus;
|
||||||
@Column(name = "INDEMBARCADA")
|
@Column(name = "INDEMBARCADA")
|
||||||
private Boolean indEmbarcada;
|
private Boolean indEmbarcada;
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private FormaPagoDet formaPagoDetClone;
|
||||||
|
|
||||||
public FormaPagoDet() {
|
public FormaPagoDet() {
|
||||||
}
|
}
|
||||||
|
@ -180,4 +191,22 @@ public class FormaPagoDet implements Serializable {
|
||||||
this.indEmbarcada = indEmbarcada;
|
this.indEmbarcada = indEmbarcada;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
formaPagoDetClone = new FormaPagoDet();
|
||||||
|
formaPagoDetClone = (FormaPagoDet) this.clone();
|
||||||
|
Hibernate.initialize(formaPagoDetClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FormaPagoDet getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return formaPagoDetClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getFormapagodetId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,19 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "HistoricoPuntoVenta", tela = "Alteração Ponto de Venda/Historico")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "HIST_PUNTOVENTA_SEQ", sequenceName = "HIST_PUNTOVENTA_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "HIST_PUNTOVENTA_SEQ", sequenceName = "HIST_PUNTOVENTA_SEQ", allocationSize = 1)
|
||||||
@Table(name = "HIST_PUNTOVENTA")
|
@Table(name = "HIST_PUNTOVENTA")
|
||||||
public class HistoricoPuntoVenta implements Serializable {
|
public class HistoricoPuntoVenta implements Serializable, Auditavel<HistoricoPuntoVenta> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -35,6 +43,7 @@ public class HistoricoPuntoVenta implements Serializable {
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date fecBloqueio;
|
private Date fecBloqueio;
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID")
|
||||||
private PuntoVenta puntoVenta;
|
private PuntoVenta puntoVenta;
|
||||||
|
@ -49,6 +58,10 @@ public class HistoricoPuntoVenta implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private HistoricoPuntoVenta historicoPuntoVentaClone;
|
||||||
|
|
||||||
public Integer getHistoricoPuntoVentaId() {
|
public Integer getHistoricoPuntoVentaId() {
|
||||||
return historicoPuntoVentaId;
|
return historicoPuntoVentaId;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +118,24 @@ public class HistoricoPuntoVenta implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
historicoPuntoVentaClone = new HistoricoPuntoVenta();
|
||||||
|
historicoPuntoVentaClone = (HistoricoPuntoVenta) this.clone();
|
||||||
|
Hibernate.initialize(historicoPuntoVentaClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HistoricoPuntoVenta getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return historicoPuntoVentaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getHistoricoPuntoVentaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class OCDParam implements java.io.Serializable {
|
||||||
private Boolean indOcdDinheiro;
|
private Boolean indOcdDinheiro;
|
||||||
private Boolean indtotalbilhete;
|
private Boolean indtotalbilhete;
|
||||||
private Boolean indsempregerarapagar;
|
private Boolean indsempregerarapagar;
|
||||||
|
private Boolean indOCDPorFormadePagamento;
|
||||||
private BigDecimal tiempoLimitePenalizacion;
|
private BigDecimal tiempoLimitePenalizacion;
|
||||||
private List<OCDPtoVtaParam> listOCDPtoVtaParam;
|
private List<OCDPtoVtaParam> listOCDPtoVtaParam;
|
||||||
|
|
||||||
|
@ -224,6 +225,16 @@ public class OCDParam implements java.io.Serializable {
|
||||||
this.tiempoLimitePenalizacion = tiempoLimitePenalizacion;
|
this.tiempoLimitePenalizacion = tiempoLimitePenalizacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "INDOCDFORMAPAGAMENTO")
|
||||||
|
public Boolean getIndOCDPorFormadePagamento() {
|
||||||
|
return indOCDPorFormadePagamento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndOCDPorFormadePagamento(Boolean indOCDPorFormadePagamento) {
|
||||||
|
this.indOCDPorFormadePagamento = indOCDPorFormadePagamento;
|
||||||
|
}
|
||||||
|
|
||||||
public OCDPtoVtaParam addOCDPtoVtaParam(OCDPtoVtaParam ocdPtoVtaParam) {
|
public OCDPtoVtaParam addOCDPtoVtaParam(OCDPtoVtaParam ocdPtoVtaParam) {
|
||||||
OCDPtoVtaParam ocd = new OCDPtoVtaParam();
|
OCDPtoVtaParam ocd = new OCDPtoVtaParam();
|
||||||
ocd.setPuntoventa(ocdPtoVtaParam.getPuntoventa());
|
ocd.setPuntoventa(ocdPtoVtaParam.getPuntoventa());
|
||||||
|
|
|
@ -16,11 +16,19 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "ORGAO_CANCELACION", tela = "Alteração de Orgao Cancelamento")
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "ORGAO_CANCELACION")
|
@Table(name = "ORGAO_CANCELACION")
|
||||||
@SequenceGenerator(name = "ORGAO_CANCELACION_SEQ", sequenceName = "ORGAO_CANCELACION_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "ORGAO_CANCELACION_SEQ", sequenceName = "ORGAO_CANCELACION_SEQ", allocationSize = 1)
|
||||||
public class OrgaoCancelacion implements Serializable {
|
public class OrgaoCancelacion implements Serializable, Auditavel<OrgaoCancelacion> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -109,6 +117,10 @@ public class OrgaoCancelacion implements Serializable {
|
||||||
@Column(name = "INDBLOQUEIOREMARCADO")
|
@Column(name = "INDBLOQUEIOREMARCADO")
|
||||||
private Boolean indBloqueioRemarcado;
|
private Boolean indBloqueioRemarcado;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private OrgaoCancelacion orgaoCancelacionClone;
|
||||||
|
|
||||||
public Integer getOrgaoCancelacionId() {
|
public Integer getOrgaoCancelacionId() {
|
||||||
return orgaoCancelacionId;
|
return orgaoCancelacionId;
|
||||||
}
|
}
|
||||||
|
@ -365,5 +377,21 @@ public class OrgaoCancelacion implements Serializable {
|
||||||
public void setIndBloqueioRemarcado(Boolean indBloqueioRemarcado) {
|
public void setIndBloqueioRemarcado(Boolean indBloqueioRemarcado) {
|
||||||
this.indBloqueioRemarcado = indBloqueioRemarcado;
|
this.indBloqueioRemarcado = indBloqueioRemarcado;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
orgaoCancelacionClone = new OrgaoCancelacion();
|
||||||
|
orgaoCancelacionClone = (OrgaoCancelacion) this.clone();
|
||||||
|
Hibernate.initialize(orgaoCancelacionClone.getOrgao());
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public OrgaoCancelacion getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return orgaoCancelacionClone;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getOrgaoCancelacionId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,23 +20,34 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
import org.apache.commons.lang.BooleanUtils;
|
import org.apache.commons.lang.BooleanUtils;
|
||||||
import org.hibernate.annotations.Where;
|
import org.hibernate.annotations.Where;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarAtributo;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarID;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarLista;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "OrgaoConcedente", tela = "Alteração de Orgao Concedente")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "ORGAO_CONCEDENTE_SEQ", sequenceName = "ORGAO_CONCEDENTE_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "ORGAO_CONCEDENTE_SEQ", sequenceName = "ORGAO_CONCEDENTE_SEQ", allocationSize = 1)
|
||||||
@Table(name = "ORGAO_CONCEDENTE")
|
@Table(name = "ORGAO_CONCEDENTE")
|
||||||
public class OrgaoConcedente implements Serializable {
|
public class OrgaoConcedente implements Serializable, Auditavel<OrgaoConcedente> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
public final static Integer CODIGO_ARTESP = 21;
|
public final static Integer CODIGO_ARTESP = 21;
|
||||||
public final static Integer CODIGO_ANTT = 3;
|
public final static Integer CODIGO_ANTT = 3;
|
||||||
|
@AuditarID
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ORGAO_CONCEDENTE_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ORGAO_CONCEDENTE_SEQ")
|
||||||
@Column(name = "ORGAOCONCEDENTE_ID")
|
@Column(name = "ORGAOCONCEDENTE_ID")
|
||||||
private Integer orgaoConcedenteId;
|
private Integer orgaoConcedenteId;
|
||||||
|
@AuditarAtributo(nome = "DESC ORGAO")
|
||||||
@Column(name = "DESCORGAO")
|
@Column(name = "DESCORGAO")
|
||||||
private String descOrgao;
|
private String descOrgao;
|
||||||
@Column(name = "INDDEFAULTSEGURO")
|
@Column(name = "INDDEFAULTSEGURO")
|
||||||
|
@ -50,14 +61,18 @@ public class OrgaoConcedente implements Serializable {
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "CategoriaOrgao")
|
||||||
@OneToMany(mappedBy = "orgao")
|
@OneToMany(mappedBy = "orgao")
|
||||||
private List<CategoriaOrgao> categoriaOrgaoList;
|
private List<CategoriaOrgao> categoriaOrgaoList;
|
||||||
@Column(name = "INDNOMDOCOBLIGATORIO")
|
@Column(name = "INDNOMDOCOBLIGATORIO")
|
||||||
private Boolean indNomDocObligatorio;
|
private Boolean indNomDocObligatorio;
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "OrgaoCancelacion")
|
||||||
@OneToMany(mappedBy = "orgao")
|
@OneToMany(mappedBy = "orgao")
|
||||||
private List<OrgaoCancelacion> orgaoCancelacionList;
|
private List<OrgaoCancelacion> orgaoCancelacionList;
|
||||||
|
@AuditarAtributo(nome = "INDICE PEDADIO")
|
||||||
@Column(name = "INDICEPEAJE")
|
@Column(name = "INDICEPEAJE")
|
||||||
private BigDecimal indicePeaje;
|
private BigDecimal indicePeaje;
|
||||||
|
@AuditarAtributo(nome = "Idade Idoso")
|
||||||
@Column(name = "IDADE_IDOSO")
|
@Column(name = "IDADE_IDOSO")
|
||||||
private Integer idadeIdoso;
|
private Integer idadeIdoso;
|
||||||
@Column(name = "IDADE_MINIMA")
|
@Column(name = "IDADE_MINIMA")
|
||||||
|
@ -75,8 +90,10 @@ public class OrgaoConcedente implements Serializable {
|
||||||
private Boolean indValDocObligatorioEmbarcada;
|
private Boolean indValDocObligatorioEmbarcada;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL)
|
||||||
|
@NaoAuditar
|
||||||
private List<ClasseIndicePeaje> classesIndicePeaje;
|
private List<ClasseIndicePeaje> classesIndicePeaje;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "OrgaoEmpParam")
|
||||||
@OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL)
|
||||||
@Where(clause = "activo=1")
|
@Where(clause = "activo=1")
|
||||||
private List<OrgaoEmpParam> orgaoEmpParams;
|
private List<OrgaoEmpParam> orgaoEmpParams;
|
||||||
|
@ -93,6 +110,10 @@ public class OrgaoConcedente implements Serializable {
|
||||||
@Column(name = "TAXA_CONVENIENCIA_SVI")
|
@Column(name = "TAXA_CONVENIENCIA_SVI")
|
||||||
private BigDecimal taxaConvenienciaSVI;
|
private BigDecimal taxaConvenienciaSVI;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private OrgaoConcedente orgaoConcedenteClone;
|
||||||
|
|
||||||
public void addParametro(OrgaoCancelacion param) {
|
public void addParametro(OrgaoCancelacion param) {
|
||||||
this.orgaoCancelacionList.add(param);
|
this.orgaoCancelacionList.add(param);
|
||||||
}
|
}
|
||||||
|
@ -329,4 +350,43 @@ public class OrgaoConcedente implements Serializable {
|
||||||
public void setTaxaConvenienciaSVI(BigDecimal taxaConvenienciaSVI) {
|
public void setTaxaConvenienciaSVI(BigDecimal taxaConvenienciaSVI) {
|
||||||
this.taxaConvenienciaSVI = taxaConvenienciaSVI;
|
this.taxaConvenienciaSVI = taxaConvenienciaSVI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
orgaoConcedenteClone = new OrgaoConcedente();
|
||||||
|
orgaoConcedenteClone = (OrgaoConcedente) this.clone();
|
||||||
|
|
||||||
|
if(this.getCategoriaOrgaoList() != null) {
|
||||||
|
List<CategoriaOrgao> lsClones = new ArrayList<CategoriaOrgao>();
|
||||||
|
for (CategoriaOrgao categoriaOrgao : this.getCategoriaOrgaoList()) {
|
||||||
|
if(BooleanUtils.isTrue(categoriaOrgao.getActivo())) {
|
||||||
|
categoriaOrgao.clonar();
|
||||||
|
lsClones.add(categoriaOrgao.getCloneObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
orgaoConcedenteClone.setCategoriaOrgaoList(lsClones);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.getOrgaoCancelacionList() != null) {
|
||||||
|
List<OrgaoCancelacion> lsClones = new ArrayList<OrgaoCancelacion>();
|
||||||
|
for (OrgaoCancelacion orgaoCancelacion : this.getOrgaoCancelacionList()) {
|
||||||
|
if(BooleanUtils.isTrue(orgaoCancelacion.getActivo())) {
|
||||||
|
orgaoCancelacion.clonar();
|
||||||
|
lsClones.add(orgaoCancelacion.getCloneObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
orgaoConcedenteClone.setOrgaoCancelacionList(lsClones);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrgaoConcedente getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return orgaoConcedenteClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getOrgaoConcedenteId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,18 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
@AuditarClasse(nome = "OrgaoEmpParam", tela = "Alteração de Orgao Empresa Parametro")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "ORGAO_EMP_PARAM_SEQ", sequenceName = "ORGAO_EMP_PARAM_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "ORGAO_EMP_PARAM_SEQ", sequenceName = "ORGAO_EMP_PARAM_SEQ", allocationSize = 1)
|
||||||
@Table(name = "ORGAO_EMP_PARAM")
|
@Table(name = "ORGAO_EMP_PARAM")
|
||||||
public class OrgaoEmpParam implements Serializable {
|
public class OrgaoEmpParam implements Serializable, Auditavel<OrgaoEmpParam> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -59,6 +66,10 @@ public class OrgaoEmpParam implements Serializable {
|
||||||
@Column(name = "CODEMPRESAPORORGAO", length=30)
|
@Column(name = "CODEMPRESAPORORGAO", length=30)
|
||||||
private String codEmpresaPorOrgao;
|
private String codEmpresaPorOrgao;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private OrgaoEmpParam orgaoEmpParamClone;
|
||||||
|
|
||||||
public String getCodEmpresaPorOrgao() {
|
public String getCodEmpresaPorOrgao() {
|
||||||
return codEmpresaPorOrgao;
|
return codEmpresaPorOrgao;
|
||||||
}
|
}
|
||||||
|
@ -139,6 +150,23 @@ public class OrgaoEmpParam implements Serializable {
|
||||||
this.indNaoRestringe2ViaBPe = indNaoRestringe2ViaBPe;
|
this.indNaoRestringe2ViaBPe = indNaoRestringe2ViaBPe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
orgaoEmpParamClone = new OrgaoEmpParam();
|
||||||
|
orgaoEmpParamClone = (OrgaoEmpParam) this.clone();
|
||||||
|
Hibernate.initialize(orgaoEmpParamClone.getOrgaoConcedente());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrgaoEmpParam getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return orgaoEmpParamClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getOrgaoempparamId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
|
|
|
@ -107,10 +107,26 @@ public class Parada implements Serializable, Auditavel<Parada> {
|
||||||
@Fetch(value = FetchMode.SUBSELECT)
|
@Fetch(value = FetchMode.SUBSELECT)
|
||||||
private List<ParadaCodOrgaoConcedente> codigosOrgaosConcedentes = new ArrayList<ParadaCodOrgaoConcedente>();
|
private List<ParadaCodOrgaoConcedente> codigosOrgaosConcedentes = new ArrayList<ParadaCodOrgaoConcedente>();
|
||||||
|
|
||||||
|
@Column(name="INDINTEGRACAOW2I")
|
||||||
|
private Boolean indIntegracaoW2i;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
private Parada paradaClone;
|
private Parada paradaClone;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
Boolean isParadaConexaoRutaExcluida;
|
||||||
|
|
||||||
|
|
||||||
|
public Boolean getIsParadaConexaoRutaExcluida() {
|
||||||
|
return isParadaConexaoRutaExcluida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsParadaConexaoRutaExcluida(Boolean isParadaConexaoRutaExcluida) {
|
||||||
|
this.isParadaConexaoRutaExcluida = isParadaConexaoRutaExcluida;
|
||||||
|
}
|
||||||
|
|
||||||
public Parada() {
|
public Parada() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -355,7 +371,13 @@ public class Parada implements Serializable, Auditavel<Parada> {
|
||||||
this.indVisibleInternet = indVisibleInternet;
|
this.indVisibleInternet = indVisibleInternet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndIntegracaoW2i() {
|
||||||
|
return indIntegracaoW2i == null ? false : indIntegracaoW2i;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndIntegracaoW2i(Boolean indIntegracaoW2i) {
|
||||||
|
this.indIntegracaoW2i = indIntegracaoW2i;
|
||||||
|
}
|
||||||
|
|
||||||
public AgrupamentoParada getAgrupamentoParada() {
|
public AgrupamentoParada getAgrupamentoParada() {
|
||||||
return agrupamentoParada;
|
return agrupamentoParada;
|
||||||
|
@ -373,9 +395,6 @@ public class Parada implements Serializable, Auditavel<Parada> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Parada getCloneObject() throws CloneNotSupportedException {
|
public Parada getCloneObject() throws CloneNotSupportedException {
|
||||||
// if(paradaClone == null) {
|
|
||||||
// this.clonar();
|
|
||||||
// }
|
|
||||||
return paradaClone;
|
return paradaClone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,4 +403,9 @@ public class Parada implements Serializable, Auditavel<Parada> {
|
||||||
return String.format("EsquemaAsientoID [%s]", getParadaId());
|
return String.format("EsquemaAsientoID [%s]", getParadaId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object clone() throws CloneNotSupportedException {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,15 +19,23 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Desenvolvimento
|
* @author Desenvolvimento
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "ParamRecoleccion", tela = "Alteração de Param Coleccion Pnoto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PARAM_RECOLECCION_SEQ", sequenceName = "PARAM_RECOLECCION_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PARAM_RECOLECCION_SEQ", sequenceName = "PARAM_RECOLECCION_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PARAM_RECOLECCION")
|
@Table(name = "PARAM_RECOLECCION")
|
||||||
public class ParamRecoleccion implements Serializable {
|
public class ParamRecoleccion implements Serializable, Auditavel<ParamRecoleccion> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -49,6 +57,10 @@ public class ParamRecoleccion implements Serializable {
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoVenta;
|
private PuntoVenta puntoVenta;
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private ParamRecoleccion paramRecoleccionClone;
|
||||||
|
|
||||||
|
|
||||||
public ParamRecoleccion() {
|
public ParamRecoleccion() {
|
||||||
}
|
}
|
||||||
|
@ -137,4 +149,23 @@ public class ParamRecoleccion implements Serializable {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.ParamRecoleccion[paramrecoleccionId=" + paramrecoleccionId + "]";
|
return "com.rjconsultores.ventaboletos.entidad.ParamRecoleccion[paramrecoleccionId=" + paramrecoleccionId + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
paramRecoleccionClone = new ParamRecoleccion();
|
||||||
|
paramRecoleccionClone = (ParamRecoleccion) this.clone();
|
||||||
|
Hibernate.initialize(paramRecoleccionClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParamRecoleccion getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return paramRecoleccionClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getParamrecoleccionId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,23 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author RJ
|
* @author RJ
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtoVtaCheckin", tela = "Alteração de Localidades/Permitidas/Checkin Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_CHECKIN_SEQ", sequenceName = "PTOVTA_CHECKIN_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_CHECKIN_SEQ", sequenceName = "PTOVTA_CHECKIN_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_CHECKIN")
|
@Table(name = "PTOVTA_CHECKIN")
|
||||||
public class PtoVtaCheckin implements Serializable {
|
public class PtoVtaCheckin implements Serializable, Auditavel<PtoVtaCheckin>{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -55,6 +63,10 @@ public class PtoVtaCheckin implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private int usuarioId;
|
private int usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtoVtaCheckin ptoVtaCheckinClone;
|
||||||
|
|
||||||
public PtoVtaCheckin() {
|
public PtoVtaCheckin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,6 +122,24 @@ public class PtoVtaCheckin implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptoVtaCheckinClone = new PtoVtaCheckin();
|
||||||
|
ptoVtaCheckinClone = (PtoVtaCheckin) this.clone();
|
||||||
|
Hibernate.initialize(ptoVtaCheckinClone.getPuntoventaId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtoVtaCheckin getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptoVtaCheckinClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtoVtaCheckinId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
|
|
@ -19,15 +19,23 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author RJ
|
* @author RJ
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtoVtaSeguro", tela = "Alteração de Seguro no Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_SEGURO_SEQ", sequenceName = "PTOVTA_SEGURO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_SEGURO_SEQ", sequenceName = "PTOVTA_SEGURO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_SEGURO")
|
@Table(name = "PTOVTA_SEGURO")
|
||||||
public class PtoVtaSeguro implements Serializable {
|
public class PtoVtaSeguro implements Serializable, Auditavel<PtoVtaSeguro>{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -100,6 +108,10 @@ public class PtoVtaSeguro implements Serializable {
|
||||||
@Column(name = "INDTAXAEMBARQUEEMBARCADA")
|
@Column(name = "INDTAXAEMBARQUEEMBARCADA")
|
||||||
private Boolean indTaxaEmbarqueEmbarcada;
|
private Boolean indTaxaEmbarqueEmbarcada;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtoVtaSeguro ptoVtaSeguroClone;
|
||||||
|
|
||||||
|
|
||||||
public PtoVtaSeguro() {
|
public PtoVtaSeguro() {
|
||||||
}
|
}
|
||||||
|
@ -267,4 +279,24 @@ public class PtoVtaSeguro implements Serializable {
|
||||||
public void setIndTaxaEmbarqueEmbarcada(Boolean indTaxaEmbarqueEmbarcada) {
|
public void setIndTaxaEmbarqueEmbarcada(Boolean indTaxaEmbarqueEmbarcada) {
|
||||||
this.indTaxaEmbarqueEmbarcada = indTaxaEmbarqueEmbarcada;
|
this.indTaxaEmbarqueEmbarcada = indTaxaEmbarqueEmbarcada;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
ptoVtaSeguroClone = new PtoVtaSeguro();
|
||||||
|
ptoVtaSeguroClone = (PtoVtaSeguro) this.clone();
|
||||||
|
Hibernate.initialize(ptoVtaSeguroClone.getPuntoventaId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtoVtaSeguro getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptoVtaSeguroClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtoVtaSeguroId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,22 @@ import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Desenvolvimento
|
* @author Desenvolvimento
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "Alteração Ponto de Venda/Usuario Bancario")
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PTOVTA_USUARIO_BANCARIO")
|
@Table(name = "PTOVTA_USUARIO_BANCARIO")
|
||||||
public class PtoVtaUsuarioBancario implements Serializable {
|
public class PtoVtaUsuarioBancario implements Serializable, Auditavel<PtoVtaUsuarioBancario> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -49,6 +57,10 @@ public class PtoVtaUsuarioBancario implements Serializable {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private UsuarioBancario usuarioBancario;
|
private UsuarioBancario usuarioBancario;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtoVtaUsuarioBancario ptoVtaUsuarioBancarioClone;
|
||||||
|
|
||||||
public PtoVtaUsuarioBancario() {
|
public PtoVtaUsuarioBancario() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +120,24 @@ public class PtoVtaUsuarioBancario implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptoVtaUsuarioBancarioClone = new PtoVtaUsuarioBancario();
|
||||||
|
ptoVtaUsuarioBancarioClone = (PtoVtaUsuarioBancario) this.clone();
|
||||||
|
Hibernate.initialize(ptoVtaUsuarioBancarioClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtoVtaUsuarioBancario getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptoVtaUsuarioBancarioClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaUsuarioBancarioID());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ package com.rjconsultores.ventaboletos.entidad;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
@ -15,22 +16,28 @@ import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
|
||||||
import javax.persistence.NamedQuery;
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaAntecipacomissao", tela = "Alteração Ponto de Venda/Antecipação Comissão")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_ANTECIPACOMISSAO_SEQ", sequenceName = "PTOVTA_ANTECIPACOMISSAO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_ANTECIPACOMISSAO_SEQ", sequenceName = "PTOVTA_ANTECIPACOMISSAO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_ANTECIPACOMISSAO")
|
@Table(name = "PTOVTA_ANTECIPACOMISSAO")
|
||||||
|
|
||||||
public class PtovtaAntecipacomissao implements Serializable {
|
public class PtovtaAntecipacomissao implements Serializable, Auditavel<PtovtaAntecipacomissao>{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -62,6 +69,10 @@ public class PtovtaAntecipacomissao implements Serializable {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoventaId;
|
private PuntoVenta puntoventaId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaAntecipacomissao ptovtaAntecipacomissaoClone;
|
||||||
|
|
||||||
public PtovtaAntecipacomissao() {
|
public PtovtaAntecipacomissao() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +163,24 @@ public class PtovtaAntecipacomissao implements Serializable {
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
ptovtaAntecipacomissaoClone = new PtovtaAntecipacomissao();
|
||||||
|
ptovtaAntecipacomissaoClone = (PtovtaAntecipacomissao) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaAntecipacomissaoClone.getPuntoventaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaAntecipacomissao getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaAntecipacomissaoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaAntecipaComissaoId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object object) {
|
public boolean equals(Object object) {
|
||||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||||
|
|
|
@ -17,16 +17,24 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoAntifraude;
|
import com.rjconsultores.ventaboletos.enums.TipoAntifraude;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Wilian
|
* @author Wilian
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaAntifraude", tela = "Alteração Ponto de Venda/Antifraude")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_ANTIFRAUDE_SEQ", sequenceName = "PTOVTA_ANTIFRAUDE_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_ANTIFRAUDE_SEQ", sequenceName = "PTOVTA_ANTIFRAUDE_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_ANTIFRAUDE")
|
@Table(name = "PTOVTA_ANTIFRAUDE")
|
||||||
public class PtovtaAntifraude implements Serializable {
|
public class PtovtaAntifraude implements Serializable , Auditavel<PtovtaAntifraude> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -61,6 +69,10 @@ public class PtovtaAntifraude implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private int usuarioId;
|
private int usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaAntifraude ptovtaAntifraudeClone;
|
||||||
|
|
||||||
public PtovtaAntifraude() {
|
public PtovtaAntifraude() {
|
||||||
super();
|
super();
|
||||||
this.activo = true;
|
this.activo = true;
|
||||||
|
@ -160,4 +172,23 @@ public class PtovtaAntifraude implements Serializable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaAntifraudeClone = new PtovtaAntifraude();
|
||||||
|
ptovtaAntifraudeClone = (PtovtaAntifraude) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaAntifraudeClone.getPuntoventa());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaAntifraude getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaAntifraudeClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaAntifraudeId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,19 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "PtovtaCatInd", tela = "Alteração de Categoria Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_CAT_IND_SEQ", sequenceName = "PTOVTA_CAT_IND_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_CAT_IND_SEQ", sequenceName = "PTOVTA_CAT_IND_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_CAT_IND")
|
@Table(name = "PTOVTA_CAT_IND")
|
||||||
public class PtovtaCatInd implements Serializable {
|
public class PtovtaCatInd implements Serializable, Auditavel<PtovtaCatInd> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -51,6 +59,10 @@ public class PtovtaCatInd implements Serializable {
|
||||||
@Column(name = "INDEMBARCADA")
|
@Column(name = "INDEMBARCADA")
|
||||||
private Boolean indEmbarcada;
|
private Boolean indEmbarcada;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaCatInd ptovtaCatIndConcedente;
|
||||||
|
|
||||||
public Integer getPtovtaCategoriaId() {
|
public Integer getPtovtaCategoriaId() {
|
||||||
return ptovtaCategoriaId;
|
return ptovtaCategoriaId;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +146,24 @@ public class PtovtaCatInd implements Serializable {
|
||||||
this.indEmbarcada = indEmbarcada;
|
this.indEmbarcada = indEmbarcada;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaCatIndConcedente = new PtovtaCatInd();
|
||||||
|
ptovtaCatIndConcedente = (PtovtaCatInd) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaCatIndConcedente.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public PtovtaCatInd getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaCatIndConcedente;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaCategoriaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
|
|
|
@ -23,17 +23,25 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.BooleanUtils;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.enums.ModeloComissaoImpressaoPosterior;
|
import com.rjconsultores.ventaboletos.enums.ModeloComissaoImpressaoPosterior;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaComissao", tela = "Alteração Ponto Veda/Comissão")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_COMISSAO_SEQ", sequenceName = "PTOVTA_COMISSAO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_COMISSAO_SEQ", sequenceName = "PTOVTA_COMISSAO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_COMISSAO")
|
@Table(name = "PTOVTA_COMISSAO")
|
||||||
public class PtovtaComissao implements Serializable {
|
public class PtovtaComissao implements Serializable, Auditavel<PtovtaComissao> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -163,6 +171,16 @@ public class PtovtaComissao implements Serializable {
|
||||||
@Column(name = "SEGUROOBRIGATORIOBAIXA")
|
@Column(name = "SEGUROOBRIGATORIOBAIXA")
|
||||||
private BigDecimal seguroobrigatorioBaixa;
|
private BigDecimal seguroobrigatorioBaixa;
|
||||||
|
|
||||||
|
@Column(name = "RECARGACELULARALTA")
|
||||||
|
private BigDecimal recargaCelularAlta;
|
||||||
|
|
||||||
|
@Column(name = "RECARGACELULARBAIXA")
|
||||||
|
private BigDecimal recargaCelularBaixa;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaComissao ptovtaComissaoClone;
|
||||||
|
|
||||||
public PtovtaComissao() {
|
public PtovtaComissao() {
|
||||||
super();
|
super();
|
||||||
this.tarifaDev = Boolean.TRUE;
|
this.tarifaDev = Boolean.TRUE;
|
||||||
|
@ -599,4 +617,45 @@ public class PtovtaComissao implements Serializable {
|
||||||
this.seguroobrigatorioBaixa = seguroobrigatorioBaixa;
|
this.seguroobrigatorioBaixa = seguroobrigatorioBaixa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRecargaCelularAlta() {
|
||||||
|
return recargaCelularAlta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecargaCelularAlta(BigDecimal recargaCelularAlta) {
|
||||||
|
this.recargaCelularAlta = recargaCelularAlta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRecargaCelularBaixa() {
|
||||||
|
return recargaCelularBaixa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecargaCelularBaixa(BigDecimal recargaCelularBaixa) {
|
||||||
|
this.recargaCelularBaixa = recargaCelularBaixa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaComissaoClone = new PtovtaComissao();
|
||||||
|
ptovtaComissaoClone = (PtovtaComissao) this.clone();
|
||||||
|
|
||||||
|
if (this.getPuntoventaId() != null) {
|
||||||
|
if (BooleanUtils.isTrue(getPuntoventaId().getActivo())) {
|
||||||
|
getPuntoventaId().clonar();
|
||||||
|
}
|
||||||
|
ptovtaComissaoClone.setPuntoventaId(getPuntoventaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaComissao getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaComissaoClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaComissaoId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,14 +26,21 @@ import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
import javax.persistence.Transient;
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Desenvolvimento
|
* @author Desenvolvimento
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaEmpresa", tela = "Alteração Ponto de Venda/de Empresas/Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_EMPRESA_SEQ", sequenceName = "PTOVTA_EMPRESA_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_EMPRESA_SEQ", sequenceName = "PTOVTA_EMPRESA_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_EMPRESA")
|
@Table(name = "PTOVTA_EMPRESA")
|
||||||
public class PtovtaEmpresa implements Serializable {
|
public class PtovtaEmpresa implements Serializable, Auditavel<PtovtaEmpresa>{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -73,6 +80,7 @@ public class PtovtaEmpresa implements Serializable {
|
||||||
@Column(name = "NUMSITEF")
|
@Column(name = "NUMSITEF")
|
||||||
private String numeroSitef;
|
private String numeroSitef;
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "PTOVTAEMPRESA_ID", referencedColumnName = "PTOVTAEMPRESA_ID")
|
@JoinColumn(name = "PTOVTAEMPRESA_ID", referencedColumnName = "PTOVTAEMPRESA_ID")
|
||||||
private List<PtovtaEmpresaContaBancaria> lsPtovtaEmpresaContaBancaria;
|
private List<PtovtaEmpresaContaBancaria> lsPtovtaEmpresaContaBancaria;
|
||||||
|
@ -84,9 +92,14 @@ public class PtovtaEmpresa implements Serializable {
|
||||||
@Column(name = "INDIMPCOMPCARTAO")
|
@Column(name = "INDIMPCOMPCARTAO")
|
||||||
private Boolean indImpCompCartao;
|
private Boolean indImpCompCartao;
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@Transient
|
@Transient
|
||||||
private List<EmpresaContaBancaria> contasBancaria;
|
private List<EmpresaContaBancaria> contasBancaria;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaEmpresa ptovtaEmpresaClone;
|
||||||
|
|
||||||
public PtovtaEmpresa() {
|
public PtovtaEmpresa() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,6 +251,24 @@ public class PtovtaEmpresa implements Serializable {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaEmpresaClone = new PtovtaEmpresa();
|
||||||
|
ptovtaEmpresaClone = (PtovtaEmpresa) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaEmpresaClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaEmpresa getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaEmpresaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaempresaId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
|
|
|
@ -15,11 +15,19 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "PtovtaEmpresaBloqueada", tela = "Alteração Ponto de Venda/Empresa Bloqueada ")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_EMP_BLOQUEADA_SEQ", sequenceName = "PTOVTA_EMP_BLOQUEADA_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_EMP_BLOQUEADA_SEQ", sequenceName = "PTOVTA_EMP_BLOQUEADA_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_EMP_BLOQUEADA")
|
@Table(name = "PTOVTA_EMP_BLOQUEADA")
|
||||||
public class PtovtaEmpresaBloqueada implements Serializable {
|
public class PtovtaEmpresaBloqueada implements Serializable, Auditavel<PtovtaEmpresaBloqueada> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@ -46,6 +54,10 @@ public class PtovtaEmpresaBloqueada implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaEmpresaBloqueada ptovtaEmpresaBloqueadaClone;
|
||||||
|
|
||||||
public Integer getPtovtaempbloqueadaId() {
|
public Integer getPtovtaempbloqueadaId() {
|
||||||
return ptovtaempbloqueadaId;
|
return ptovtaempbloqueadaId;
|
||||||
}
|
}
|
||||||
|
@ -105,4 +117,22 @@ public class PtovtaEmpresaBloqueada implements Serializable {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaEmpresaBloqueadaClone = new PtovtaEmpresaBloqueada();
|
||||||
|
ptovtaEmpresaBloqueadaClone = (PtovtaEmpresaBloqueada) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaEmpresaBloqueadaClone.getPuntoventaId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaEmpresaBloqueada getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaEmpresaBloqueadaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaempbloqueadaId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -18,22 +15,28 @@ import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
|
||||||
import javax.persistence.NamedQuery;
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "Alteração Estoque Ponto de Venda")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_ESTOQUE_SEQ ", sequenceName = "PTOVTA_ESTOQUE_SEQ ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_ESTOQUE_SEQ ", sequenceName = "PTOVTA_ESTOQUE_SEQ ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_ESTOQUE")
|
@Table(name = "PTOVTA_ESTOQUE")
|
||||||
|
|
||||||
public class PtovtaEstoque implements Serializable {
|
public class PtovtaEstoque implements Serializable, Auditavel<PtovtaEstoque>{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -67,6 +70,10 @@ public class PtovtaEstoque implements Serializable {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoventaId;
|
private PuntoVenta puntoventaId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaEstoque ptovtaEstoqueClone;
|
||||||
|
|
||||||
public PtovtaEstoque() {
|
public PtovtaEstoque() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,4 +222,22 @@ public class PtovtaEstoque implements Serializable {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaEstoque[ ptovtaEstoqueId=" + ptovtaEstoqueId + " ]";
|
return "com.rjconsultores.ventaboletos.entidad.PtovtaEstoque[ ptovtaEstoqueId=" + ptovtaEstoqueId + " ]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaEstoqueClone = new PtovtaEstoque();
|
||||||
|
ptovtaEstoqueClone = (PtovtaEstoque) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaEstoqueClone.getPuntoventaId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaEstoque getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaEstoqueClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaEstoqueId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,22 +15,28 @@ import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
|
||||||
import javax.persistence.NamedQuery;
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaHorario", tela = "Alteração Ponto Venda/Horario")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PTOVTA_HORARIO_SEQ", sequenceName = "PTOVTA_HORARIO_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_HORARIO_SEQ", sequenceName = "PTOVTA_HORARIO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_HORARIO")
|
@Table(name = "PTOVTA_HORARIO")
|
||||||
|
|
||||||
public class PtovtaHorario implements Serializable {
|
public class PtovtaHorario implements Serializable, Auditavel<PtovtaHorario> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -56,10 +62,16 @@ public class PtovtaHorario implements Serializable {
|
||||||
|
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private int usuarioId;
|
private int usuarioId;
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoventaId;
|
private PuntoVenta puntoventaId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaHorario ptovtaHorarioClone;
|
||||||
|
|
||||||
@Column(name = "INDLUNES")
|
@Column(name = "INDLUNES")
|
||||||
private Boolean indlunes;
|
private Boolean indlunes;
|
||||||
@Column(name = "INDMARTES")
|
@Column(name = "INDMARTES")
|
||||||
|
@ -205,6 +217,24 @@ public class PtovtaHorario implements Serializable {
|
||||||
this.inddomingo = inddomingo;
|
this.inddomingo = inddomingo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaHorarioClone = new PtovtaHorario();
|
||||||
|
ptovtaHorarioClone = (PtovtaHorario) this.clone();
|
||||||
|
Hibernate.initialize(ptovtaHorarioClone.getPuntoventaId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaHorario getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaHorarioClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaHorarioId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -15,25 +16,31 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
|
||||||
import javax.persistence.Lob;
|
import javax.persistence.Lob;
|
||||||
import javax.persistence.ManyToOne;
|
|
||||||
import javax.persistence.NamedQueries;
|
|
||||||
import javax.persistence.NamedQuery;
|
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.BooleanUtils;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarAtributo;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarLista;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
|
@AuditarClasse(nome = "PtovtaTitular", tela = "Alteração Ponto Veda/Titular/Foto")
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PTOVTA_TITULAR")
|
@Table(name = "PTOVTA_TITULAR")
|
||||||
@SequenceGenerator(name = "PTOVTA_TITULAR_SEQ ", sequenceName = "PTOVTA_TITULAR_SEQ ", allocationSize = 1)
|
@SequenceGenerator(name = "PTOVTA_TITULAR_SEQ ", sequenceName = "PTOVTA_TITULAR_SEQ ", allocationSize = 1)
|
||||||
public class PtovtaTitular implements Serializable {
|
public class PtovtaTitular implements Serializable, Auditavel<PtovtaTitular> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@ -41,6 +48,7 @@ public class PtovtaTitular implements Serializable {
|
||||||
@Column(name = "PTOVTATITULAR_ID")
|
@Column(name = "PTOVTATITULAR_ID")
|
||||||
private Integer ptovtaTitularId;
|
private Integer ptovtaTitularId;
|
||||||
|
|
||||||
|
@AuditarAtributo(nome = "NOME TITULAR/FOTO")
|
||||||
@Column(name = "NOME")
|
@Column(name = "NOME")
|
||||||
private String nome;
|
private String nome;
|
||||||
|
|
||||||
|
@ -66,9 +74,15 @@ public class PtovtaTitular implements Serializable {
|
||||||
|
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private int usuarioId;
|
private int usuarioId;
|
||||||
|
|
||||||
|
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "titularId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "titularId")
|
||||||
private List<PuntoVenta> puntoVentaList;
|
private List<PuntoVenta> puntoVentaList;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PtovtaTitular ptovtaTitularClone;
|
||||||
|
|
||||||
public PtovtaTitular() {
|
public PtovtaTitular() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,4 +209,33 @@ public class PtovtaTitular implements Serializable {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaTitular[ ptovtaTitularId=" + ptovtaTitularId + " ]";
|
return "com.rjconsultores.ventaboletos.entidad.PtovtaTitular[ ptovtaTitularId=" + ptovtaTitularId + " ]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
ptovtaTitularClone = new PtovtaTitular();
|
||||||
|
ptovtaTitularClone = (PtovtaTitular) this.clone();
|
||||||
|
|
||||||
|
if(this.getPuntoVentaList() != null) {
|
||||||
|
List<PuntoVenta> lsClones = new ArrayList<PuntoVenta>();
|
||||||
|
for (PuntoVenta puntoVenta : this.getPuntoVentaList()) {
|
||||||
|
if(BooleanUtils.isTrue(puntoVenta.getActivo())) {
|
||||||
|
puntoVenta.clonar();
|
||||||
|
lsClones.add(puntoVenta.getCloneObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ptovtaTitularClone.setPuntoVentaList(lsClones);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PtovtaTitular getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return ptovtaTitularClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPtovtaTitularId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,10 @@ import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
import org.apache.commons.lang.BooleanUtils;
|
import org.apache.commons.lang.BooleanUtils;
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.annotations.LazyCollection;
|
import org.hibernate.annotations.LazyCollection;
|
||||||
import org.hibernate.annotations.LazyCollectionOption;
|
import org.hibernate.annotations.LazyCollectionOption;
|
||||||
import org.hibernate.annotations.Where;
|
import org.hibernate.annotations.Where;
|
||||||
|
@ -38,14 +40,22 @@ import org.hibernate.annotations.Where;
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoSocio;
|
import com.rjconsultores.ventaboletos.enums.TipoSocio;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarAtributo;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarEntidade;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarLista;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "PUNTO_VENTA_SEQ", sequenceName = "PUNTO_VENTA_SEQ", allocationSize = 1)
|
@SequenceGenerator(name = "PUNTO_VENTA_SEQ", sequenceName = "PUNTO_VENTA_SEQ", allocationSize = 1)
|
||||||
|
@AuditarClasse(nome = "PuntoVenta", tela = "Alteração de Ponto de Venda")
|
||||||
@Table(name = "PUNTO_VENTA")
|
@Table(name = "PUNTO_VENTA")
|
||||||
public class PuntoVenta implements Serializable {
|
public class PuntoVenta implements Serializable, Auditavel<PuntoVenta> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -53,6 +63,7 @@ public class PuntoVenta implements Serializable {
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PUNTO_VENTA_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PUNTO_VENTA_SEQ")
|
||||||
@Column(name = "PUNTOVENTA_ID")
|
@Column(name = "PUNTOVENTA_ID")
|
||||||
private Integer puntoventaId;
|
private Integer puntoventaId;
|
||||||
|
@AuditarAtributo(nome = "NOME PONTO DE VENDA")
|
||||||
@Column(name = "NOMBPUNTOVENTA")
|
@Column(name = "NOMBPUNTOVENTA")
|
||||||
private String nombpuntoventa;
|
private String nombpuntoventa;
|
||||||
@Column(name = "DIRECCIONCALLE")
|
@Column(name = "DIRECCIONCALLE")
|
||||||
|
@ -91,6 +102,7 @@ public class PuntoVenta implements Serializable {
|
||||||
@JoinColumn(name = "TIPOPTOVTA_ID", referencedColumnName = "TIPOPTOVTA_ID")
|
@JoinColumn(name = "TIPOPTOVTA_ID", referencedColumnName = "TIPOPTOVTA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private TipoPuntoVenta tipoPuntoVenta;
|
private TipoPuntoVenta tipoPuntoVenta;
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "ReservacionPuntoVenta")
|
||||||
@OneToMany(mappedBy = "puntoVenta")
|
@OneToMany(mappedBy = "puntoVenta")
|
||||||
private List<ReservacionPuntoVenta> reservacionPuntoventaList;
|
private List<ReservacionPuntoVenta> reservacionPuntoventaList;
|
||||||
@OneToOne
|
@OneToOne
|
||||||
|
@ -105,40 +117,63 @@ public class PuntoVenta implements Serializable {
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "USUARIOBANCARIO_ID")
|
@JoinColumn(name = "USUARIOBANCARIO_ID")
|
||||||
private UsuarioBancario usuarioBancario;
|
private UsuarioBancario usuarioBancario;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "FormaPagoDet")
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
private List<FormaPagoDet> lsFormaPagoDet;
|
private List<FormaPagoDet> lsFormaPagoDet;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "ParamRecoleccion")
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
private List<ParamRecoleccion> lsParamRecoleccion;
|
private List<ParamRecoleccion> lsParamRecoleccion;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaEmpresa")
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
private List<PtovtaEmpresa> lsPtovtaEmpresa;
|
private List<PtovtaEmpresa> lsPtovtaEmpresa;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtoVtaUsuarioBancario")
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
private List<PtoVtaUsuarioBancario> lsPtovtaUsuarioBancario;
|
private List<PtoVtaUsuarioBancario> lsPtovtaUsuarioBancario;
|
||||||
|
|
||||||
@Column(name = "NUMFAX")
|
@Column(name = "NUMFAX")
|
||||||
private String numfax;
|
private String numfax;
|
||||||
@Column(name = "COMPLE")
|
@Column(name = "COMPLE")
|
||||||
private String compl;
|
private String compl;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaEstoque")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
private List<PtovtaEstoque> ptovtaEstoqueList;
|
private List<PtovtaEstoque> ptovtaEstoqueList;
|
||||||
|
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaHorario")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
private List<PtovtaHorario> ptovtaHorarioList;
|
private List<PtovtaHorario> ptovtaHorarioList;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaAntecipacomissao")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
||||||
|
|
||||||
|
@AuditarEntidade
|
||||||
@JoinColumn(name = "PTOVTACOMISSAO_ID")
|
@JoinColumn(name = "PTOVTACOMISSAO_ID")
|
||||||
@OneToOne(cascade = CascadeType.ALL)
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
private PtovtaComissao comissaoId;
|
private PtovtaComissao comissaoId;
|
||||||
|
|
||||||
@JoinColumn(name = "PTOVTADIVERSOS_ID")
|
@JoinColumn(name = "PTOVTADIVERSOS_ID")
|
||||||
@OneToOne(cascade = CascadeType.ALL)
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
private PtovtaDiversos diversosId;
|
private PtovtaDiversos diversosId;
|
||||||
@JoinColumn(name = "PTOVTAAGENCIA_ID")
|
@JoinColumn(name = "PTOVTAAGENCIA_ID")
|
||||||
@OneToOne(cascade = CascadeType.ALL)
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
private PtovtaAgencia agenciaId;
|
private PtovtaAgencia agenciaId;
|
||||||
|
|
||||||
|
@AuditarEntidade
|
||||||
@JoinColumn(name = "PTOVTATITULAR_ID")
|
@JoinColumn(name = "PTOVTATITULAR_ID")
|
||||||
@OneToOne(cascade = CascadeType.ALL)
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
private PtovtaTitular titularId;
|
private PtovtaTitular titularId;
|
||||||
|
|
||||||
|
@AuditarAtributo(nome = "NUMERO PONTO DE VENDA")
|
||||||
@Column(name = "NUMPUNTOVENTA")
|
@Column(name = "NUMPUNTOVENTA")
|
||||||
private String numPuntoVenta;
|
private String numPuntoVenta;
|
||||||
@Column(name = "INDPERMISOTASAEMBARQUE")
|
@Column(name = "INDPERMISOTASAEMBARQUE")
|
||||||
|
@ -179,18 +214,22 @@ public class PuntoVenta implements Serializable {
|
||||||
@Column(name = "MOTIVONAOINTEGRADOAG")
|
@Column(name = "MOTIVONAOINTEGRADOAG")
|
||||||
private String motivoNaoIntegradoAG;
|
private String motivoNaoIntegradoAG;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaEmpresaBloqueada")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<PtovtaEmpresaBloqueada> ptovtaEmpresaBloqueadaList;
|
private List<PtovtaEmpresaBloqueada> ptovtaEmpresaBloqueadaList;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtoVtaCheckin")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<PtoVtaCheckin> ptovtaCheckinList;
|
private List<PtoVtaCheckin> ptovtaCheckinList;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtoVtaSeguro")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<PtoVtaSeguro> ptovtaSeguroList;
|
private List<PtoVtaSeguro> ptovtaSeguroList;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaCatInd")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoVenta")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoVenta")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<PtovtaCatInd> ptovtaCatIndList;
|
private List<PtovtaCatInd> ptovtaCatIndList;
|
||||||
|
@ -216,10 +255,12 @@ public class PuntoVenta implements Serializable {
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date dateAbertura;
|
private Date dateAbertura;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "HistoricoPuntoVenta")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoVenta")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoVenta")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<HistoricoPuntoVenta> historicoPuntoVentaList;
|
private List<HistoricoPuntoVenta> historicoPuntoVentaList;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "CategoriaBloqueioImpPosterior")
|
||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventa")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventa")
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
private List<CategoriaBloqueioImpPosterior> categoriaBloqImpPosteriorList;
|
private List<CategoriaBloqueioImpPosterior> categoriaBloqImpPosteriorList;
|
||||||
|
@ -239,6 +280,7 @@ public class PuntoVenta implements Serializable {
|
||||||
@Column(name = "INDREPASSAUTR")
|
@Column(name = "INDREPASSAUTR")
|
||||||
private Boolean indRepassaUTR;
|
private Boolean indRepassaUTR;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "PtovtaAntifraude")
|
||||||
@OneToMany(mappedBy = "puntoventa", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "puntoventa", cascade = CascadeType.ALL)
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
@Where(clause = "activo = 1")
|
@Where(clause = "activo = 1")
|
||||||
|
@ -247,6 +289,7 @@ public class PuntoVenta implements Serializable {
|
||||||
@Column(name = "INDBLOQUEIATIPOPASSAGEM")
|
@Column(name = "INDBLOQUEIATIPOPASSAGEM")
|
||||||
private Boolean indBloqueiaTipoPassagem;
|
private Boolean indBloqueiaTipoPassagem;
|
||||||
|
|
||||||
|
@AuditarLista(auditarEntidades = true, nome = "CobrancaAdcPuntoVenta")
|
||||||
@OneToMany(mappedBy = "puntoVenta", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "puntoVenta", cascade = CascadeType.ALL)
|
||||||
@LazyCollection(LazyCollectionOption.FALSE)
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
@Where(clause = "activo = 1")
|
@Where(clause = "activo = 1")
|
||||||
|
@ -271,6 +314,13 @@ public class PuntoVenta implements Serializable {
|
||||||
@Column(name = "INDQRCODETAXAEMBARQUERODTTL")
|
@Column(name = "INDQRCODETAXAEMBARQUERODTTL")
|
||||||
private Boolean indQrcodeTaxaEmbarqueRodTTL;
|
private Boolean indQrcodeTaxaEmbarqueRodTTL;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private PuntoVenta puntoVentaClone;
|
||||||
|
|
||||||
|
@Column(name = "INDBLOQCANCBILHETEIMPRESSO ")
|
||||||
|
private Boolean indBloqueiaCancelamentoBilheteImpresso;
|
||||||
|
|
||||||
public List<CobrancaAdcPuntoVenta> getCobrancaAdicionalList() {
|
public List<CobrancaAdcPuntoVenta> getCobrancaAdicionalList() {
|
||||||
return cobrancaAdicionalList;
|
return cobrancaAdicionalList;
|
||||||
}
|
}
|
||||||
|
@ -1199,5 +1249,32 @@ public class PuntoVenta implements Serializable {
|
||||||
public void setIndQrcodeTaxaEmbarqueRodTTL(Boolean indQrcodeTaxaEmbarqueRodTTL) {
|
public void setIndQrcodeTaxaEmbarqueRodTTL(Boolean indQrcodeTaxaEmbarqueRodTTL) {
|
||||||
this.indQrcodeTaxaEmbarqueRodTTL = indQrcodeTaxaEmbarqueRodTTL;
|
this.indQrcodeTaxaEmbarqueRodTTL = indQrcodeTaxaEmbarqueRodTTL;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
puntoVentaClone = new PuntoVenta();
|
||||||
|
puntoVentaClone = (PuntoVenta) this.clone();
|
||||||
|
|
||||||
|
if(this.getReservacionPuntoventaList() != null) {
|
||||||
|
List<ReservacionPuntoVenta> lsClones = new ArrayList<ReservacionPuntoVenta>();
|
||||||
|
for (ReservacionPuntoVenta reservacionPuntoVenta : this.getReservacionPuntoventaList()) {
|
||||||
|
if(BooleanUtils.isTrue(reservacionPuntoVenta.getActivo())) {
|
||||||
|
reservacionPuntoVenta.clonar();
|
||||||
|
lsClones.add(reservacionPuntoVenta.getCloneObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
puntoVentaClone.setReservacionPuntoventaList(lsClones);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PuntoVenta getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return puntoVentaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getPuntoventaId());
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -17,16 +17,26 @@ import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
||||||
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
||||||
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "Alteração de Reserva Punto Venta")
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(name = "RESERVACION_PUNTOVENTA_SEQ", sequenceName = "RESERVACION_PUNTOVENTA_SEQ", allocationSize=1)
|
@SequenceGenerator(name = "RESERVACION_PUNTOVENTA_SEQ", sequenceName = "RESERVACION_PUNTOVENTA_SEQ", allocationSize = 1)
|
||||||
@Table(name = "RESERVACION_PUNTOVENTA")
|
@Table(name = "RESERVACION_PUNTOVENTA")
|
||||||
public class ReservacionPuntoVenta implements Serializable {
|
public class ReservacionPuntoVenta implements Serializable, Auditavel<ReservacionPuntoVenta> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
|
@ -41,13 +51,21 @@ public class ReservacionPuntoVenta implements Serializable {
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@JoinColumn(name = "RESERVACIONCTRL_ID", referencedColumnName = "RESERVACIONCTRL_ID")
|
@JoinColumn(name = "RESERVACIONCTRL_ID", referencedColumnName = "RESERVACIONCTRL_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private ReservacionCtrl reservacionCtrl;
|
private ReservacionCtrl reservacionCtrl;
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
|
|
||||||
|
@NaoAuditar
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoVenta;
|
private PuntoVenta puntoVenta;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private ReservacionPuntoVenta reservacionPuntoVentaClone;
|
||||||
|
|
||||||
public ReservacionPuntoVenta() {
|
public ReservacionPuntoVenta() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,10 +151,26 @@ public class ReservacionPuntoVenta implements Serializable {
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.ReservacionPuntoventa[reservacionptovtaId=" + reservacionptovtaId + "]";
|
return "com.rjconsultores.ventaboletos.entidad.ReservacionPuntoventa[reservacionptovtaId=" + reservacionptovtaId + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clonar() throws CloneNotSupportedException {
|
||||||
|
reservacionPuntoVentaClone = new ReservacionPuntoVenta();
|
||||||
|
reservacionPuntoVentaClone = (ReservacionPuntoVenta) this.clone();
|
||||||
|
Hibernate.initialize(reservacionPuntoVentaClone.getPuntoVenta());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReservacionPuntoVenta getCloneObject() throws CloneNotSupportedException {
|
||||||
|
return reservacionPuntoVentaClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextoInclusaoExclusao() {
|
||||||
|
return String.format("ID [%s]", getReservacionptovtaId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,15 +137,6 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
@Column(name = "INDVENDAEMBARCADA")
|
@Column(name = "INDVENDAEMBARCADA")
|
||||||
private Boolean indVendaEmbarcada;
|
private Boolean indVendaEmbarcada;
|
||||||
|
|
||||||
@Column(name = "INDPRECIOPORDEMANDA")
|
|
||||||
private Boolean indPrecioPorDemanda;
|
|
||||||
|
|
||||||
@Column(name = "FECINIPRECIODEMANDA")
|
|
||||||
private Date fecInicioPrecioDemanda;
|
|
||||||
|
|
||||||
@Column(name = "FECFIMPRECIODEMANDA")
|
|
||||||
private Date fecFimPrecioDemanda;
|
|
||||||
|
|
||||||
@OneToMany(mappedBy = "ruta", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "ruta", cascade = CascadeType.ALL)
|
||||||
private List<RutaEmbarqueDesembarque> lsRutaEmbarqueDesembarque;
|
private List<RutaEmbarqueDesembarque> lsRutaEmbarqueDesembarque;
|
||||||
|
|
||||||
|
@ -156,9 +147,17 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
@Transient
|
@Transient
|
||||||
private Boolean isClone;
|
private Boolean isClone;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private Boolean isCadastro;
|
||||||
|
|
||||||
@Column(name = "indnumfidelidadobligatorio")
|
@Column(name = "indnumfidelidadobligatorio")
|
||||||
private Boolean indNumFidelidadObligatorio;
|
private Boolean indNumFidelidadObligatorio;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private List<RutaCombinacion> rutaCombinacionTemporariaList;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
private Ruta rutaClone;
|
private Ruta rutaClone;
|
||||||
|
@ -166,6 +165,10 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
@Column(name = "STATUS_AUTORIZADORA")
|
@Column(name = "STATUS_AUTORIZADORA")
|
||||||
private Integer statusAutorizadora;
|
private Integer statusAutorizadora;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@NaoAuditar
|
||||||
|
private ClaseServicio claseServicioRutaOrigem;
|
||||||
|
|
||||||
public Ruta() {
|
public Ruta() {
|
||||||
super();
|
super();
|
||||||
indRutaCancelada = false;
|
indRutaCancelada = false;
|
||||||
|
@ -199,9 +202,7 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
ruta.indTribTaxaEmbarque = other.indTribTaxaEmbarque;
|
ruta.indTribTaxaEmbarque = other.indTribTaxaEmbarque;
|
||||||
ruta.indVentaRioCard = other.indVentaRioCard;
|
ruta.indVentaRioCard = other.indVentaRioCard;
|
||||||
ruta.indRutaInternacional = other.indRutaInternacional;
|
ruta.indRutaInternacional = other.indRutaInternacional;
|
||||||
ruta.indPrecioPorDemanda = other.indPrecioPorDemanda;
|
|
||||||
ruta.fecInicioPrecioDemanda = other.fecInicioPrecioDemanda;
|
|
||||||
ruta.fecFimPrecioDemanda = other.fecFimPrecioDemanda;
|
|
||||||
|
|
||||||
/******* ruta.lsRutaEmpresa *************/
|
/******* ruta.lsRutaEmpresa *************/
|
||||||
if (ruta.lsRutaEmpresa == null) {
|
if (ruta.lsRutaEmpresa == null) {
|
||||||
|
@ -253,6 +254,7 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
|
|
||||||
ruta.usuarioId = other.usuarioId;
|
ruta.usuarioId = other.usuarioId;
|
||||||
ruta.ventaOffLine = other.ventaOffLine;
|
ruta.ventaOffLine = other.ventaOffLine;
|
||||||
|
ruta.claseServicioRutaOrigem=other.claseServicioRutaOrigem;
|
||||||
return ruta;
|
return ruta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +567,7 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getIsClone() {
|
public Boolean getIsClone() {
|
||||||
return isClone;
|
return isClone == null ? false: isClone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsClone(Boolean isClone) {
|
public void setIsClone(Boolean isClone) {
|
||||||
|
@ -628,30 +630,6 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
return String.format("ID [%s]", getRutaId());
|
return String.format("ID [%s]", getRutaId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getIndPrecioPorDemanda() {
|
|
||||||
return indPrecioPorDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIndPrecioPorDemanda(Boolean indPrecioPorDemanda) {
|
|
||||||
this.indPrecioPorDemanda = indPrecioPorDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getFecInicioPrecioDemanda() {
|
|
||||||
return fecInicioPrecioDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFecInicioPrecioDemanda(Date fecInicioPrecioDemanda) {
|
|
||||||
this.fecInicioPrecioDemanda = fecInicioPrecioDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getFecFimPrecioDemanda() {
|
|
||||||
return fecFimPrecioDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFecFimPrecioDemanda(Date fecFimPrecioDemanda) {
|
|
||||||
this.fecFimPrecioDemanda = fecFimPrecioDemanda;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescSentido() {
|
public String getDescSentido() {
|
||||||
return this.getIndSentidoIda() == null || Boolean.TRUE.equals(this.getIndSentidoIda()) ? "IDA" : "VOLTA";
|
return this.getIndSentidoIda() == null || Boolean.TRUE.equals(this.getIndSentidoIda()) ? "IDA" : "VOLTA";
|
||||||
}
|
}
|
||||||
|
@ -663,4 +641,34 @@ public class Ruta implements Serializable, Comparable<Ruta>, Auditavel<Ruta> {
|
||||||
public void setStatusAutorizadora(Integer statusAutorizadora) {
|
public void setStatusAutorizadora(Integer statusAutorizadora) {
|
||||||
this.statusAutorizadora = statusAutorizadora;
|
this.statusAutorizadora = statusAutorizadora;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<RutaCombinacion> getRutaCombinacionTemporariaList() {
|
||||||
|
return rutaCombinacionTemporariaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaCombinacionTemporariaList(List<RutaCombinacion> rutaCombinacionTemporariaList) {
|
||||||
|
this.rutaCombinacionTemporariaList = rutaCombinacionTemporariaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsCadastro() {
|
||||||
|
return isCadastro==null?false:isCadastro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsCadastro(Boolean isCadastro) {
|
||||||
|
this.isCadastro = isCadastro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ClaseServicio getClaseServicioRutaOrigem() {
|
||||||
|
return claseServicioRutaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClaseServicioRutaOrigem(ClaseServicio claseServicioRutaOrigem) {
|
||||||
|
this.claseServicioRutaOrigem = claseServicioRutaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -60,6 +60,9 @@ public class RutaIcmsExcepcion implements Serializable {
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@Column(name = "indCST41")
|
||||||
|
private Boolean indCST41;
|
||||||
|
|
||||||
public Integer getRutaIcmsExcepcionId() {
|
public Integer getRutaIcmsExcepcionId() {
|
||||||
return rutaIcmsExcepcionId;
|
return rutaIcmsExcepcionId;
|
||||||
}
|
}
|
||||||
|
@ -140,6 +143,14 @@ public class RutaIcmsExcepcion implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndCST41() {
|
||||||
|
return indCST41;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndCST41(Boolean indCST41) {
|
||||||
|
this.indCST41 = indCST41;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
|
|
|
@ -18,7 +18,9 @@ public enum TipoFormapago {
|
||||||
DEPOSITO(11,Labels.getLabel("editarFormaPagoController.lblDeposito.label")),
|
DEPOSITO(11,Labels.getLabel("editarFormaPagoController.lblDeposito.label")),
|
||||||
CARTEIRA_DIGITAL(12,Labels.getLabel("editarFormaPagoController.lblCarteiraDigital.label")),
|
CARTEIRA_DIGITAL(12,Labels.getLabel("editarFormaPagoController.lblCarteiraDigital.label")),
|
||||||
SMART_CARD(13,Labels.getLabel("editarFormaPagoController.lblSmartCard.label")),
|
SMART_CARD(13,Labels.getLabel("editarFormaPagoController.lblSmartCard.label")),
|
||||||
LOGPAY(14,Labels.getLabel("editarFormaPagoController.lblLogpay.label"));
|
LOGPAY(14,Labels.getLabel("editarFormaPagoController.lblLogpay.label")),
|
||||||
|
TPI(15, Labels.getLabel("editarFormaPagoController.lblTPI.label")),
|
||||||
|
MOBIPIX(16,Labels.getLabel("editarFormaPagoController.lblMobiPix.label"));
|
||||||
|
|
||||||
private Integer valor;
|
private Integer valor;
|
||||||
private String descricao;
|
private String descricao;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.service;
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Boleto;
|
import com.rjconsultores.ventaboletos.entidad.Boleto;
|
||||||
|
@ -18,6 +19,10 @@ public interface BoletoService {
|
||||||
|
|
||||||
public Boleto suscribir(Boleto boleto);
|
public Boleto suscribir(Boleto boleto);
|
||||||
|
|
||||||
public void criaBoletoReserva(String unoAsientoSelec, Integer unaCorridaId, Date unaFecCorrida, Integer unoTerminalOrigenId, Integer unoTerminalDestinoId, Integer unoTipoVenta, Integer unaCategoriaSelec, String unoNumeOperacion, Integer unUsuarioId, Integer unPuntoVenta, Integer unClienteId, Integer rutaId, Float tarifa, Long tempoReserva, Integer estacionId, String cpf, String numFidelidade, Integer claseservicioId, Short marcaId, Date fecViaje, Integer empresaCorridaId, String nombPassageiro) throws Exception;
|
public void criaBoletoReserva(String unoAsientoSelec, Integer unaCorridaId, Date unaFecCorrida, Integer unoTerminalOrigenId,
|
||||||
|
Integer unoTerminalDestinoId, Integer unoTipoVenta, Integer unaCategoriaSelec, String unoNumeOperacion, Integer unUsuarioId,
|
||||||
|
Integer unPuntoVenta, Integer unClienteId, Integer rutaId, BigDecimal tarifa, Long tempoReserva, Integer estacionId, String cpf,
|
||||||
|
String numFidelidade, Integer claseservicioId, Short marcaId, Date fecViaje, Integer empresaCorridaId, String nombPassageiro,
|
||||||
|
BigDecimal valorSeguro, BigDecimal valorTaxaEmbarque, BigDecimal valorPedagio) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@ public interface CategoriaCtrlService {
|
||||||
|
|
||||||
public CategoriaCtrl suscribir(CategoriaCtrl entidad);
|
public CategoriaCtrl suscribir(CategoriaCtrl entidad);
|
||||||
|
|
||||||
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl entidad);
|
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl entidad, Boolean rdVendeAbertoSim, Boolean chkCancelaEmAberto, Boolean chkDevolveEmAberto, Boolean chkCancelaEmergencialEmAberto, Boolean chkTrocaTiturlidadeEmAberto, Boolean chkTrocaEmAberto);
|
||||||
|
|
||||||
public CategoriaCtrl actualizacion(CategoriaCtrl entidad);
|
public CategoriaCtrl actualizacion(CategoriaCtrl entidad);
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,11 @@ public interface ConexionRutaTramoCtrlService {
|
||||||
|
|
||||||
public boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId, Integer integer);
|
public boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId, Integer integer);
|
||||||
|
|
||||||
public List<Parada> buscarLocalidadesOrigem(Integer conexionRutaConfId);
|
public List<Parada> buscarLocalidadesEixoA(Integer conexionRutaConfId);
|
||||||
|
|
||||||
public List<Parada> buscarLocalidadesDestino(Integer conexionRutaConfId);
|
public List<Parada> buscarLocalidadeEixoB(Integer conexionRutaConfId);
|
||||||
|
|
||||||
public List<Parada> buscarLocalidadesDestinoC(Integer conexionRutaConfId);
|
public List<Parada> buscarLocalidadesEixoC(Integer conexionRutaConfId);
|
||||||
|
|
||||||
public List<Parada> buscarTodasLocalidadesOrigem(Integer conexionRutaConfId);
|
public List<Parada> buscarTodasLocalidadesOrigem(Integer conexionRutaConfId);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ public interface ConexionService {
|
||||||
*/
|
*/
|
||||||
public void gerarConexiones();
|
public void gerarConexiones();
|
||||||
|
|
||||||
public List<ConexionVO> buscarConexiones(Integer origenId, Integer destinoId);
|
public List<ConexionVO> buscarConexiones(boolean isBuscaAgrupada, Integer origenId, Integer destinoId);
|
||||||
|
|
||||||
public Conexion suscribir(Conexion conexion);
|
public Conexion suscribir(Conexion conexion);
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,6 @@ public interface ConstanteService extends GenericService<Constante, Integer> {
|
||||||
public String buscarURLAPI();
|
public String buscarURLAPI();
|
||||||
|
|
||||||
public Integer buscarValorConstantePorNomeConstante(String nomeConstante);
|
public Integer buscarValorConstantePorNomeConstante(String nomeConstante);
|
||||||
|
|
||||||
|
public String buscarURLAPIEmb();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.AgrupamentoParada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
@ -43,4 +44,6 @@ public interface ParadaService {
|
||||||
public List<Parada> obterPossiveisDestinos(Parada origem);
|
public List<Parada> obterPossiveisDestinos(Parada origem);
|
||||||
|
|
||||||
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana);
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana);
|
||||||
|
|
||||||
|
public List<Parada> buscarPorAgrupamentoParadaId(AgrupamentoParada agrupamentoParada);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
import com.rjconsultores.ventaboletos.dao.BoletoDAO;
|
import com.rjconsultores.ventaboletos.dao.BoletoDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Boleto;
|
import com.rjconsultores.ventaboletos.entidad.Boleto;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PtoVtaSeguro;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
|
import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
|
@ -58,15 +59,14 @@ public class BoletoServiceImpl implements BoletoService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public void criaBoletoReserva(String unoAsientoSelec, Integer unaCorridaId, Date unaFecCorrida,
|
public void criaBoletoReserva(String unoAsientoSelec, Integer unaCorridaId, Date unaFecCorrida,
|
||||||
Integer unoTerminalOrigenId, Integer unoTerminalDestinoId, Integer unoTipoVenta, Integer unaCategoriaSelec,
|
Integer unoTerminalOrigenId, Integer unoTerminalDestinoId, Integer unoTipoVenta, Integer unaCategoriaSelec,
|
||||||
String unoNumeOperacion, Integer unUsuarioId, Integer unPuntoVenta,
|
String unoNumeOperacion, Integer unUsuarioId, Integer unPuntoVenta, Integer unClienteId, Integer rutaId,
|
||||||
Integer unClienteId, Integer rutaId, Float tarifa, Long tempoReserva,
|
BigDecimal tarifa, Long tempoReserva, Integer estacionId, String docCPF, String numFidelidade, Integer claseservicioId,
|
||||||
Integer estacionId, String docCPF, String numFidelidade, Integer claseservicioId, Short marcaId, Date fecViaje, Integer empresaCorridaId, String nombPassageiro) throws Exception {
|
Short marcaId, Date fecViaje, Integer empresaCorridaId, String nombPassageiro, BigDecimal valorSeguro,
|
||||||
|
BigDecimal valorTaxaEmbarque, BigDecimal valorPedagio) throws Exception {
|
||||||
|
|
||||||
PuntoVenta miPuntoVenta = puntoVentaService.obtenerID(unPuntoVenta.intValue());
|
PuntoVenta miPuntoVenta = puntoVentaService.obtenerID(unPuntoVenta.intValue());
|
||||||
|
|
||||||
Boleto miBoletoTemporal = new Boleto();
|
Boleto miBoletoTemporal = new Boleto();
|
||||||
BigDecimal miPrecio = MoneyHelper.arredondar(tarifa) ;
|
atualizaValoresTarifaPedagioSeguroTaxaEmbarque(tarifa, empresaCorridaId, valorSeguro, valorTaxaEmbarque, valorPedagio, miPuntoVenta, miBoletoTemporal);
|
||||||
miBoletoTemporal = new Boleto();
|
|
||||||
miBoletoTemporal.setBoletoId(formataBoletoId(getSequenciaBoletoId()));
|
miBoletoTemporal.setBoletoId(formataBoletoId(getSequenciaBoletoId()));
|
||||||
miBoletoTemporal.setBoletooriginalId(miBoletoTemporal.getBoletoId());
|
miBoletoTemporal.setBoletooriginalId(miBoletoTemporal.getBoletoId());
|
||||||
// Sempre Categoria Normal (1)
|
// Sempre Categoria Normal (1)
|
||||||
|
@ -94,9 +94,6 @@ public class BoletoServiceImpl implements BoletoService {
|
||||||
miBoletoTemporal.setIndreplica(Boolean.FALSE);
|
miBoletoTemporal.setIndreplica(Boolean.FALSE);
|
||||||
miBoletoTemporal.setIndstatusboleto("S");
|
miBoletoTemporal.setIndstatusboleto("S");
|
||||||
miBoletoTemporal.setIndreimpresion(Boolean.FALSE);
|
miBoletoTemporal.setIndreimpresion(Boolean.FALSE);
|
||||||
miBoletoTemporal.setImportetaxaembarque(BigDecimal.ZERO);
|
|
||||||
miBoletoTemporal.setImporteseguro(BigDecimal.ZERO);
|
|
||||||
miBoletoTemporal.setImportepedagio(BigDecimal.ZERO);
|
|
||||||
miBoletoTemporal.setImporteoutros(BigDecimal.ZERO);
|
miBoletoTemporal.setImporteoutros(BigDecimal.ZERO);
|
||||||
miBoletoTemporal.setMarcaId(marcaId);
|
miBoletoTemporal.setMarcaId(marcaId);
|
||||||
miBoletoTemporal.setMonedaId(1);
|
miBoletoTemporal.setMonedaId(1);
|
||||||
|
@ -111,8 +108,6 @@ public class BoletoServiceImpl implements BoletoService {
|
||||||
miBoletoTemporal.setOrigenId(unoTerminalOrigenId);
|
miBoletoTemporal.setOrigenId(unoTerminalOrigenId);
|
||||||
miBoletoTemporal.setPreciopricing(BigDecimal.ZERO);
|
miBoletoTemporal.setPreciopricing(BigDecimal.ZERO);
|
||||||
miBoletoTemporal.setPorccategoria(null);
|
miBoletoTemporal.setPorccategoria(null);
|
||||||
miBoletoTemporal.setPreciopagado(miPrecio);
|
|
||||||
miBoletoTemporal.setPreciobase(miPrecio);
|
|
||||||
miBoletoTemporal.setPuntoVenta(miPuntoVenta);
|
miBoletoTemporal.setPuntoVenta(miPuntoVenta);
|
||||||
miBoletoTemporal.setPtovtaventaId(miPuntoVenta.getPuntoventaId());
|
miBoletoTemporal.setPtovtaventaId(miPuntoVenta.getPuntoventaId());
|
||||||
miBoletoTemporal.setRutaId(rutaId);
|
miBoletoTemporal.setRutaId(rutaId);
|
||||||
|
@ -127,6 +122,39 @@ public class BoletoServiceImpl implements BoletoService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verifica e atualiza valores tarifa, pedágio, seguro e taxa de embarque.
|
||||||
|
* Sendo que o seguro e taxa de embarque somente serão setados caso no ponto de venda marcado como vende default.
|
||||||
|
* @param tarifa
|
||||||
|
* @param empresaCorridaId
|
||||||
|
* @param valorSeguro
|
||||||
|
* @param valorTaxaEmbarque
|
||||||
|
* @param valorPedagio
|
||||||
|
* @param miPuntoVenta
|
||||||
|
* @param miBoletoTemporal
|
||||||
|
*/
|
||||||
|
private void atualizaValoresTarifaPedagioSeguroTaxaEmbarque(BigDecimal tarifa, Integer empresaCorridaId, BigDecimal valorSeguro,
|
||||||
|
BigDecimal valorTaxaEmbarque, BigDecimal valorPedagio, PuntoVenta miPuntoVenta, Boleto miBoletoTemporal) {
|
||||||
|
BigDecimal miPrecio = MoneyHelper.arredondar(tarifa) ;
|
||||||
|
miBoletoTemporal.setImportepedagio(valorPedagio);
|
||||||
|
miBoletoTemporal.setPreciopagado(miPrecio);
|
||||||
|
miBoletoTemporal.setPreciobase(miPrecio);
|
||||||
|
if(miPuntoVenta !=null && miPuntoVenta.getPtovtaSeguroList() !=null) {
|
||||||
|
for (PtoVtaSeguro ptoVtaSeguro : miPuntoVenta.getPtovtaSeguroList()) {
|
||||||
|
if(empresaCorridaId.equals(ptoVtaSeguro.getEmpresa().getEmpresaId()) && Boolean.TRUE.equals(miPuntoVenta.getActivo())) {
|
||||||
|
if(Boolean.TRUE.equals(ptoVtaSeguro.getIndEstanTasaEmbarque())) {
|
||||||
|
miBoletoTemporal.setImportetaxaembarque(valorTaxaEmbarque);
|
||||||
|
}
|
||||||
|
if(Boolean.TRUE.equals(ptoVtaSeguro.getIndEstanSegTabela())) {
|
||||||
|
miBoletoTemporal.setImporteseguro(valorSeguro);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public BigDecimal calcularKmViaje(int rutaId, Integer unoOrigenId, Integer unoDestinoId) {
|
public BigDecimal calcularKmViaje(int rutaId, Integer unoOrigenId, Integer unoDestinoId) {
|
||||||
RutaCombinacion rutaCombinacion = rutaCombinacionService.busquedaTramoRutaOrigemDestino(rutaId, unoOrigenId, unoDestinoId);
|
RutaCombinacion rutaCombinacion = rutaCombinacionService.busquedaTramoRutaOrigemDestino(rutaId, unoOrigenId, unoDestinoId);
|
||||||
return rutaCombinacion.getTramo().getKmReal();
|
return rutaCombinacion.getTramo().getKmReal();
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
||||||
* @param categoriaCtrl
|
* @param categoriaCtrl
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl categoriaCtrl) {
|
public CategoriaCtrl checarCategoriaAdulto(CategoriaCtrl categoriaCtrl, Boolean rdVendeAbertoSim, Boolean chkCancelaEmAberto, Boolean chkDevolveEmAberto, Boolean chkCancelaEmergencialEmAberto, Boolean chkTrocaTiturlidadeEmAberto, Boolean chkTrocaEmAberto) {
|
||||||
boolean existeAdulto = false;
|
boolean existeAdulto = false;
|
||||||
List<CategoriaDescuento> lsCategorias = new ArrayList<CategoriaDescuento>();
|
List<CategoriaDescuento> lsCategorias = new ArrayList<CategoriaDescuento>();
|
||||||
lsCategorias.addAll(categoriaCtrl.getCategoriaDescuentoList());
|
lsCategorias.addAll(categoriaCtrl.getCategoriaDescuentoList());
|
||||||
|
@ -82,6 +82,24 @@ public class CategoriaCtrlServiceImpl implements CategoriaCtrlService {
|
||||||
}
|
}
|
||||||
if (!existeAdulto) {
|
if (!existeAdulto) {
|
||||||
CategoriaDescuento categoriaDescuentoAdulto = this.getCategoriaDescuentoAdulto(categoriaCtrl);
|
CategoriaDescuento categoriaDescuentoAdulto = this.getCategoriaDescuentoAdulto(categoriaCtrl);
|
||||||
|
|
||||||
|
categoriaDescuentoAdulto.setIndVentaAbierto(rdVendeAbertoSim);
|
||||||
|
|
||||||
|
if(rdVendeAbertoSim) {
|
||||||
|
//Aberto Vendido
|
||||||
|
categoriaDescuentoAdulto.setIndCancelaEmAberto(chkCancelaEmAberto);
|
||||||
|
categoriaDescuentoAdulto.setIndDevolveEmAberto(chkDevolveEmAberto);
|
||||||
|
categoriaDescuentoAdulto.setIndCancelaEmergencialEmAberto(chkCancelaEmergencialEmAberto);
|
||||||
|
categoriaDescuentoAdulto.setIndTrocaTitularidadeEmAberto(chkTrocaTiturlidadeEmAberto);
|
||||||
|
categoriaDescuentoAdulto.setIndTrocaEmAberto(chkTrocaEmAberto);
|
||||||
|
} else {
|
||||||
|
categoriaDescuentoAdulto.setIndCancelaEmAberto(false);
|
||||||
|
categoriaDescuentoAdulto.setIndDevolveEmAberto(false);
|
||||||
|
categoriaDescuentoAdulto.setIndCancelaEmergencialEmAberto(false);
|
||||||
|
categoriaDescuentoAdulto.setIndTrocaTitularidadeEmAberto(false);
|
||||||
|
categoriaDescuentoAdulto.setIndTrocaEmAberto(false);
|
||||||
|
}
|
||||||
|
|
||||||
lsCategorias.add(categoriaDescuentoAdulto);
|
lsCategorias.add(categoriaDescuentoAdulto);
|
||||||
}
|
}
|
||||||
categoriaCtrl.setCategoriaDescuentoList(lsCategorias);
|
categoriaCtrl.setCategoriaDescuentoList(lsCategorias);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -10,7 +11,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.rjconsultores.ventaboletos.dao.CoeficienteTarifaDAO;
|
import com.rjconsultores.ventaboletos.dao.CoeficienteTarifaDAO;
|
||||||
import com.rjconsultores.ventaboletos.dao.OrgaoTramoDAO;
|
import com.rjconsultores.ventaboletos.dao.OrgaoTramoDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.service.CoeficienteTarifaService;
|
import com.rjconsultores.ventaboletos.service.CoeficienteTarifaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@ -21,13 +26,26 @@ public class CoeficienteTarifaServiceImpl implements CoeficienteTarifaService {
|
||||||
private CoeficienteTarifaDAO coeficienteTarifaDAO;
|
private CoeficienteTarifaDAO coeficienteTarifaDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrgaoTramoDAO orgaoTramoDAO;
|
private OrgaoTramoDAO orgaoTramoDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
private static Logger log = Logger.getLogger(OrgaoConcedenteServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
public List<CoeficienteTarifa> obtenerTodos() {
|
public List<CoeficienteTarifa> obtenerTodos() {
|
||||||
return coeficienteTarifaDAO.obtenerTodos();
|
return coeficienteTarifaDAO.obtenerTodos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoeficienteTarifa obtenerID(Integer id) {
|
public CoeficienteTarifa obtenerID(Integer id) {
|
||||||
return coeficienteTarifaDAO.obtenerID(id);
|
|
||||||
|
CoeficienteTarifa coeficienteTarifa = coeficienteTarifaDAO.obtenerID(id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
coeficienteTarifa.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return coeficienteTarifa;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -36,16 +54,33 @@ public class CoeficienteTarifaServiceImpl implements CoeficienteTarifaService {
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return coeficienteTarifaDAO.suscribir(entidad);
|
|
||||||
|
entidad = coeficienteTarifaDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, null);
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public CoeficienteTarifa actualizacion(CoeficienteTarifa entidad) {
|
public CoeficienteTarifa actualizacion(CoeficienteTarifa entidad) {
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return coeficienteTarifaDAO.actualizacion(entidad);
|
CoeficienteTarifa originalClone = entidad.getCloneObject();
|
||||||
|
entidad = coeficienteTarifaDAO.actualizacion(entidad);
|
||||||
|
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, null);
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -63,7 +98,8 @@ public class CoeficienteTarifaServiceImpl implements CoeficienteTarifaService {
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
coeficienteTarifaDAO.actualizacion(entidad);
|
entidad = coeficienteTarifaDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CoeficienteTarifa> buscar(String nomb) {
|
public List<CoeficienteTarifa> buscar(String nomb) {
|
||||||
|
|
|
@ -14,9 +14,11 @@ import java.util.TreeSet;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.service.ConexionRutaCombinacionService;
|
import com.rjconsultores.ventaboletos.service.ConexionRutaCombinacionService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||||
import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
|
import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
|
||||||
import com.rjconsultores.ventaboletos.vo.conexion.OrdenarLocalidadesGeradas;
|
import com.rjconsultores.ventaboletos.vo.conexion.OrdenarLocalidadesGeradas;
|
||||||
import com.rjconsultores.ventaboletos.vo.parada.ConexionCtrlVO;
|
import com.rjconsultores.ventaboletos.vo.parada.ConexionCtrlVO;
|
||||||
|
@ -29,6 +31,9 @@ public class ConexionRutaCombinacionServiceImpl implements ConexionRutaCombinaci
|
||||||
@Autowired
|
@Autowired
|
||||||
private RutaCombinacionService rutaCombinacionService;
|
private RutaCombinacionService rutaCombinacionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ParadaService paradaService;
|
||||||
|
|
||||||
private Map<Integer, Parada> criandoCacheLocalidades(List<Parada> list) {
|
private Map<Integer, Parada> criandoCacheLocalidades(List<Parada> list) {
|
||||||
Map<Integer, Parada> cacheLocalidades = new HashMap<Integer, Parada>();
|
Map<Integer, Parada> cacheLocalidades = new HashMap<Integer, Parada>();
|
||||||
for (Parada parada : list) {
|
for (Parada parada : list) {
|
||||||
|
@ -258,6 +263,20 @@ public class ConexionRutaCombinacionServiceImpl implements ConexionRutaCombinaci
|
||||||
localidades.addAll(listParada2);
|
localidades.addAll(listParada2);
|
||||||
localidades.addAll(listParada3);
|
localidades.addAll(listParada3);
|
||||||
localidades.addAll(listParada4);
|
localidades.addAll(listParada4);
|
||||||
|
List<Parada> localidadesAux = new ArrayList<Parada>();
|
||||||
|
localidadesAux.addAll(localidades);
|
||||||
|
for (Parada parada : localidadesAux) {
|
||||||
|
if(parada.getAgrupamentoParada() !=null) {
|
||||||
|
List<Parada> paradaAgrupamentoList = paradaService.buscarPorAgrupamentoParadaId(parada.getAgrupamentoParada());
|
||||||
|
if(paradaAgrupamentoList!=null && !paradaAgrupamentoList.isEmpty()) {
|
||||||
|
for (Parada paradaAgrupamento : paradaAgrupamentoList) {
|
||||||
|
if(!localidades.contains(paradaAgrupamento)) {
|
||||||
|
localidades.add(paradaAgrupamento);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Map<Integer, Parada> cacheLocalidades = criandoCacheLocalidades(localidades);
|
Map<Integer, Parada> cacheLocalidades = criandoCacheLocalidades(localidades);
|
||||||
gerarCombinacao(lists, rutasEixoA, rutasEixoB, null, localidadesGeradas, conexoesCtrl, cacheLocalidades);
|
gerarCombinacao(lists, rutasEixoA, rutasEixoB, null, localidadesGeradas, conexoesCtrl, cacheLocalidades);
|
||||||
|
|
|
@ -10,13 +10,21 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.rjconsultores.ventaboletos.dao.ConexionRutaTramoCtrlDAO;
|
import com.rjconsultores.ventaboletos.dao.ConexionRutaTramoCtrlDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.service.ConexionRutaTramoCtrlService;
|
import com.rjconsultores.ventaboletos.service.ConexionRutaTramoCtrlService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author valdevir.silva
|
||||||
|
*
|
||||||
|
*/
|
||||||
@Service("conexionRutaTramoCtrlService")
|
@Service("conexionRutaTramoCtrlService")
|
||||||
public class ConexionRutaTramoCtrlServiceImpl implements ConexionRutaTramoCtrlService {
|
public class ConexionRutaTramoCtrlServiceImpl implements ConexionRutaTramoCtrlService {
|
||||||
|
|
||||||
|
private static final char EIXO_C = 'C';
|
||||||
|
private static final char EIXO_B = 'B';
|
||||||
|
private static final char EIXO_A = 'A';
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConexionRutaTramoCtrlDAO conexionRutaTramoCtrlDAO;
|
private ConexionRutaTramoCtrlDAO conexionRutaTramoCtrlDAO;
|
||||||
|
|
||||||
|
@ -80,19 +88,40 @@ public class ConexionRutaTramoCtrlServiceImpl implements ConexionRutaTramoCtrlSe
|
||||||
return conexionRutaTramoCtrlDAO.validarConexioneRutasExistentes(rutaOrigenId, rutaDestinoId, rutaDestinoCId, paradaOrigenId, paradaDestinoId, origemTrechoId, destinoTrechoId);
|
return conexionRutaTramoCtrlDAO.validarConexioneRutasExistentes(rutaOrigenId, rutaDestinoId, rutaDestinoCId, paradaOrigenId, paradaDestinoId, origemTrechoId, destinoTrechoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Busca localidades cadastradas para Eixo A
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Parada> buscarLocalidadesOrigem(Integer conexionRutaConfId) {
|
public List<Parada> buscarLocalidadesEixoA(Integer conexionRutaConfId) {
|
||||||
return conexionRutaTramoCtrlDAO.buscarPorConexionRutaConf(conexionRutaConfId, 'A');
|
return validaAgrupamentoLocalidade(conexionRutaTramoCtrlDAO.buscarLocalidadesPorConexionRutaConfAndEixo(conexionRutaConfId, EIXO_A));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public List<Parada> validaAgrupamentoLocalidade(List<Parada> localidadesList){
|
||||||
public List<Parada> buscarLocalidadesDestino(Integer conexionRutaConfId) {
|
for (Parada parada : localidadesList) {
|
||||||
return conexionRutaTramoCtrlDAO.buscarPorConexionRutaConf(conexionRutaConfId, 'B');
|
if(parada.getAgrupamentoParada()!=null) {
|
||||||
|
parada.setDescparada(parada.getAgrupamentoParada().getDescAgrupamentoParada());
|
||||||
|
parada.setCveparada(parada.getAgrupamentoParada().getCveAgrupamentoParada());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return localidadesList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Busca localidades castradas para Eixo B
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Parada> buscarLocalidadesDestinoC(Integer conexionRutaConfId) {
|
public List<Parada> buscarLocalidadeEixoB(Integer conexionRutaConfId) {
|
||||||
return conexionRutaTramoCtrlDAO.buscarPorConexionRutaConf(conexionRutaConfId, 'C');
|
return validaAgrupamentoLocalidade(conexionRutaTramoCtrlDAO.buscarLocalidadesPorConexionRutaConfAndEixo(conexionRutaConfId, EIXO_B));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Busca localidades cadastradas para Eixo C
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Parada> buscarLocalidadesEixoC(Integer conexionRutaConfId) {
|
||||||
|
return validaAgrupamentoLocalidade(conexionRutaTramoCtrlDAO.buscarLocalidadesPorConexionRutaConfAndEixo(conexionRutaConfId, EIXO_C));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,8 +31,8 @@ public class ConexionServiceImpl implements ConexionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConexionVO> buscarConexiones(Integer origenId, Integer destinoId) {
|
public List<ConexionVO> buscarConexiones(boolean isBuscaAgrupada, Integer origenId, Integer destinoId) {
|
||||||
return conexionDAO.buscarConexiones(origenId, destinoId);
|
return conexionDAO.buscarConexiones(isBuscaAgrupada, origenId, destinoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -424,7 +424,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
public boolean isEventosFinanceirosSemConferencia(List<EventosFinanceirosVO> lsEventosFinanceiros) throws BusinessException {
|
public boolean isEventosFinanceirosSemConferencia(List<EventosFinanceirosVO> lsEventosFinanceiros) throws BusinessException {
|
||||||
for (EventosFinanceirosVO eventosFinanceiros : lsEventosFinanceiros) {
|
for (EventosFinanceirosVO eventosFinanceiros : lsEventosFinanceiros) {
|
||||||
if ((eventosFinanceiros.isExigeConferencia() || eventosFinanceiros.getExigeConferenciaAba()) &&
|
if ((eventosFinanceiros.isExigeConferencia() || eventosFinanceiros.getExigeConferenciaAba()) &&
|
||||||
(!eventosFinanceiros.isConferido() && eventosFinanceiros.getLogconferenciaId() == null)) {
|
(!eventosFinanceiros.isConferido() && (eventosFinanceiros.getLogconferenciaId() == null || eventosFinanceiros.getLogconferenciaId() == 0))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class ConstanteServiceImpl implements ConstanteService {
|
||||||
|
|
||||||
public static final String URL_PAINEL_BPE = "URL_PAINEL_BPE";
|
public static final String URL_PAINEL_BPE = "URL_PAINEL_BPE";
|
||||||
public static final String URL_API = "URL_API";
|
public static final String URL_API = "URL_API";
|
||||||
|
public static final String URL_API_EMB = "URL_API_EMB";
|
||||||
|
|
||||||
public List<Constante> obtenerTodos() {
|
public List<Constante> obtenerTodos() {
|
||||||
return constanteDAO.obtenerTodos();
|
return constanteDAO.obtenerTodos();
|
||||||
|
@ -142,6 +143,16 @@ public class ConstanteServiceImpl implements ConstanteService {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return constante.getValorconstante();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String buscarURLAPIEmb(){
|
||||||
|
Constante constante = constanteDAO.buscarPorNomeConstante(URL_API_EMB);
|
||||||
|
|
||||||
|
if (constante == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
return constante.getValorconstante();
|
return constante.getValorconstante();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,16 +53,23 @@ public class ControleSerieEmbarcadaServiceImpl implements ControleSerieEmbarcada
|
||||||
// Caso não haja reaproveitamento de série, devo buscar a próxima série disponível na sequência padrão
|
// Caso não haja reaproveitamento de série, devo buscar a próxima série disponível na sequência padrão
|
||||||
if (serieembarcada == null) {
|
if (serieembarcada == null) {
|
||||||
log.info("BuscarSerieEmbarcada :: Reaproveitamento nao disponivel");
|
log.info("BuscarSerieEmbarcada :: Reaproveitamento nao disponivel");
|
||||||
|
Integer serieVlmax, SerieEmbarcada, serieBpe, serie, serieBpeSeq;
|
||||||
CtrlSerieBPe ctrlSerieBpe = ctrlSerieBPeDAO.buscarPorEmpresaEstado(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getEstadoId());
|
CtrlSerieBPe ctrlSerieBpe = ctrlSerieBPeDAO.buscarPorEmpresaEstado(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getEstadoId());
|
||||||
|
if( ctrlSerieBpe == null || ctrlSerieBpe.getSerie() == null ) {
|
||||||
|
log.info(String.format("BuscarSerieEmbarcada :: Serie não encontrada para Empresa:%s Estado:%s" , controleSerieEmbarcada.getEmpresa().getEmpresaId(),controleSerieEmbarcada.getEstado()));
|
||||||
|
throw new RuntimeException( String.format("Serie não encontrada para Empresa:%s Estado:%s" , controleSerieEmbarcada.getEmpresa().getEmpresaId(),controleSerieEmbarcada.getEstado()) );
|
||||||
|
}
|
||||||
|
|
||||||
Integer serie = (ctrlSerieBpe == null ? 1 : Integer.valueOf(ctrlSerieBpe.getSerie()) + 1);
|
serieBpe = Integer.valueOf(ctrlSerieBpe.getSerie());
|
||||||
|
SerieEmbarcada = ctrlSerieBPeDAO.buscarSerieEmb(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getEstadoId().toString());
|
||||||
|
serieVlmax = (serieBpe < SerieEmbarcada ? SerieEmbarcada : serieBpe);
|
||||||
|
serie = (serieVlmax == null ? 1 : serieVlmax + 1);
|
||||||
|
|
||||||
log.info(String.format("BuscarSerieEmbarcada :: Serie em uso [%d]", serie));
|
log.info(String.format("BuscarSerieEmbarcada :: Serie em uso [%d]", serie));
|
||||||
|
|
||||||
ctrlSerieBPeDAO.gerarSeqSerieBPe(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado(), serie);
|
ctrlSerieBPeDAO.gerarSeqSerieBPe(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado(), serie);
|
||||||
|
serieBpeSeq = ctrlSerieBPeDAO.buscarSequencia(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado());
|
||||||
serie = ctrlSerieBPeDAO.buscarSequencia(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado());
|
serie = (serie <= serieBpeSeq ? serieBpeSeq : serie);
|
||||||
|
|
||||||
log.info(String.format("BuscarSerieEmbarcada :: Serie selecionada [%d]", serie));
|
log.info(String.format("BuscarSerieEmbarcada :: Serie selecionada [%d]", serie));
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.service.impl;
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
@ -768,7 +769,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (org.springframework.dao.DataIntegrityViolationException ex) {
|
} catch (Exception ex) {
|
||||||
log.error("", ex);
|
log.error("", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,7 +1061,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
|
|
||||||
for (CorridaTramo corridaTramo : corrida.getCorridaTramoList()) {
|
for (CorridaTramo corridaTramo : corrida.getCorridaTramoList()) {
|
||||||
//(Se origem corridatramo = origem cadastrada && destino corridatramo = destino cadastrado)
|
//(Se origem corridatramo = origem cadastrada && destino corridatramo = destino cadastrado)
|
||||||
// ou (se origem corridatramo = destino do cadastrado), tendo em vista que corridatramo são a sequencias e não as combinações
|
// ou (se origem corridatramo = destino do cadastrado), tendo em vista que corridatramo são as sequencias e não as combinações
|
||||||
if(corridaTramo.getOrigem()!=null && corridaTramo.getOrigem().getParadaId().intValue()==unoTerminalOrigenId.intValue()
|
if(corridaTramo.getOrigem()!=null && corridaTramo.getOrigem().getParadaId().intValue()==unoTerminalOrigenId.intValue()
|
||||||
&& corridaTramo.getDestino()!=null && corridaTramo.getDestino().getParadaId().intValue()==unoTerminalDestinoId.intValue()) {
|
&& corridaTramo.getDestino()!=null && corridaTramo.getDestino().getParadaId().intValue()==unoTerminalDestinoId.intValue()) {
|
||||||
fecViaje = corridaTramo.getFechorsalidaH();
|
fecViaje = corridaTramo.getFechorsalidaH();
|
||||||
|
@ -1082,14 +1083,18 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
log.error("Reserva não será realizada. Não foi encontrado Tarifa com Origem:" + unoTerminalOrigenId + " Destino:" +unoTerminalDestinoId + " para a corrida:" + corrida.getId().getCorridaId());
|
log.error("Reserva não será realizada. Não foi encontrado Tarifa com Origem:" + unoTerminalOrigenId + " Destino:" +unoTerminalDestinoId + " para a corrida:" + corrida.getId().getCorridaId());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Float valorTarifa= tarifa!=null ? tarifa.getPrecio().floatValue() : null ;
|
BigDecimal valorTarifa= tarifa!=null ? tarifa.getPrecio() : null ;
|
||||||
|
BigDecimal valorSeguro= tarifa!=null ? tarifa.getImporteseguro() : null ;
|
||||||
|
BigDecimal valorTaxaEmbarque= tarifa!=null ? tarifa.getImportetaxaembarque() : null ;
|
||||||
|
BigDecimal valorPedagio = tarifa!=null ? tarifa.getImportepedagio() : null ;
|
||||||
Long tempoReserva = null;
|
Long tempoReserva = null;
|
||||||
Cliente cliente = clienteService.obtenerID(reservaEspecialCliente.getClienteId().intValue());
|
Cliente cliente = clienteService.obtenerID(reservaEspecialCliente.getClienteId().intValue());
|
||||||
boletoService.criaBoletoReserva(unoAsientoSelec, unaCorridaId, unaFecCorrida, unoTerminalOrigenId,
|
boletoService.criaBoletoReserva(unoAsientoSelec, unaCorridaId, unaFecCorrida, unoTerminalOrigenId,
|
||||||
unoTerminalDestinoId, unoTipoVenta, unaCategoriaSelec, unoNumeOperacion, unUsuarioId, unPuntoVenta,
|
unoTerminalDestinoId, unoTipoVenta, unaCategoriaSelec, unoNumeOperacion, unUsuarioId, unPuntoVenta,
|
||||||
reservaEspecialCliente.getClienteId().intValue(), corrida.getRuta().getRutaId(), valorTarifa, tempoReserva,
|
reservaEspecialCliente.getClienteId().intValue(), corrida.getRuta().getRutaId(), valorTarifa, tempoReserva,
|
||||||
estacionId, cliente.getNumIdentificaUno(), cliente.getListClienteFidelidad().get(0).getClienteFidelidadId().toString(),
|
estacionId, cliente.getNumIdentificaUno(), cliente.getListClienteFidelidad().get(0).getClienteFidelidadId().toString(),
|
||||||
corrida.getClaseServicio().getClaseservicioId(), corrida.getMarca().getMarcaId(), fecViaje, corrida.getEmpresa().getEmpresaId(), cliente.getNombcliente());
|
corrida.getClaseServicio().getClaseservicioId(), corrida.getMarca().getMarcaId(), fecViaje, corrida.getEmpresa().getEmpresaId(),
|
||||||
|
cliente.getNombcliente(), valorSeguro, valorTaxaEmbarque, valorPedagio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1295,7 +1300,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
log.info("commit bloco corridas");
|
log.info("commit bloco corridas");
|
||||||
transactionManager.commit(status);
|
transactionManager.commit(status);
|
||||||
status = transactionManager.getTransaction(def);
|
status = transactionManager.getTransaction(def);
|
||||||
} catch (Throwable ex) {
|
} catch (Exception ex) {
|
||||||
log.error("", ex);
|
log.error("", ex);
|
||||||
log.error(" Erro ao gerar corrida = " + esquemaCorrida.getNumCorrida() + " esquemaCorrida = " + esquemaCorrida.getEsquemacorridaId());
|
log.error(" Erro ao gerar corrida = " + esquemaCorrida.getNumCorrida() + " esquemaCorrida = " + esquemaCorrida.getEsquemacorridaId());
|
||||||
transactionManager.rollback(status);
|
transactionManager.rollback(status);
|
||||||
|
|
|
@ -7,6 +7,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -24,6 +25,7 @@ import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
@ -46,13 +48,25 @@ public class EmpresaServiceImpl implements EmpresaService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EsquemaCorridaDAO esquemaCorridaDAO;
|
private EsquemaCorridaDAO esquemaCorridaDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
private static Logger log = Logger.getLogger(EmpresaServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
public List<Empresa> obtenerTodos() {
|
public List<Empresa> obtenerTodos() {
|
||||||
return empresaDAO.obtenerTodos();
|
return empresaDAO.obtenerTodos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Empresa obtenerID(Integer id) {
|
public Empresa obtenerID(Integer id) {
|
||||||
return empresaDAO.obtenerID(id);
|
|
||||||
|
Empresa empresa = empresaDAO.obtenerID(id);
|
||||||
|
try {
|
||||||
|
empresa.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return empresa;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -69,11 +83,19 @@ public class EmpresaServiceImpl implements EmpresaService {
|
||||||
if (entidad.getEmpresaId() == null) {
|
if (entidad.getEmpresaId() == null) {
|
||||||
|
|
||||||
entidad = empresaDAO.suscribir(entidad);
|
entidad = empresaDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, null);
|
||||||
|
|
||||||
|
|
||||||
gerarMarca(entidad);
|
gerarMarca(entidad);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
|
Empresa empresaClone = entidad.getCloneObject();
|
||||||
entidad = empresaDAO.actualizacion(entidad);
|
entidad = empresaDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditar(empresaClone, entidad, entidad.getEmpresaId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (comEmpConferencia != null) {
|
if (comEmpConferencia != null) {
|
||||||
|
@ -107,6 +129,8 @@ public class EmpresaServiceImpl implements EmpresaService {
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
empresaDAO.actualizacion(entidad);
|
empresaDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad,null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Empresa> buscar(String nombempresa, Boolean indExterna, Short indTipo) {
|
public List<Empresa> buscar(String nombempresa, Boolean indExterna, Short indTipo) {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -12,12 +13,17 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta;
|
import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.service.FechamentoParamptovtaService;
|
import com.rjconsultores.ventaboletos.service.FechamentoParamptovtaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
|
|
||||||
@Service("fechamentoParamptovtaService")
|
@Service("fechamentoParamptovtaService")
|
||||||
public class FechamentoParamptovtaServiceImpl implements FechamentoParamptovtaService {
|
public class FechamentoParamptovtaServiceImpl implements FechamentoParamptovtaService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FechamentoParamptovtaDAO fechamentoParamptovtaDAO;
|
private FechamentoParamptovtaDAO fechamentoParamptovtaDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
private static Logger log = Logger.getLogger(FechamentoParamptovtaServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FechamentoParamptovta> obtenerTodos() {
|
public List<FechamentoParamptovta> obtenerTodos() {
|
||||||
|
@ -26,26 +32,47 @@ public class FechamentoParamptovtaServiceImpl implements FechamentoParamptovtaSe
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FechamentoParamptovta obtenerID(Long id) {
|
public FechamentoParamptovta obtenerID(Long id) {
|
||||||
return fechamentoParamptovtaDAO.obtenerID(id);
|
|
||||||
|
FechamentoParamptovta fechamentoParamptovta = fechamentoParamptovtaDAO.obtenerID(id);
|
||||||
|
try {
|
||||||
|
fechamentoParamptovta.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return fechamentoParamptovta;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public FechamentoParamptovta suscribir(FechamentoParamptovta entidad) {
|
public FechamentoParamptovta suscribir(FechamentoParamptovta entidad) {
|
||||||
return fechamentoParamptovtaDAO.suscribir(entidad);
|
|
||||||
|
fechamentoParamptovtaDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, entidad.getEmpresa() != null && entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public FechamentoParamptovta actualizacion(FechamentoParamptovta entidad) {
|
public FechamentoParamptovta actualizacion(FechamentoParamptovta entidad) {
|
||||||
entidad.setFecmodif(new Date());
|
entidad.setFecmodif(new Date());
|
||||||
return fechamentoParamptovtaDAO.actualizacion(entidad);
|
FechamentoParamptovta originalClone = null;
|
||||||
|
try {
|
||||||
|
originalClone = entidad.getCloneObject();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("",e);
|
||||||
|
}
|
||||||
|
fechamentoParamptovtaDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void borrar(FechamentoParamptovta entidad) {
|
public void borrar(FechamentoParamptovta entidad) {
|
||||||
|
|
||||||
fechamentoParamptovtaDAO.borrar(entidad);
|
fechamentoParamptovtaDAO.borrar(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, entidad.getEmpresa() != null && entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,22 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.service.impl;
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.FormaPagoDAO;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
|
||||||
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.FormaPagoDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Tarifa;
|
||||||
|
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -25,13 +31,27 @@ public class FormaPagoServiceImpl implements FormaPagoService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FormaPagoDAO formaPagoDAO;
|
private FormaPagoDAO formaPagoDAO;
|
||||||
|
private static Logger log = LoggerFactory.getLogger(PuntoVentaServiceImpl.class);
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
|
||||||
|
|
||||||
public List<FormaPago> obtenerTodos() {
|
public List<FormaPago> obtenerTodos() {
|
||||||
return formaPagoDAO.obtenerTodos();
|
return formaPagoDAO.obtenerTodos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FormaPago obtenerID(Short id) {
|
public FormaPago obtenerID(Short id) {
|
||||||
return formaPagoDAO.obtenerID(id);
|
|
||||||
|
|
||||||
|
FormaPago formaPago = formaPagoDAO.obtenerID(id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
formaPago.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return formaPago;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -40,16 +60,31 @@ public class FormaPagoServiceImpl implements FormaPagoService {
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return formaPagoDAO.suscribir(entidad);
|
|
||||||
|
formaPagoDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, null);
|
||||||
|
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public FormaPago actualizacion(FormaPago entidad) {
|
public FormaPago actualizacion(FormaPago entidad) {
|
||||||
|
|
||||||
|
FormaPago originalClone = null;
|
||||||
|
try {
|
||||||
|
originalClone = entidad.getCloneObject();
|
||||||
|
} catch (CloneNotSupportedException e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return formaPagoDAO.actualizacion(entidad);
|
formaPagoDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, -1);
|
||||||
|
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -59,6 +94,7 @@ public class FormaPagoServiceImpl implements FormaPagoService {
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
formaPagoDAO.actualizacion(entidad);
|
formaPagoDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FormaPago> buscarPorDescricao(String descpago) {
|
public List<FormaPago> buscarPorDescricao(String descpago) {
|
||||||
|
|
|
@ -214,9 +214,20 @@ public class ImportacaoClientesSrvpServiceImpl implements ImportacaoClientesSrvp
|
||||||
Cell cell = cellIterator.next();
|
Cell cell = cellIterator.next();
|
||||||
switch (cell.getColumnIndex()) {
|
switch (cell.getColumnIndex()) {
|
||||||
case 0:
|
case 0:
|
||||||
cell.setCellType(Cell.CELL_TYPE_NUMERIC);
|
|
||||||
try {
|
try {
|
||||||
|
if(cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
|
||||||
cliente.setNumfidelidade(new Long(Math.round(cell.getNumericCellValue())).toString());
|
cliente.setNumfidelidade(new Long(Math.round(cell.getNumericCellValue())).toString());
|
||||||
|
}else {
|
||||||
|
if(StringUtils.isNotBlank(cell.getStringCellValue())) {
|
||||||
|
try {
|
||||||
|
cliente.setNumfidelidade(new Long(cell.getStringCellValue().trim().replaceAll(" ","")).toString());
|
||||||
|
}catch (NumberFormatException e) {
|
||||||
|
cliente.setTelefone("");
|
||||||
|
erros.append(cliente.getNumfidelidade() + " - Numero de Telefone incorreto: " + cell.getStringCellValue().trim().replaceAll(" ","").toString());
|
||||||
|
erros.append("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
log.error("Erro na gravação do registro. Favor revisar",e);
|
log.error("Erro na gravação do registro. Favor revisar",e);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +241,7 @@ public class ImportacaoClientesSrvpServiceImpl implements ImportacaoClientesSrvp
|
||||||
cliente.setTipodoc(cell.getStringCellValue());
|
cliente.setTipodoc(cell.getStringCellValue());
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
cell.setCellType(Cell.CELL_TYPE_NUMERIC);
|
cell.setCellType(Cell.CELL_TYPE_STRING);
|
||||||
String numDocString = null;
|
String numDocString = null;
|
||||||
try {
|
try {
|
||||||
numDocString = new Long(Math.round(cell.getNumericCellValue())).toString();
|
numDocString = new Long(Math.round(cell.getNumericCellValue())).toString();
|
||||||
|
|
|
@ -63,11 +63,11 @@ public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBa
|
||||||
detalhado.append("Nao Quitado: ").append(detalhe.getNossoNumero()).append(".\n");
|
detalhado.append("Nao Quitado: ").append(detalhe.getNossoNumero()).append(".\n");
|
||||||
}
|
}
|
||||||
} catch (SQLException se) {
|
} catch (SQLException se) {
|
||||||
detalhado.append("Ocorreu um erro no banco de dados: ").append(detalhe.getNossoNumero());
|
detalhado.append("Ocorreu um erro no banco de dados: ").append(detalhe.getNossoNumero()).append(".\n");
|
||||||
log.error(se);
|
log.error(se);
|
||||||
erros++;
|
erros++;
|
||||||
} catch (RuntimeException re) {
|
} catch (RuntimeException re) {
|
||||||
detalhado.append(re.getMessage());
|
detalhado.append(re.getMessage()).append(".\n");
|
||||||
log.error(re);
|
log.error(re);
|
||||||
erros++;
|
erros++;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBa
|
||||||
|
|
||||||
if(linha.startsWith("1")) { //detalhe
|
if(linha.startsWith("1")) { //detalhe
|
||||||
DetalheRetornoItau detalhe = new DetalheRetornoItau();
|
DetalheRetornoItau detalhe = new DetalheRetornoItau();
|
||||||
detalhe.setNossoNumero(linha.substring(62, 70));
|
detalhe.setNossoNumero(linha.substring(85, 93)+"-"+linha.substring(93, 94));
|
||||||
arquivo.addTitulo(detalhe);
|
arquivo.addTitulo(detalhe);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -148,11 +148,11 @@ public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBa
|
||||||
FechamentoBoleto boleto = remessaCNABBancosDAO.obtenerFechamentoBoletoPorNossoNumero( detalhe.getNossoNumero(), empresaId );
|
FechamentoBoleto boleto = remessaCNABBancosDAO.obtenerFechamentoBoletoPorNossoNumero( detalhe.getNossoNumero(), empresaId );
|
||||||
|
|
||||||
if(boleto == null) {
|
if(boleto == null) {
|
||||||
throw new RuntimeException("Fechamento não encontrado para a empresa com o nosso numero: "+detalhe.getNossoNumero()+"\n");
|
throw new RuntimeException("Fechamento não encontrado para a empresa com o nosso numero: "+detalhe.getNossoNumero());
|
||||||
}
|
}
|
||||||
|
|
||||||
if( boleto.getIndBoletoQuitado() !=null && boleto.getIndBoletoQuitado()) {
|
if( boleto.getIndBoletoQuitado() !=null && boleto.getIndBoletoQuitado()) {
|
||||||
throw new RuntimeException("Boleto já quitado para a empresa com o nosso numero: "+detalhe.getNossoNumero()+"\n");
|
throw new RuntimeException("Boleto já quitado para a empresa com o nosso numero: "+detalhe.getNossoNumero());
|
||||||
}
|
}
|
||||||
|
|
||||||
return remessaCNABBancosDAO.quitarFechamentoBoleto( boleto.getFechamentoboletoId(), usuarioId );
|
return remessaCNABBancosDAO.quitarFechamentoBoleto( boleto.getFechamentoboletoId(), usuarioId );
|
||||||
|
|
|
@ -3,12 +3,14 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.OrgaoConcedenteDAO;
|
import com.rjconsultores.ventaboletos.dao.OrgaoConcedenteDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@ -17,13 +19,24 @@ public class OrgaoConcedenteServiceImpl implements OrgaoConcedenteService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrgaoConcedenteDAO orgaoConcedenteDAO;
|
private OrgaoConcedenteDAO orgaoConcedenteDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
private static Logger log = Logger.getLogger(OrgaoConcedenteServiceImpl.class);
|
||||||
|
|
||||||
public List<OrgaoConcedente> obtenerTodos() {
|
public List<OrgaoConcedente> obtenerTodos() {
|
||||||
return orgaoConcedenteDAO.obtenerTodos();
|
return orgaoConcedenteDAO.obtenerTodos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrgaoConcedente obtenerID(Integer id) {
|
public OrgaoConcedente obtenerID(Integer id) {
|
||||||
return orgaoConcedenteDAO.obtenerID(id);
|
|
||||||
|
OrgaoConcedente orgaoConcedente = orgaoConcedenteDAO.obtenerID(id);
|
||||||
|
try {
|
||||||
|
orgaoConcedente.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return orgaoConcedente;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -32,16 +45,29 @@ public class OrgaoConcedenteServiceImpl implements OrgaoConcedenteService {
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return orgaoConcedenteDAO.suscribir(entidad);
|
orgaoConcedenteDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, null);
|
||||||
|
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public OrgaoConcedente actualizacion(OrgaoConcedente entidad) {
|
public OrgaoConcedente actualizacion(OrgaoConcedente entidad) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
OrgaoConcedente originalClone = entidad.getCloneObject();
|
||||||
|
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return orgaoConcedenteDAO.actualizacion(entidad);
|
entidad = orgaoConcedenteDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return entidad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -51,6 +77,8 @@ public class OrgaoConcedenteServiceImpl implements OrgaoConcedenteService {
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
orgaoConcedenteDAO.actualizacion(entidad);
|
orgaoConcedenteDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OrgaoConcedente> buscar(String desc) {
|
public List<OrgaoConcedente> buscar(String desc) {
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
||||||
import com.rjconsultores.ventaboletos.dao.TramoDAO;
|
import com.rjconsultores.ventaboletos.dao.TramoDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.AgrupamentoParada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
@ -174,4 +175,8 @@ public class ParadaServiceImpl implements ParadaService {
|
||||||
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana){
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana){
|
||||||
return paradaDAO.buscaParadaRegionMetropolitana(regionMetropolitana);
|
return paradaDAO.buscaParadaRegionMetropolitana(regionMetropolitana);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Parada> buscarPorAgrupamentoParadaId(AgrupamentoParada agrupamentoParada){
|
||||||
|
return paradaDAO.buscarPorAgrupamentoParadaId(agrupamentoParada);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,18 @@
|
||||||
package com.rjconsultores.ventaboletos.service.impl;
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.PtovtaComissaoDAO;
|
import com.rjconsultores.ventaboletos.dao.PtovtaComissaoDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.PtovtaComissaoService;
|
import com.rjconsultores.ventaboletos.service.PtovtaComissaoService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -24,15 +28,26 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
@Service("ptovtaComissaoService")
|
@Service("ptovtaComissaoService")
|
||||||
public class PtovtaComissaoServiceImpl implements PtovtaComissaoService {
|
public class PtovtaComissaoServiceImpl implements PtovtaComissaoService {
|
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(PtovtaComissaoServiceImpl.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PtovtaComissaoDAO ptovtaComissaoDAO;
|
private PtovtaComissaoDAO ptovtaComissaoDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
|
||||||
public List<PtovtaComissao> obtenerTodos() {
|
public List<PtovtaComissao> obtenerTodos() {
|
||||||
return ptovtaComissaoDAO.obtenerTodos();
|
return ptovtaComissaoDAO.obtenerTodos();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PtovtaComissao obtenerID(Integer id) {
|
public PtovtaComissao obtenerID(Integer id) {
|
||||||
return ptovtaComissaoDAO.obtenerID(id);
|
|
||||||
|
PtovtaComissao ptovtaComissao = ptovtaComissaoDAO.obtenerID(id);
|
||||||
|
try {
|
||||||
|
ptovtaComissao.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return ptovtaComissao;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@ -41,16 +56,35 @@ public class PtovtaComissaoServiceImpl implements PtovtaComissaoService {
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return ptovtaComissaoDAO.suscribir(entidad);
|
ptovtaComissaoDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, entidad.getEmpresaId() != null ? entidad.getEmpresaId().getEmpresaId() : null);
|
||||||
|
|
||||||
|
return entidad;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public PtovtaComissao actualizacion(PtovtaComissao entidad) {
|
public PtovtaComissao actualizacion(PtovtaComissao entidad) {
|
||||||
|
|
||||||
|
|
||||||
|
PtovtaComissao originalClone = null;
|
||||||
|
try {
|
||||||
|
originalClone = entidad.getCloneObject();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("",e);
|
||||||
|
}
|
||||||
|
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
return ptovtaComissaoDAO.actualizacion(entidad);
|
ptovtaComissaoDAO.actualizacion(entidad);
|
||||||
|
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, entidad.getEmpresaId() != null ? entidad.getEmpresaId().getEmpresaId() : null);
|
||||||
|
|
||||||
|
return entidad;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
@ -6,6 +6,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.PtovtaTitularDAO;
|
import com.rjconsultores.ventaboletos.dao.PtovtaTitularDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||||
import com.rjconsultores.ventaboletos.service.PtovtaTitularService;
|
import com.rjconsultores.ventaboletos.service.PtovtaTitularService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
@ -31,7 +32,14 @@ public class PtovtaTitularServiceImpl implements PtovtaTitularService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PtovtaTitular obtenerID(Integer id) {
|
public PtovtaTitular obtenerID(Integer id) {
|
||||||
return ptovtaTitularDAO.obtenerID(id);
|
|
||||||
|
PtovtaTitular ptovtaTitular = ptovtaTitularDAO.obtenerID(id);
|
||||||
|
try {
|
||||||
|
ptovtaTitular.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return ptovtaTitular;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
@ -38,6 +38,7 @@ import com.rjconsultores.ventaboletos.exception.IntegracionException;
|
||||||
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
||||||
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
||||||
import com.rjconsultores.ventaboletos.service.EstacionService;
|
import com.rjconsultores.ventaboletos.service.EstacionService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
||||||
|
@ -82,6 +83,8 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
private UsuarioUbicacionDAO usuarioUbicacionDAO;
|
private UsuarioUbicacionDAO usuarioUbicacionDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSource dataSource;
|
private DataSource dataSource;
|
||||||
|
@Autowired
|
||||||
|
private LogAuditoriaService logAuditoriaService;
|
||||||
|
|
||||||
// FIXME : Remover esse método de quem está usando. Esse método carrega muitos dados
|
// FIXME : Remover esse método de quem está usando. Esse método carrega muitos dados
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -90,7 +93,15 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PuntoVenta obtenerID(Integer id) {
|
public PuntoVenta obtenerID(Integer id) {
|
||||||
return puntoVentaDAO.obtenerID(id);
|
|
||||||
|
PuntoVenta puntoVenta = puntoVentaDAO.obtenerID(id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
puntoVenta.clonar();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return puntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
|
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
|
||||||
|
@ -162,6 +173,8 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entidad = puntoVentaDAO.suscribir(entidad);
|
entidad = puntoVentaDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
|
|
||||||
|
|
||||||
// Mantis 15739 - A integração AG deve ser acionada após a persistência dos dados com sucesso.
|
// Mantis 15739 - A integração AG deve ser acionada após a persistência dos dados com sucesso.
|
||||||
// Integração AG
|
// Integração AG
|
||||||
|
@ -418,6 +431,14 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
|
|
||||||
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
|
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
|
||||||
public PuntoVenta actualizacion(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException {
|
public PuntoVenta actualizacion(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException {
|
||||||
|
|
||||||
|
PuntoVenta originalClone = null;
|
||||||
|
try {
|
||||||
|
originalClone = entidad.getCloneObject();
|
||||||
|
originalClone.setTitularId(entidad.getTitularId().getCloneObject());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("",e);
|
||||||
|
}
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
@ -475,7 +496,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
entidad = puntoVentaDAO.actualizacion(entidad);
|
entidad = puntoVentaDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditar(originalClone, entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
|
|
||||||
if (respEx != null) {
|
if (respEx != null) {
|
||||||
if (respEx instanceof IntegracionException) {
|
if (respEx instanceof IntegracionException) {
|
||||||
|
@ -549,6 +572,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
puntoVentaDAO.actualizacion(entidad);
|
puntoVentaDAO.actualizacion(entidad);
|
||||||
|
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, entidad.getEmpresa() != null && entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PuntoVenta> buscaLike(String strEstacion, boolean sinTodos) {
|
public List<PuntoVenta> buscaLike(String strEstacion, boolean sinTodos) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -234,6 +235,7 @@ public class RutaServiceImpl implements RutaService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean isClone = entidad.getIsClone() != null ? entidad.getIsClone() : Boolean.FALSE;
|
Boolean isClone = entidad.getIsClone() != null ? entidad.getIsClone() : Boolean.FALSE;
|
||||||
|
Boolean isCadastro = entidad.getIsCadastro();
|
||||||
|
|
||||||
if (entidad.getRutaId() == null) {
|
if (entidad.getRutaId() == null) {
|
||||||
entidad = rutaDAO.suscribir(entidad);
|
entidad = rutaDAO.suscribir(entidad);
|
||||||
|
@ -241,7 +243,7 @@ public class RutaServiceImpl implements RutaService {
|
||||||
entidad = rutaDAO.actualizacion(entidad);
|
entidad = rutaDAO.actualizacion(entidad);
|
||||||
}
|
}
|
||||||
if (lsParadasSequencia != null) {
|
if (lsParadasSequencia != null) {
|
||||||
if (!isClone) {
|
if (!isClone && !isCadastro) {
|
||||||
generarSecuencias(entidad, lsParadasSequencia);
|
generarSecuencias(entidad, lsParadasSequencia);
|
||||||
}
|
}
|
||||||
generarCombinacion(entidad);
|
generarCombinacion(entidad);
|
||||||
|
@ -283,9 +285,10 @@ public class RutaServiceImpl implements RutaService {
|
||||||
ClaseServicio claseServicio = ruta.getClaseServicio();
|
ClaseServicio claseServicio = ruta.getClaseServicio();
|
||||||
|
|
||||||
Tramo tramo = tramoService.obtenerTramoUnicoRuta(ori, des, via, claseServicio);
|
Tramo tramo = tramoService.obtenerTramoUnicoRuta(ori, des, via, claseServicio);
|
||||||
|
if (tramo == null && isCopiaComAlteracaoDeClasse(ruta)) {
|
||||||
if (tramo != null) {
|
tramo = tramoService.obtenerTramoUnicoRuta(ori, des, via, ruta.getClaseServicioRutaOrigem());
|
||||||
|
}
|
||||||
|
if (tramo != null ) {
|
||||||
RutaSecuencia rutaSecuencia = new RutaSecuencia();
|
RutaSecuencia rutaSecuencia = new RutaSecuencia();
|
||||||
rutaSecuencia.setRuta(ruta);
|
rutaSecuencia.setRuta(ruta);
|
||||||
rutaSecuencia.setTramo(tramo);
|
rutaSecuencia.setTramo(tramo);
|
||||||
|
@ -296,10 +299,30 @@ public class RutaServiceImpl implements RutaService {
|
||||||
rutaSecuencia.setKmOriginal(tramo.getKmReal());
|
rutaSecuencia.setKmOriginal(tramo.getKmReal());
|
||||||
rutaSecuencia = rutaSecuenciaService.suscribir(rutaSecuencia);
|
rutaSecuencia = rutaSecuenciaService.suscribir(rutaSecuencia);
|
||||||
|
|
||||||
List<RutaCaseta> lsRutaCaseta = rutaSecuenciaBackup.get(tramo.getTramoId());
|
List<RutaCaseta> lsRutaCaseta;
|
||||||
if( lsRutaCaseta != null && !lsRutaCaseta.isEmpty() ) {
|
if (ruta.getIsClone()) {
|
||||||
|
lsRutaCaseta = lsParadasSequencia.get(i).getCasetas();
|
||||||
|
if (lsRutaCaseta != null && !lsRutaCaseta.isEmpty()) {
|
||||||
|
List<RutaCaseta> rutasCaseta = new ArrayList<RutaCaseta>();
|
||||||
|
|
||||||
|
for (RutaCaseta rc : lsRutaCaseta) {
|
||||||
|
RutaCaseta rutaCaseta = new RutaCaseta();
|
||||||
|
rutaCaseta.setRutaSecuencia(rutaSecuencia);
|
||||||
|
rutaCaseta.setCasetaPeaje(rc.getCasetaPeaje());
|
||||||
|
rutaCaseta.setActivo(Boolean.TRUE);
|
||||||
|
rutaCaseta.setFecmodif(new Date());
|
||||||
|
rutaCaseta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
rutasCaseta.add(rutaCaseta);
|
||||||
|
}
|
||||||
|
|
||||||
|
rutaSecuencia.setLsRutaCase(rutasCaseta);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lsRutaCaseta = rutaSecuenciaBackup.get(tramo.getTramoId());
|
||||||
|
if (lsRutaCaseta != null && !lsRutaCaseta.isEmpty()) {
|
||||||
rutaSecuencia.setLsRutaCase(lsRutaCaseta);
|
rutaSecuencia.setLsRutaCase(lsRutaCaseta);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
lsRutaSecuencia.add(rutaSecuencia);
|
lsRutaSecuencia.add(rutaSecuencia);
|
||||||
|
@ -312,6 +335,10 @@ public class RutaServiceImpl implements RutaService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isCopiaComAlteracaoDeClasse(Ruta ruta) {
|
||||||
|
return ruta.getIsClone() && ruta.getClaseServicioRutaOrigem() != null && (ruta.getClaseServicioRutaOrigem().getClaseservicioId() != ruta.getClaseServicio().getClaseservicioId());
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = BusinessException.class)
|
@Transactional(rollbackFor = BusinessException.class)
|
||||||
public Ruta actualizacion(Ruta ruta, List<ParadaSecuencia> lsParadasSequencia) throws BusinessException {
|
public Ruta actualizacion(Ruta ruta, List<ParadaSecuencia> lsParadasSequencia) throws BusinessException {
|
||||||
if (lsParadasSequencia != null) {
|
if (lsParadasSequencia != null) {
|
||||||
|
@ -434,11 +461,19 @@ public class RutaServiceImpl implements RutaService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean indVenta(Ruta ruta, Tramo trBuscaOrigemDestino) {
|
private boolean indVenta(Ruta ruta, Tramo trBuscaOrigemDestino) {
|
||||||
|
if (!ruta.getIsClone()) {
|
||||||
for (RutaCombinacion rc : ruta.getRutaCombinacionList()) {
|
for (RutaCombinacion rc : ruta.getRutaCombinacionList()) {
|
||||||
if (rc.getTramo().equals(trBuscaOrigemDestino)) {
|
if (rc.getTramo().equals(trBuscaOrigemDestino)) {
|
||||||
return rc.getIndventa();
|
return rc.getIndventa();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
for (RutaCombinacion rcTemporaria : ruta.getRutaCombinacionTemporariaList()) {
|
||||||
|
if (rcTemporaria.getTramo().equals(trBuscaOrigemDestino)) {
|
||||||
|
return rcTemporaria.getIndventa();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.codehaus.jettison.json.JSONObject;
|
import org.codehaus.jettison.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -15,6 +16,7 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.FechamentoCntcorrente;
|
import com.rjconsultores.ventaboletos.entidad.FechamentoCntcorrente;
|
||||||
import com.rjconsultores.ventaboletos.rest.IntegracaoSapRest;
|
import com.rjconsultores.ventaboletos.rest.IntegracaoSapRest;
|
||||||
import com.rjconsultores.ventaboletos.service.SapService;
|
import com.rjconsultores.ventaboletos.service.SapService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
|
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
|
||||||
|
|
||||||
@Service("sapService")
|
@Service("sapService")
|
||||||
|
@ -22,6 +24,9 @@ public class SapServiceImpl implements SapService{
|
||||||
|
|
||||||
private static final String INTEGRACAO_SAP_URL = "INTEGRACAO_SAP_URL";
|
private static final String INTEGRACAO_SAP_URL = "INTEGRACAO_SAP_URL";
|
||||||
private static final String INTEGRACAO_SAP_CREDENCIAL = "INTEGRACAO_SAP_CREDENCIAL";
|
private static final String INTEGRACAO_SAP_CREDENCIAL = "INTEGRACAO_SAP_CREDENCIAL";
|
||||||
|
private static final int INTEGRACAO_SAP_OK = 1;
|
||||||
|
private static final int INTEGRACAO_SAP_ERRO = 2;
|
||||||
|
private static Logger log = Logger.getLogger(SapServiceImpl.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SapDAO sapDAO;
|
private SapDAO sapDAO;
|
||||||
|
@ -76,12 +81,14 @@ public class SapServiceImpl implements SapService{
|
||||||
JSONObject integrado = integracaoSapRest.enviarIntegracaoSap(fechamentoCntcorrente, url, credenciais);
|
JSONObject integrado = integracaoSapRest.enviarIntegracaoSap(fechamentoCntcorrente, url, credenciais);
|
||||||
|
|
||||||
if(integrado == null) {
|
if(integrado == null) {
|
||||||
throw new RuntimeException("Erro no envio/retorno da requisicao para integração SAP");
|
atualizaFechamento(fechamentoCntcorrente.getFechamentocntcorrenteId(), INTEGRACAO_SAP_ERRO);
|
||||||
|
log.error("Erro no envio/retorno da requisicao para integração SAP do fechamentoID: "+fechamentoCntcorrente.getFechamentocntcorrenteId());
|
||||||
}else if(integrado.getString("Integration").equals("S")) {
|
}else if(integrado.getString("Integration").equals("S")) {
|
||||||
atualizaFechamento(fechamentoCntcorrente.getFechamentocntcorrenteId());
|
atualizaFechamento(fechamentoCntcorrente.getFechamentocntcorrenteId(), INTEGRACAO_SAP_OK);
|
||||||
contador++;
|
contador++;
|
||||||
}else if(integrado.getString("Integration").equals("E")) {
|
}else if(integrado.getString("Integration").equals("E")) {
|
||||||
throw new RuntimeException("Retorno enviado pelo SAP: \r\n"+integrado.getString("Message"));
|
atualizaFechamento(fechamentoCntcorrente.getFechamentocntcorrenteId(), INTEGRACAO_SAP_ERRO);
|
||||||
|
log.warn("Retorno enviado pelo SAP: \r\n"+integrado.getString("Message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,8 +101,8 @@ public class SapServiceImpl implements SapService{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean atualizaFechamento(Long fechamentocntcorrenteId) throws Exception {
|
private boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
|
||||||
return sapDAO.atualizaFechamento( fechamentocntcorrenteId);
|
return sapDAO.atualizaFechamento( fechamentocntcorrenteId, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buscaConstante(String constanteString) {
|
private String buscaConstante(String constanteString) {
|
||||||
|
@ -110,10 +117,18 @@ public class SapServiceImpl implements SapService{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void integracaoSapAutomatica() throws Exception {
|
public void integracaoSapAutomatica() throws Exception {
|
||||||
List<FechamentoCntCorrenteVO> listaPendente = obtenerTodosParaRemessa(null, new Date(), new Date(), false);
|
List<FechamentoCntCorrenteVO> listaPendente = obtenerTodosParaRemessa(null, DateUtil.getYesterdayDate(), new Date(), false);
|
||||||
|
|
||||||
if(!listaPendente.isEmpty()) {
|
while(!listaPendente.isEmpty()) {
|
||||||
|
log.info("IntegracaoSap: Registro a enviar:"+listaPendente.size());
|
||||||
|
|
||||||
|
try {
|
||||||
remessa(listaPendente);
|
remessa(listaPendente);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
listaPendente = obtenerTodosParaRemessa(null, DateUtil.getYesterdayDate(), new Date(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,12 +397,28 @@ public class TramoRutaServiceImpl implements TramoRutaService {
|
||||||
nuevaSecuencia.setCoeficienteTarifa3(orgaoTramo.getCoeficienteTarifa3());
|
nuevaSecuencia.setCoeficienteTarifa3(orgaoTramo.getCoeficienteTarifa3());
|
||||||
nuevaSecuencia.setKmCoeficiente3(orgaoTramo.getKmCoeficiente3());
|
nuevaSecuencia.setKmCoeficiente3(orgaoTramo.getKmCoeficiente3());
|
||||||
nuevaSecuencia.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
nuevaSecuencia.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
||||||
|
} else if (IsClasseAlterada(rutaTramoVO)) {
|
||||||
|
orgaoTramo = orgaoTramoDAO.buscar(origen.getParadaId(), destino.getParadaId(), via.getViaId(), rutaTramoVO.getOrgaoConcedente().getOrgaoConcedenteId(), rutaTramoVO.getClaseServicioRutaOrigem().getClaseservicioId());
|
||||||
|
if (orgaoTramo != null) {
|
||||||
|
nuevaSecuencia.setKmCoeficiente1(orgaoTramo.getKmCoeficiente1());
|
||||||
|
nuevaSecuencia.setKmCoeficiente2(orgaoTramo.getKmCoeficiente2());
|
||||||
|
nuevaSecuencia.setKmCoeficiente3(orgaoTramo.getKmCoeficiente3());
|
||||||
|
nuevaSecuencia.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
||||||
|
nuevaSecuencia.setClaseServicioRutaOrigemUtilizadaNaPesquisa(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
incluirCoeficiente(nuevaSecuencia, rutaTramoVO);
|
incluirCoeficiente(nuevaSecuencia, rutaTramoVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void atualizandoSecuenciaPorTramosExistente(RutaTramoVO rutaTramoVO, Parada origen, Parada destino, Via via, SecuenciaRutaTramoCoeficienteVO nuevaSecuencia) {
|
private void atualizandoSecuenciaPorTramosExistente(RutaTramoVO rutaTramoVO, Parada origen, Parada destino, Via via, SecuenciaRutaTramoCoeficienteVO nuevaSecuencia) {
|
||||||
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
||||||
|
if (tramoServicio != null) {
|
||||||
|
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||||
|
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||||
|
nuevaSecuencia.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||||
|
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||||
|
} else if (IsClasseAlterada(rutaTramoVO)) {
|
||||||
|
tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicioRutaOrigem());
|
||||||
if (tramoServicio != null) {
|
if (tramoServicio != null) {
|
||||||
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||||
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||||
|
@ -410,6 +426,11 @@ public class TramoRutaServiceImpl implements TramoRutaService {
|
||||||
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean IsClasseAlterada(RutaTramoVO rutaTramoVO) {
|
||||||
|
return rutaTramoVO.getClaseServicioRutaOrigem() != null && rutaTramoVO.getClaseServicio().getClaseservicioId()!=rutaTramoVO.getClaseServicioRutaOrigem().getClaseservicioId();
|
||||||
|
}
|
||||||
|
|
||||||
private void incluirCoeficiente(SecuenciaRutaTramoCoeficienteVO nuevaSecuencia, RutaTramoVO rutaTramoVO) {
|
private void incluirCoeficiente(SecuenciaRutaTramoCoeficienteVO nuevaSecuencia, RutaTramoVO rutaTramoVO) {
|
||||||
if (nuevaSecuencia.getKmCoeficiente1() == null && rutaTramoVO.getCoeficienteDefault1() != null) {
|
if (nuevaSecuencia.getKmCoeficiente1() == null && rutaTramoVO.getCoeficienteDefault1() != null) {
|
||||||
|
@ -532,7 +553,7 @@ public class TramoRutaServiceImpl implements TramoRutaService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (secuencia.getOrgaoTramoId() == null
|
if ((secuencia.getClaseServicioRutaOrigemUtilizadaNaPesquisa() || secuencia.getOrgaoTramoId() == null )
|
||||||
&& secuencia.getCoeficienteTarifa1() != null) {
|
&& secuencia.getCoeficienteTarifa1() != null) {
|
||||||
OrgaoTramo orgaoTramo = new OrgaoTramo();
|
OrgaoTramo orgaoTramo = new OrgaoTramo();
|
||||||
orgaoTramo.setClaseServicio(claseServicio);
|
orgaoTramo.setClaseServicio(claseServicio);
|
||||||
|
@ -594,6 +615,16 @@ public class TramoRutaServiceImpl implements TramoRutaService {
|
||||||
for (SecuenciaRutaTramoCoeficienteVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
for (SecuenciaRutaTramoCoeficienteVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||||
RutaCombinacion rutaCombinacion = new RutaCombinacion();
|
RutaCombinacion rutaCombinacion = new RutaCombinacion();
|
||||||
rutaCombinacion.setIndventa(s.getPermiteVenda() == null ? true : s.getPermiteVenda());
|
rutaCombinacion.setIndventa(s.getPermiteVenda() == null ? true : s.getPermiteVenda());
|
||||||
|
if (ruta.getIsClone() ) {
|
||||||
|
Tramo tramoAtual = tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia());
|
||||||
|
for (RutaCombinacion rcRuta : ruta.getRutaCombinacionList()) {
|
||||||
|
if (rcRuta.getTramo() != null && tramoAtual != null && rcRuta.getTramo().getTramoId() == tramoAtual.getTramoId()) {
|
||||||
|
rutaCombinacion.setIndventa(rcRuta.getIndventa() == null ? true : rcRuta.getIndventa());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rutaCombinacion.setRuta(ruta);
|
rutaCombinacion.setRuta(ruta);
|
||||||
rutaCombinacion.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
rutaCombinacion.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,10 @@ public class UsuarioServiceImpl implements UsuarioService, UserDetailsService {
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
if (entidad.getUsuarioId() == null) {
|
if (entidad.getUsuarioId() == null) {
|
||||||
return usuarioDAO.suscribir(entidad);
|
usuarioDAO.suscribir(entidad);
|
||||||
|
logAuditoriaService.auditar(null, entidad, entidad.getEmpresa() != null && !entidad.getEmpresa().isEmpty()? entidad.getEmpresa().get(0).getEmpresaId(): null);
|
||||||
|
return entidad;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
entidad = usuarioDAO.actualizacion(entidad);
|
entidad = usuarioDAO.actualizacion(entidad);
|
||||||
logAuditoriaService.auditar(originalClone, entidad, entidad.getEmpresa() != null && !entidad.getEmpresa().isEmpty()? entidad.getEmpresa().get(0).getEmpresaId(): null);
|
logAuditoriaService.auditar(originalClone, entidad, entidad.getEmpresa() != null && !entidad.getEmpresa().isEmpty()? entidad.getEmpresa().get(0).getEmpresaId(): null);
|
||||||
|
@ -202,6 +205,7 @@ public class UsuarioServiceImpl implements UsuarioService, UserDetailsService {
|
||||||
entidad.setActivo(Boolean.FALSE);
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
usuarioDAO.actualizacion(entidad);
|
usuarioDAO.actualizacion(entidad);
|
||||||
|
logAuditoriaService.auditarExclusao(entidad, entidad.getEmpresa() != null && !entidad.getEmpresa().isEmpty()? entidad.getEmpresa().get(0).getEmpresaId(): null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Usuario buscarPeloNomeSenha(String stUsuario, String senha) {
|
public Usuario buscarPeloNomeSenha(String stUsuario, String senha) {
|
||||||
|
|
|
@ -8,6 +8,8 @@ public class ConexionVO {
|
||||||
private String tramoDestino;
|
private String tramoDestino;
|
||||||
private Long conexionCtrlId;
|
private Long conexionCtrlId;
|
||||||
|
|
||||||
|
private boolean buscaAgruapada;
|
||||||
|
|
||||||
public String getConOrigen() {
|
public String getConOrigen() {
|
||||||
return conOrigen;
|
return conOrigen;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +58,14 @@ public class ConexionVO {
|
||||||
this.conexionCtrlId = conexionCtrlId;
|
this.conexionCtrlId = conexionCtrlId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBuscaAgruapada() {
|
||||||
|
return buscaAgruapada;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuscaAgruapada(boolean buscaAgruapada) {
|
||||||
|
this.buscaAgruapada = buscaAgruapada;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ConexionVO [conOrigen=" + conOrigen + ", conDestino=" + conDestino + ", grupo=" + grupo + ", tramoOrigen=" + tramoOrigen + ", tramoDestino=" + tramoDestino + ", conexionCtrlId=" + conexionCtrlId + "]";
|
return "ConexionVO [conOrigen=" + conOrigen + ", conDestino=" + conDestino + ", grupo=" + grupo + ", tramoOrigen=" + tramoOrigen + ", tramoDestino=" + tramoDestino + ", conexionCtrlId=" + conexionCtrlId + "]";
|
||||||
|
|
|
@ -19,6 +19,7 @@ public class RutaTramoVO {
|
||||||
private Boolean ventaHandHeld;
|
private Boolean ventaHandHeld;
|
||||||
private Boolean solicitaNombrePasajero;
|
private Boolean solicitaNombrePasajero;
|
||||||
private ClaseServicio claseServicio;
|
private ClaseServicio claseServicio;
|
||||||
|
private ClaseServicio claseServicioRutaOrigem;
|
||||||
private OrgaoConcedente orgaoConcedente;
|
private OrgaoConcedente orgaoConcedente;
|
||||||
private List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO;
|
private List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO;
|
||||||
private List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionRutaTramoVO;
|
private List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionRutaTramoVO;
|
||||||
|
@ -169,6 +170,16 @@ public class RutaTramoVO {
|
||||||
this.lsParadaSecuenciaCombinacaoLinhas = lsParadaSecuenciaCombinacaoLinhas;
|
this.lsParadaSecuenciaCombinacaoLinhas = lsParadaSecuenciaCombinacaoLinhas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ClaseServicio getClaseServicioRutaOrigem() {
|
||||||
|
return claseServicioRutaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClaseServicioRutaOrigem(ClaseServicio claseServicioRutaOrigem) {
|
||||||
|
this.claseServicioRutaOrigem = claseServicioRutaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<Parada, BigDecimal> getParadasComKmEntradaSaida(){
|
public Map<Parada, BigDecimal> getParadasComKmEntradaSaida(){
|
||||||
Map<Parada, BigDecimal> kmEntradaSaida = new HashMap<Parada, BigDecimal>();
|
Map<Parada, BigDecimal> kmEntradaSaida = new HashMap<Parada, BigDecimal>();
|
||||||
for (SecuenciaRutaTramoVO s : getLsSecuenciaRutaTramoVO()){
|
for (SecuenciaRutaTramoVO s : getLsSecuenciaRutaTramoVO()){
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class SecuenciaRutaTramoCoeficienteVO {
|
||||||
private CoeficienteTarifa coeficienteTarifa3;
|
private CoeficienteTarifa coeficienteTarifa3;
|
||||||
private BigDecimal kmCoeficiente3;
|
private BigDecimal kmCoeficiente3;
|
||||||
private Boolean permiteVenda;
|
private Boolean permiteVenda;
|
||||||
|
private Boolean claseServicioRutaOrigemUtilizadaNaPesquisa;
|
||||||
|
|
||||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido) {
|
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido) {
|
||||||
super();
|
super();
|
||||||
|
@ -259,4 +260,14 @@ public class SecuenciaRutaTramoCoeficienteVO {
|
||||||
this.kmEntradaDestino = kmEntradaDestino;
|
this.kmEntradaDestino = kmEntradaDestino;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getClaseServicioRutaOrigemUtilizadaNaPesquisa() {
|
||||||
|
return claseServicioRutaOrigemUtilizadaNaPesquisa==null?false:claseServicioRutaOrigemUtilizadaNaPesquisa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClaseServicioRutaOrigemUtilizadaNaPesquisa(Boolean claseServicioRutaOrigemUtilizadaNaPesquisa) {
|
||||||
|
this.claseServicioRutaOrigemUtilizadaNaPesquisa = claseServicioRutaOrigemUtilizadaNaPesquisa;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue