Quando gerava o relatorio com alias, ele gerava duas colunas ambiguas :
origem e destino. Então foi criado uma condição, para um ou outromaster
parent
eda134453b
commit
80bc714e87
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>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.0.23</version>
|
<version>1.0.24</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|
|
@ -212,11 +212,13 @@ public class RelatorioBPe extends Relatorio {
|
||||||
if(alias != null && alias.equals("S")) {// ALIAS Origem/Destino dos bilhetes
|
if(alias != null && alias.equals("S")) {// ALIAS Origem/Destino dos bilhetes
|
||||||
sql.append(" COALESCE(oriA.DESCPARADA, ori.DESCPARADA) as origem, ");
|
sql.append(" COALESCE(oriA.DESCPARADA, ori.DESCPARADA) as origem, ");
|
||||||
sql.append(" COALESCE(destA.DESCPARADA, dest.DESCPARADA) as destino,");
|
sql.append(" COALESCE(destA.DESCPARADA, dest.DESCPARADA) as destino,");
|
||||||
|
}else {
|
||||||
|
sql.append(" ori.DESCPARADA as origem, ");
|
||||||
|
sql.append(" dest.DESCPARADA as destino,");
|
||||||
}
|
}
|
||||||
sql.append(" locpv.DESCPARADA as locpuntoventa, ");
|
sql.append(" locpv.DESCPARADA as locpuntoventa, ");
|
||||||
sql.append(" pv.NUMPUNTOVENTA as numPuntoVenta, ");
|
sql.append(" pv.NUMPUNTOVENTA as numPuntoVenta, ");
|
||||||
sql.append(" ori.DESCPARADA as origem, ");
|
|
||||||
sql.append(" dest.DESCPARADA as destino,");
|
|
||||||
|
|
||||||
|
|
||||||
sql.append(" TO_CHAR(bol.FECHORVIAJE,'dd/mm/yyyy HH24:MI') as dtviagem, ");
|
sql.append(" TO_CHAR(bol.FECHORVIAJE,'dd/mm/yyyy HH24:MI') as dtviagem, ");
|
||||||
|
@ -238,7 +240,7 @@ public class RelatorioBPe extends Relatorio {
|
||||||
sql.append(" case ");
|
sql.append(" case ");
|
||||||
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 0 then 'Autorizado' ");
|
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 0 then 'Autorizado' ");
|
||||||
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 1 then 'Aut.Conting.' ");
|
sql.append(" when bpe.tiposubstituicao is null and bpeSub.bpe_id is null and bpe.indcontingencia = 1 then 'Aut.Conting.' ");
|
||||||
sql.append(" when bpe.tiposubstituicao is not null then 'Autorizado/Substituição' ");
|
sql.append(" when bpe.tiposubstituicao is not null then 'Autorizado/Substituicâo' ");
|
||||||
sql.append(" when bpeSub.bpe_id is not null then 'Autorizado/Substituído' ");
|
sql.append(" when bpeSub.bpe_id is not null then 'Autorizado/Substituído' ");
|
||||||
sql.append(" else 'Autorizado' ");
|
sql.append(" else 'Autorizado' ");
|
||||||
sql.append(" end ");
|
sql.append(" end ");
|
||||||
|
|
Loading…
Reference in New Issue