fixes bug#0014824
dev: frederico qua: filipe Correção efetuada no relatório de Venda por Bilheteiro. O relatório de Tipo Passagem deverá ser uma melhoria conforme orientação do Filipe(suporte). git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@95590 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ebe84e2031
commit
db9e1e5e8f
|
@ -209,6 +209,7 @@ public class RelatorioGratuidade extends Relatorio {
|
|||
sb.append(" when b.motivocancelacion_id = 11 ");
|
||||
sb.append(" and b.indcancelacion = 1 then 'LIBERA.RESERVA' ");
|
||||
sb.append(" when b.motivocancelacion_id = 12 then 'LIBERA.RESERVA AUTO' ");
|
||||
sb.append(" when b.indreimpresion = 1 and b.motivoreimpresion_id = 99 then 'REIMPRESSO' ");
|
||||
sb.append(" else b.indstatusboleto ");
|
||||
sb.append(" end as indstatusboleto, ");
|
||||
sb.append(" ori.cveparada codorigem,");
|
||||
|
@ -317,6 +318,7 @@ public class RelatorioGratuidade extends Relatorio {
|
|||
sb.append(" when ct.cambiotitularidad_id is not null then 'TROCA TITULARIDADE' ");
|
||||
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 23 then 'TRANSFERIDO' ");
|
||||
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 41 then 'CHECKIN REATIVADO' ");
|
||||
sb.append(" when c.indreimpresion = 1 and c.motivoreimpresion_id = 99 then 'REIMPRESSO' ");
|
||||
sb.append(" end as indstatusboleto,");
|
||||
sb.append(" ori.cveparada codorigem,");
|
||||
sb.append(" des.cveparada coddestino");
|
||||
|
|
|
@ -43,7 +43,8 @@ public class RelatorioVendasBilheteiro extends Relatorio {
|
|||
sql.append(" p_origen.DESCPARADA ORIGEM, ");
|
||||
sql.append(" p_destino.DESCPARADA DESTINO, ");
|
||||
sql.append(" ct.DESCCATEGORIA TIPO_BILHETE, ");
|
||||
sql.append(" c.INDSTATUSBOLETO STATUS_PASSAGEM, ");
|
||||
sql.append(" case when (c.INDREIMPRESION = 1 and c.MOTIVOREIMPRESION_ID = 99) then ");
|
||||
sql.append(" 'R' else c.INDSTATUSBOLETO end STATUS_PASSAGEM,");
|
||||
sql.append(" c.FECCORRIDA DATA_VIAGEM, ");
|
||||
sql.append(" c.CORRIDA_ID SERVICO, ");
|
||||
sql.append(" c.IMPORTEPEDAGIO PEDAGIO," );
|
||||
|
@ -64,7 +65,7 @@ public class RelatorioVendasBilheteiro extends Relatorio {
|
|||
sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
|
||||
sql.append(" and c.FECHORVENTA >= :DATA_INICIAL ");
|
||||
sql.append(" and c.FECHORVENTA <= :DATA_FINAL ");
|
||||
if (parametros.get("NUMPUNTOVENTA") != null) {
|
||||
if (parametros.get("NUMPUNTOVENTA") != null && !possuiFiltroTodos("NUMPUNTOVENTA")) {
|
||||
sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
|
||||
}
|
||||
if (parametros.get("BILHETEIRO") != null && !parametros.get("BILHETEIRO").equals("")) {
|
||||
|
|
|
@ -19,6 +19,7 @@ public abstract class Relatorio {
|
|||
|
||||
private static Logger log = Logger.getLogger(Relatorio.class);
|
||||
private static final String DEFAULT_BASE_DIR = "/com/rjconsultores/ventaboletos/relatorios";
|
||||
private static final String FILTRO_POR_TODOS = "-1";
|
||||
|
||||
private Connection conexao;
|
||||
protected Map<String, Object> parametros;
|
||||
|
@ -145,6 +146,16 @@ public abstract class Relatorio {
|
|||
return conteudo;
|
||||
|
||||
}
|
||||
|
||||
protected boolean possuiFiltroTodos(String parametro) {
|
||||
String ids = (String)parametros.get(parametro);
|
||||
for (int i = 0; i < ids.split(", ").length; i++) {
|
||||
if (FILTRO_POR_TODOS.equals(ids.split(", ")[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Set<String> getInfoMsg() {
|
||||
return infoMsg;
|
||||
|
|
|
@ -157,14 +157,14 @@ public class RelatorioVendasBilheteiroController extends MyGenericForwardCompose
|
|||
} else {
|
||||
for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) {
|
||||
PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i);
|
||||
puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ",";
|
||||
puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ", ";
|
||||
|
||||
puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ",";
|
||||
puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ", ";
|
||||
}
|
||||
|
||||
// removendo ultima virgula
|
||||
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1);
|
||||
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1);
|
||||
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 2);
|
||||
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 2);
|
||||
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
|
||||
}
|
||||
filtro.append(puntoVentas).append(";");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioVendasBilheteiro"
|
||||
apply="${relatorioVendasBilheteiroController}"
|
||||
contentStyle="overflow:auto" height="400px" width="550px"
|
||||
contentStyle="overflow:auto" height="325px" width="550px"
|
||||
border="normal">
|
||||
|
||||
<grid fixedLayout="true">
|
||||
|
@ -96,7 +96,7 @@
|
|||
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
|
||||
<listheader width="20%"
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
|
||||
<listheader width="5%" />
|
||||
<listheader width="7%" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
||||
|
|
Loading…
Reference in New Issue