13303: Relatorio Tipo de Passagem
fixed bug#13303 dev:thiago qua:bruno git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@89049 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a5d5751f69
commit
18a4d0c2b6
|
@ -7,6 +7,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioGratuidadeBean;
|
||||
|
@ -82,13 +84,13 @@ public class RelatorioGratuidade extends Relatorio {
|
|||
if(ruta != null && !ruta.equals("")){
|
||||
stmt.setInt("ruta_id", Integer.parseInt(ruta));
|
||||
}
|
||||
if(origem != null && !origem.equals("")){
|
||||
if(StringUtils.isNotBlank(origem) && !origem.equals("-1")){
|
||||
stmt.setInt("origem_id", Integer.parseInt(origem));
|
||||
}
|
||||
if(destino != null && !destino.equals("")){
|
||||
if(StringUtils.isNotBlank(destino) && !origem.equals("-1")){
|
||||
stmt.setInt("destino_id", Integer.parseInt(destino));
|
||||
}
|
||||
if(orgaoConcedenteId != null){
|
||||
if(orgaoConcedenteId != null && !orgaoConcedenteId.equals(-1)){
|
||||
stmt.setInt("orgao_concedente_id", orgaoConcedenteId);
|
||||
}
|
||||
|
||||
|
@ -242,16 +244,16 @@ public class RelatorioGratuidade extends Relatorio {
|
|||
if (!ruta.isEmpty() && !ruta.equals("-1")){
|
||||
sb.append(" AND b.ruta_id = :ruta_id ");
|
||||
}
|
||||
if(!origem.isEmpty()){
|
||||
if(!origem.isEmpty() && !origem.equals("-1")){
|
||||
sb.append(" AND ori.parada_id = :origem_id ");
|
||||
}
|
||||
if(!destino.isEmpty()){
|
||||
if(!destino.isEmpty() && !destino.equals("-1")){
|
||||
sb.append(" AND des.parada_id = :destino_id ");
|
||||
}
|
||||
if(!categoria.isEmpty()){
|
||||
sb.append(" AND ca.categoria_id in ("+ categoria +") ");
|
||||
}
|
||||
if(orgaoConcedenteId != null){
|
||||
if(orgaoConcedenteId != null && !orgaoConcedenteId.equals(-1)){
|
||||
sb.append(" AND r.orgaoconcedente_id = :orgao_concedente_id ");
|
||||
}
|
||||
sb.append(" ");
|
||||
|
@ -332,16 +334,16 @@ public class RelatorioGratuidade extends Relatorio {
|
|||
if (!ruta.isEmpty() && !ruta.equals("-1")){
|
||||
sb.append("AND c.ruta_id = :ruta_id ");
|
||||
}
|
||||
if(!origem.isEmpty()){
|
||||
if(!origem.isEmpty() && !origem.equals("-1")){
|
||||
sb.append("AND ori.parada_id = :origem_id ");
|
||||
}
|
||||
if(!destino.isEmpty()){
|
||||
if(!destino.isEmpty() && !destino.equals("-1")){
|
||||
sb.append("AND des.parada_id = :destino_id ");
|
||||
}
|
||||
if(!categoria.isEmpty()){
|
||||
sb.append("AND ca.categoria_id in ("+ categoria +") ");
|
||||
}
|
||||
if(orgaoConcedenteId != null){
|
||||
if(orgaoConcedenteId != null && !orgaoConcedenteId.equals(-1)){
|
||||
sb.append("AND r.orgaoconcedente_id = :orgao_concedente_id ");
|
||||
}
|
||||
sb.append(") ");
|
||||
|
|
Loading…
Reference in New Issue