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(" when b.motivocancelacion_id = 11 ");
|
||||||
sb.append(" and b.indcancelacion = 1 then 'LIBERA.RESERVA' ");
|
sb.append(" and b.indcancelacion = 1 then 'LIBERA.RESERVA' ");
|
||||||
sb.append(" when b.motivocancelacion_id = 12 then 'LIBERA.RESERVA AUTO' ");
|
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(" else b.indstatusboleto ");
|
||||||
sb.append(" end as indstatusboleto, ");
|
sb.append(" end as indstatusboleto, ");
|
||||||
sb.append(" ori.cveparada codorigem,");
|
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 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 = '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.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(" end as indstatusboleto,");
|
||||||
sb.append(" ori.cveparada codorigem,");
|
sb.append(" ori.cveparada codorigem,");
|
||||||
sb.append(" des.cveparada coddestino");
|
sb.append(" des.cveparada coddestino");
|
||||||
|
|
|
@ -43,7 +43,8 @@ public class RelatorioVendasBilheteiro extends Relatorio {
|
||||||
sql.append(" p_origen.DESCPARADA ORIGEM, ");
|
sql.append(" p_origen.DESCPARADA ORIGEM, ");
|
||||||
sql.append(" p_destino.DESCPARADA DESTINO, ");
|
sql.append(" p_destino.DESCPARADA DESTINO, ");
|
||||||
sql.append(" ct.DESCCATEGORIA TIPO_BILHETE, ");
|
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.FECCORRIDA DATA_VIAGEM, ");
|
||||||
sql.append(" c.CORRIDA_ID SERVICO, ");
|
sql.append(" c.CORRIDA_ID SERVICO, ");
|
||||||
sql.append(" c.IMPORTEPEDAGIO PEDAGIO," );
|
sql.append(" c.IMPORTEPEDAGIO PEDAGIO," );
|
||||||
|
@ -64,7 +65,7 @@ public class RelatorioVendasBilheteiro extends Relatorio {
|
||||||
sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
|
sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
|
||||||
sql.append(" and c.FECHORVENTA >= :DATA_INICIAL ");
|
sql.append(" and c.FECHORVENTA >= :DATA_INICIAL ");
|
||||||
sql.append(" and c.FECHORVENTA <= :DATA_FINAL ");
|
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() + ")");
|
sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
|
||||||
}
|
}
|
||||||
if (parametros.get("BILHETEIRO") != null && !parametros.get("BILHETEIRO").equals("")) {
|
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 Logger log = Logger.getLogger(Relatorio.class);
|
||||||
private static final String DEFAULT_BASE_DIR = "/com/rjconsultores/ventaboletos/relatorios";
|
private static final String DEFAULT_BASE_DIR = "/com/rjconsultores/ventaboletos/relatorios";
|
||||||
|
private static final String FILTRO_POR_TODOS = "-1";
|
||||||
|
|
||||||
private Connection conexao;
|
private Connection conexao;
|
||||||
protected Map<String, Object> parametros;
|
protected Map<String, Object> parametros;
|
||||||
|
@ -146,6 +147,16 @@ public abstract class Relatorio {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
public Set<String> getInfoMsg() {
|
||||||
return infoMsg;
|
return infoMsg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,8 +163,8 @@ public class RelatorioVendasBilheteiroController extends MyGenericForwardCompose
|
||||||
}
|
}
|
||||||
|
|
||||||
// removendo ultima virgula
|
// removendo ultima virgula
|
||||||
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1);
|
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 2);
|
||||||
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1);
|
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 2);
|
||||||
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
|
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
|
||||||
}
|
}
|
||||||
filtro.append(puntoVentas).append(";");
|
filtro.append(puntoVentas).append(";");
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winFiltroRelatorioVendasBilheteiro"
|
<window id="winFiltroRelatorioVendasBilheteiro"
|
||||||
apply="${relatorioVendasBilheteiroController}"
|
apply="${relatorioVendasBilheteiroController}"
|
||||||
contentStyle="overflow:auto" height="400px" width="550px"
|
contentStyle="overflow:auto" height="325px" width="550px"
|
||||||
border="normal">
|
border="normal">
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
|
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
|
||||||
<listheader width="20%"
|
<listheader width="20%"
|
||||||
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
|
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
|
||||||
<listheader width="5%" />
|
<listheader width="7%" />
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
||||||
|
|
Loading…
Reference in New Issue