implementado relatorio tabela preço artesp feat bug#AL-2336
parent
d15c343e81
commit
c08ad10a82
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ModelWeb</artifactId>
|
<artifactId>ModelWeb</artifactId>
|
||||||
<version>1.1.50</version>
|
<version>1.2.0</version>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>rj-releases</id>
|
<id>rj-releases</id>
|
||||||
|
|
|
@ -30,6 +30,7 @@ import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -168,17 +169,20 @@ public class ParadaHibernateDAO extends GenericHibernateDAO<Parada, Integer> imp
|
||||||
@Override
|
@Override
|
||||||
public List<Parada> obterPossiveisDestinos(Parada origem) {
|
public List<Parada> obterPossiveisDestinos(Parada origem) {
|
||||||
if (origem == null) {
|
if (origem == null) {
|
||||||
return null;
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT DISTINCT ")
|
||||||
|
.append("d ")
|
||||||
|
.append( "FROM Tramo t ")
|
||||||
|
.append( "JOIN t.destino d ")
|
||||||
|
.append( "WHERE t.origem = :origem ")
|
||||||
|
.append( "ORDER BY d.descparada ");
|
||||||
|
|
||||||
String sql = "SELECT DISTINCT "
|
return getSession()
|
||||||
+ "d "
|
.createQuery(sql.toString())
|
||||||
+ "FROM Tramo t "
|
.setEntity("origem", origem)
|
||||||
+ "JOIN t.destino d "
|
.list();
|
||||||
+ "WHERE t.origem = :origem "
|
|
||||||
+ "ORDER BY d.descparada";
|
|
||||||
|
|
||||||
return getSession().createQuery(sql).setEntity("origem", origem).list();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class RutaHibernateDAO extends GenericHibernateDAO<Ruta, Integer> impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Ruta> buscarPorClaseServicioEmpresa(ClaseServicio claseServicio, Empresa empresa) {
|
public List<Ruta> buscarPorClaseServicioEmpresa(ClaseServicio claseServicio, Empresa empresa) {
|
||||||
StringBuffer hql = new StringBuffer();
|
StringBuilder hql = new StringBuilder();
|
||||||
hql.append("SELECT DISTINCT r ");
|
hql.append("SELECT DISTINCT r ");
|
||||||
hql.append("FROM Ruta r INNER JOIN r.lsRutaEmpresa re ");
|
hql.append("FROM Ruta r INNER JOIN r.lsRutaEmpresa re ");
|
||||||
hql.append("WHERE r.claseServicio.claseservicioId = :idClaseServicio ");
|
hql.append("WHERE r.claseServicio.claseservicioId = :idClaseServicio ");
|
||||||
|
|
|
@ -158,7 +158,20 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
||||||
if(fechamentocntcorrenteId == null ) {
|
if(fechamentocntcorrenteId == null ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
getSession().flush();
|
||||||
|
|
||||||
|
StringBuilder qry = new StringBuilder();
|
||||||
|
qry.append(" UPDATE FECHAMENTO_CNTCORRENTE ");
|
||||||
|
qry.append(" SET INDINTEGRADOSAP = :status ");
|
||||||
|
qry.append(" WHERE FECHAMENTOCNTCORRENTE_ID = :fechamentoId ");
|
||||||
|
|
||||||
|
Query query = getSession().createSQLQuery(qry.toString());
|
||||||
|
query.setInteger("status", status);
|
||||||
|
query.setLong("fechamentoId", fechamentocntcorrenteId);
|
||||||
|
|
||||||
|
query.executeUpdate();
|
||||||
|
*/
|
||||||
//é feito update manualmente porque o hibernate utiliza sco_read e nao tem permissao de escrita no banco
|
//é feito update manualmente porque o hibernate utiliza sco_read e nao tem permissao de escrita no banco
|
||||||
try(Connection con = scoDs.getConnection();
|
try(Connection con = scoDs.getConnection();
|
||||||
Statement stmt = con.createStatement()){
|
Statement stmt = con.createStatement()){
|
||||||
|
|
|
@ -37,25 +37,36 @@ public class RutaCombinacion implements Serializable, Cloneable {
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "RUTA_COMBINACION_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "RUTA_COMBINACION_SEQ")
|
||||||
@Column(name = "RUTACOMBINACION_ID")
|
@Column(name = "RUTACOMBINACION_ID")
|
||||||
private Integer rutacombinacionId;
|
private Integer rutacombinacionId;
|
||||||
|
|
||||||
@Column(name = "INDVENTA")
|
@Column(name = "INDVENTA")
|
||||||
private Boolean indventa;
|
private Boolean indventa;
|
||||||
|
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
|
|
||||||
@Column(name = "FECMODIF")
|
@Column(name = "FECMODIF")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
|
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
|
||||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tramo tramo;
|
private Tramo tramo;
|
||||||
|
|
||||||
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Ruta ruta;
|
private Ruta ruta;
|
||||||
|
|
||||||
@Column(name = "INDUSAPRICING")
|
@Column(name = "INDUSAPRICING")
|
||||||
private Boolean indUsaPricing;
|
private Boolean indUsaPricing;
|
||||||
|
|
||||||
@Column(name = "CODIGODERPR")
|
@Column(name = "CODIGODERPR")
|
||||||
private String codigoDerPr;
|
private String codigoDerPr;
|
||||||
|
|
||||||
|
@Column(name = "INDEXIBETABELA")
|
||||||
|
private Boolean indExibeTabela;
|
||||||
|
|
||||||
public RutaCombinacion() {
|
public RutaCombinacion() {
|
||||||
}
|
}
|
||||||
|
@ -166,4 +177,12 @@ public class RutaCombinacion implements Serializable, Cloneable {
|
||||||
public void setCodigoDerPr(String codigoDerPr) {
|
public void setCodigoDerPr(String codigoDerPr) {
|
||||||
this.codigoDerPr = codigoDerPr;
|
this.codigoDerPr = codigoDerPr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isIndExibeTabela() {
|
||||||
|
return Boolean.TRUE.equals(indExibeTabela);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndExibeTabela(Boolean indExibeTabela) {
|
||||||
|
this.indExibeTabela = indExibeTabela;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue