- ajuste nos campos para "blank with null"

- ajuste no filtro de categoria

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@30029 d1611594-4594-4d17-8e1d-87c2c4800839
master
gleimar 2013-08-26 20:31:04 +00:00
parent 8bbe8334f7
commit b41fb43c07
5 changed files with 30 additions and 23 deletions

View File

@ -34,7 +34,7 @@
and pa.ciudad_id = ci.ciudad_id and pa.ciudad_id = ci.ciudad_id
and ci.estado_id = es.estado_id and ci.estado_id = es.estado_id
and nvl(cj.empresacorrida_id, ma.empresa_id) = $P{EMPRESA_ID} and nvl(cj.empresacorrida_id, ma.empresa_id) = $P{EMPRESA_ID}
and INSTR($P{LS_CATEGORIA}, '_' || cj.categoria_id || '_') > 0 $P!{LS_CATEGORIA}
and trunc(cj.fechorventa) between trunc($P{DATA_INICIO}) and trunc($P{DATA_FINAL}) and trunc(cj.fechorventa) between trunc($P{DATA_INICIO}) and trunc($P{DATA_FINAL})
and ((cj.feccorrida is null) or ($P{PASSAGEM_ABERTA} = 'T')) and ((cj.feccorrida is null) or ($P{PASSAGEM_ABERTA} = 'T'))
order by em.nombempresa, es.cveestado, cj.fechorventa]]> order by em.nombempresa, es.cveestado, cj.fechorventa]]>
@ -75,12 +75,12 @@
<line> <line>
<reportElement uuid="7f823bdb-3f3e-4ef8-a8f5-cff9b209950f" x="3" y="19" width="550" height="1"/> <reportElement uuid="7f823bdb-3f3e-4ef8-a8f5-cff9b209950f" x="3" y="19" width="550" height="1"/>
</line> </line>
<textField pattern="¤ #,##0.00"> <textField pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="29243b22-1d58-42a5-9b9b-fdcf6d5f0af8" x="282" y="5" width="112" height="13"/> <reportElement uuid="29243b22-1d58-42a5-9b9b-fdcf6d5f0af8" x="282" y="5" width="112" height="13"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{PRECIOPAGADO_2}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{PRECIOPAGADO_2}]]></textFieldExpression>
</textField> </textField>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="04b267c9-2329-47c7-9b3f-752180765e40" x="124" y="5" width="100" height="13"/> <reportElement uuid="04b267c9-2329-47c7-9b3f-752180765e40" x="124" y="5" width="100" height="13"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_2}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_2}]]></textFieldExpression>
@ -185,32 +185,32 @@ new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date())]]></textFieldExpr
</columnHeader> </columnHeader>
<detail> <detail>
<band height="16" splitType="Stretch"> <band height="16" splitType="Stretch">
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="2a9e93e0-2af2-4a11-a6b7-928b09da8f95" x="63" y="1" width="46" height="13"/> <reportElement uuid="2a9e93e0-2af2-4a11-a6b7-928b09da8f95" x="63" y="1" width="46" height="13"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{CVEESTADO}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{CVEESTADO}]]></textFieldExpression>
</textField> </textField>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="c6ccd2c0-3ce3-442f-b3a3-4c2ce1cb4e61" x="115" y="1" width="71" height="13"/> <reportElement uuid="c6ccd2c0-3ce3-442f-b3a3-4c2ce1cb4e61" x="115" y="1" width="71" height="13"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{NUMFOLIOSISTEMA}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{NUMFOLIOSISTEMA}]]></textFieldExpression>
</textField> </textField>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="93c9e2f4-2143-48f3-972b-1a50eb28530d" x="191" y="1" width="58" height="13"/> <reportElement uuid="93c9e2f4-2143-48f3-972b-1a50eb28530d" x="191" y="1" width="58" height="13"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECHORVENTA})]]></textFieldExpression> <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECHORVENTA})]]></textFieldExpression>
</textField> </textField>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="58b201d8-a164-47c5-94a2-96f27e779aac" x="254" y="1" width="65" height="13"/> <reportElement uuid="58b201d8-a164-47c5-94a2-96f27e779aac" x="254" y="1" width="65" height="13"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECCORRIDA})]]></textFieldExpression> <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECCORRIDA})]]></textFieldExpression>
</textField> </textField>
<textField pattern="¤ #,##0.00"> <textField pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="6b607479-5d7e-4234-a798-4ed9f4bfc81a" x="330" y="1" width="64" height="13"/> <reportElement uuid="6b607479-5d7e-4234-a798-4ed9f4bfc81a" x="330" y="1" width="64" height="13"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{PRECIOPAGADO}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{PRECIOPAGADO}]]></textFieldExpression>
</textField> </textField>
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="ff556fd3-09fe-46f0-aaaf-7a9d26c272a9" x="3" y="1" width="55" height="13"/> <reportElement uuid="ff556fd3-09fe-46f0-aaaf-7a9d26c272a9" x="3" y="1" width="55" height="13"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$F{NUMSERIEPREIMPRESA}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{NUMSERIEPREIMPRESA}]]></textFieldExpression>
@ -219,12 +219,12 @@ new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date())]]></textFieldExpr
</detail> </detail>
<summary> <summary>
<band height="17" splitType="Stretch"> <band height="17" splitType="Stretch">
<textField> <textField isBlankWhenNull="true">
<reportElement uuid="e1b9dc69-f615-4cbb-97d6-e449329e2397" x="124" y="1" width="100" height="13"/> <reportElement uuid="e1b9dc69-f615-4cbb-97d6-e449329e2397" x="124" y="1" width="100" height="13"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_1}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_1}]]></textFieldExpression>
</textField> </textField>
<textField pattern="¤ #,##0.00"> <textField pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="2b8ecb41-97ef-40eb-8db6-491211a24529" x="282" y="1" width="112" height="13"/> <reportElement uuid="2b8ecb41-97ef-40eb-8db6-491211a24529" x="282" y="1" width="112" height="13"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{PRECIOPAGADO_1}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{PRECIOPAGADO_1}]]></textFieldExpression>

View File

@ -13,6 +13,7 @@ import java.util.Map;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -186,15 +187,12 @@ public class RelatorioPassageirosViajarController extends MyGenericForwardCompos
* *
*/ */
private void executarPesquisa() { private void executarPesquisa() {
HibernateSearchObject<Categoria> categoriaBusqueda = HibernateSearchObject<Categoria> categoriaBusqueda =new HibernateSearchObject<Categoria>(Categoria.class,pagingCategoria.getPageSize());
new HibernateSearchObject<Categoria>(Categoria.class,
pagingCategoria.getPageSize());
categoriaBusqueda.addFilterOr(Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")), categoriaBusqueda.addFilterOr(Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")),
Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%"))); Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")));
categoriaBusqueda.addSortAsc("desccategoria"); categoriaBusqueda.addSortAsc("desccategoria");
categoriaBusqueda.addFilterEqual("activo", Boolean.TRUE); categoriaBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwCategoria.init(categoriaBusqueda, categoriaList, pagingCategoria); plwCategoria.init(categoriaBusqueda, categoriaList, pagingCategoria);
@ -227,13 +225,22 @@ public class RelatorioPassageirosViajarController extends MyGenericForwardCompos
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue(); Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
parametros.put("EMPRESA_ID", e.getEmpresaId().toString()); parametros.put("EMPRESA_ID", e.getEmpresaId().toString());
lsNumCategoria = new ArrayList(Arrays.asList(categoriaSelList.getData())); String strNumCategoria="";
StringBuilder strNumCategoria = new StringBuilder();
strNumCategoria.append("_"); StringBuilder sbCategoria = new StringBuilder("");
for (Categoria c : lsNumCategoria) { if (categoriaSelList.getData().length != 0){
strNumCategoria.append(c.getCategoriaId().toString() + '_');
lsNumCategoria = new ArrayList(Arrays.asList(categoriaSelList.getData()));
sbCategoria = new StringBuilder(" and cj.categoria_id in ( ");
for (Categoria c : lsNumCategoria) {
sbCategoria.append(c.getCategoriaId().toString()).append(",");
}
sbCategoria.delete(sbCategoria.length()-1,sbCategoria.length());
sbCategoria.append(")");
} }
parametros.put("LS_CATEGORIA", strNumCategoria.toString());
parametros.put("LS_CATEGORIA", sbCategoria.toString());
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId()); parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId());
Relatorio relatorio = new RelatorioPassageirosViajar(parametros, dataSource.getConnection()); Relatorio relatorio = new RelatorioPassageirosViajar(parametros, dataSource.getConnection());

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX # <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto: #Versao do VentaBoleto:
versao = ADM_20130825_1RC208 versao = ADM_20130826_1RC209
# MSG Defaut: # MSG Defaut:
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100 MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100

View File

@ -34,7 +34,7 @@
<label <label
value="${c:l('relatorioPassageirosViajarController.lbEmpresa.value')}" /> value="${c:l('relatorioPassageirosViajarController.lbEmpresa.value')}" />
<combobox id="cmbEmpresa" width="90%" mold="rounded" <combobox id="cmbEmpresa" width="90%" mold="rounded"
buttonVisible="true" buttonVisible="true" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winFiltroRelatorioPassageirosViajar$composer.lsEmpresa}" /> model="@{winFiltroRelatorioPassageirosViajar$composer.lsEmpresa}" />
<label <label