Apenas retirei linhas comentadas, imports desnecessários, e dei uma pequena melhorada no layout do jasper
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@45122 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
b1c00b3c2b
commit
93303f8304
|
@ -1,6 +1,5 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
|
@ -8,11 +7,8 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.negocio.CalculoImposto;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ExceptionConfiguracao;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioReceitaServico extends Relatorio {
|
||||
|
@ -26,8 +22,7 @@ public class RelatorioReceitaServico extends Relatorio {
|
|||
public void initDados() throws Exception {
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
// String puntosVentaIds = (String) parametros.get("NUMPUNTOVENTA");
|
||||
|
||||
|
||||
String sql = getSql(
|
||||
(parametros.get("ORIGEN_ID") != null && parametros.get("ORIGEN_ID") != "" ) ,
|
||||
(parametros.get("DESTINO_ID") != null && parametros.get("DESTINO_ID") != "" ) ,
|
||||
|
@ -36,25 +31,18 @@ public class RelatorioReceitaServico extends Relatorio {
|
|||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||
|
||||
// stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
// stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
|
||||
if (parametros.get("CORRIDA_ID") != null)
|
||||
stmt.setString("CORRIDA_ID", (String)parametros.get("CORRIDA_ID"));
|
||||
else{}
|
||||
|
||||
if (parametros.get("ORIGEN_ID") != null)
|
||||
stmt.setInt("ORIGEN_ID", (Integer) parametros.get("ORIGEN_ID"));
|
||||
else{}
|
||||
// stmt.setNull("ORIGEN_ID", java.sql.Types.INTEGER);
|
||||
|
||||
|
||||
if (parametros.get("DESTINO_ID") != null)
|
||||
stmt.setInt("DESTINO_ID", (Integer) parametros.get("DESTINO_ID"));
|
||||
else{}
|
||||
//stmt.setNull("DESTINO_ID", java.sql.Types.INTEGER);
|
||||
|
||||
if (parametros.get("EMPRESA_ID") != null)
|
||||
stmt.setInt("EMPRESA_ID", (Integer) parametros.get("EMPRESA_ID"));
|
||||
|
@ -133,13 +121,8 @@ public class RelatorioReceitaServico extends Relatorio {
|
|||
sql.append(" and cj.feccorrida <= :DATA_FINAL ");
|
||||
|
||||
if(servicoSelected){ sql.append(" and cj.corrida_id IN (:CORRIDA_ID) "); }
|
||||
//else{ sql.append(" and cj.corrida_id IN ( select p.PARADA_ID from parada p ) "); }
|
||||
|
||||
if(origemSelected){ sql.append(" and pOrig.PARADA_ID IN (:ORIGEN_ID) "); }
|
||||
else{ sql.append(" and pOrig.PARADA_ID IN ( select p.PARADA_ID from parada p ) "); }
|
||||
|
||||
if(destinoSelected){ sql.append(" and pDest.PARADA_ID IN (:DESTINO_ID) "); }
|
||||
else{ sql.append(" and pDest.PARADA_ID IN ( select p.PARADA_ID from parada p) "); }
|
||||
|
||||
sql.append(" and mar.EMPRESA_ID = :EMPRESA_ID ");
|
||||
sql.append(" and cj.CLASESERVICIO_ID = :CLASESERVICIO_ID ");
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioReceitaServico" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="127"/>
|
||||
<property name="ireport.x" value="10"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||
<parameter name="DATA_INICIAL" class="java.util.Date"/>
|
||||
|
@ -210,7 +210,7 @@
|
|||
<text><![CDATA[Total]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="429" y="33" width="55" height="28" uuid="a7b14fa8-3b89-4f4d-b265-63eb3d930b04"/>
|
||||
<reportElement x="432" y="33" width="53" height="28" uuid="a7b14fa8-3b89-4f4d-b265-63eb3d930b04"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
|
@ -322,7 +322,7 @@
|
|||
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="429" y="0" width="55" height="20" uuid="8cf0c102-4e42-4f6d-8922-8edc808fdc0f"/>
|
||||
<reportElement x="432" y="0" width="53" height="20" uuid="8cf0c102-4e42-4f6d-8922-8edc808fdc0f"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
|
@ -366,40 +366,44 @@
|
|||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
<band height="84" splitType="Stretch">
|
||||
<band height="100" splitType="Stretch">
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement x="175" y="60" width="178" height="20" uuid="4bbf9db6-cc01-4cc0-98fa-7522eb890d4c"/>
|
||||
<reportElement x="144" y="78" width="178" height="20" uuid="4bbf9db6-cc01-4cc0-98fa-7522eb890d4c"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{totalizador}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement x="175" y="0" width="178" height="20" uuid="381ba8fc-878f-4419-8c93-758a607e9ba3"/>
|
||||
<reportElement x="144" y="18" width="178" height="20" uuid="381ba8fc-878f-4419-8c93-758a607e9ba3"/>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_TARIFA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement x="175" y="20" width="178" height="20" uuid="a36d2d34-3721-4796-93ec-3cf838aebf85"/>
|
||||
<reportElement x="144" y="38" width="178" height="20" uuid="a36d2d34-3721-4796-93ec-3cf838aebf85"/>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_TUT}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement x="175" y="40" width="178" height="20" uuid="219227d5-1615-4876-a810-c6393957ccd0"/>
|
||||
<reportElement x="144" y="58" width="178" height="20" uuid="219227d5-1615-4876-a810-c6393957ccd0"/>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_PEDAGIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement x="46" y="0" width="100" height="20" uuid="d4600e8d-457a-47cf-aa81-84b1231728fe"/>
|
||||
<reportElement x="15" y="18" width="100" height="20" uuid="d4600e8d-457a-47cf-aa81-84b1231728fe"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<text><![CDATA[Total Tarifa]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="46" y="20" width="100" height="20" uuid="5b0f4977-d53a-4fcb-a16f-88c1edd8493b"/>
|
||||
<reportElement x="15" y="38" width="100" height="20" uuid="5b0f4977-d53a-4fcb-a16f-88c1edd8493b"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<text><![CDATA[Total Tut]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="46" y="40" width="100" height="20" uuid="f6849b27-f317-458b-b4f3-8d96a150962e"/>
|
||||
<reportElement x="15" y="58" width="100" height="20" uuid="f6849b27-f317-458b-b4f3-8d96a150962e"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<text><![CDATA[Total Pedágio]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="46" y="61" width="100" height="20" uuid="9f5fda19-bdf2-4600-ba05-aa2ded9c6a89"/>
|
||||
<reportElement x="15" y="79" width="100" height="20" uuid="9f5fda19-bdf2-4600-ba05-aa2ded9c6a89"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<text><![CDATA[Total Receita]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -21,14 +20,8 @@ import org.zkoss.zul.Datebox;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.GrupoRuta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioOCDNaoResgatadaEmpresa;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioReceitaServico;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioResumoLinhas;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioResumoLinhasAnalitico;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTaxasLinha;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
|
@ -175,7 +168,6 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
|
|||
Parada origem = (Parada) cbiOrigem.getValue();
|
||||
parametros.put("ORIGEN_ID", origem.getParadaId());
|
||||
filtro.append("Origem: "+origem.getCveparada()+"; ");
|
||||
//filtro.append(origem.getCveparada() + ";");
|
||||
} else {
|
||||
parametros.put("ORIGEN_ID", null);//
|
||||
filtro.append("Origem: Todos; ");
|
||||
|
@ -186,7 +178,6 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
|
|||
Parada destino = (Parada) cbiDestino.getValue();
|
||||
parametros.put("DESTINO_ID", destino.getParadaId());
|
||||
filtro.append("Destino: "+destino.getCveparada()+"; ");
|
||||
//filtro.append(destino.getCveparada() + ";");
|
||||
} else {
|
||||
parametros.put("DESTINO_ID", null);
|
||||
filtro.append("Destino: Todos; ");
|
||||
|
@ -197,7 +188,6 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
|
|||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
||||
filtro.append("Empresa: "+empresa.getNombempresa()+"; ");
|
||||
//filtro.append(empresa.getNombempresa() + ";");
|
||||
} else {
|
||||
parametros.put("EMPRESA_ID", "");
|
||||
}
|
||||
|
@ -207,7 +197,6 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
|
|||
ClaseServicio clase = (ClaseServicio) itemClasse.getValue();
|
||||
parametros.put("CLASESERVICIO_ID", clase.getClaseservicioId());
|
||||
filtro.append("Classe: "+clase.getDescclase()+"; ");
|
||||
//filtro.append(empresa.getNombempresa() + ";");
|
||||
} else {
|
||||
parametros.put("CLASESERVICIO_ID", "");
|
||||
}
|
||||
|
@ -219,26 +208,11 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
|
|||
|
||||
relatorio = new RelatorioReceitaServico(parametros, dataSourceRead.getConnection());
|
||||
|
||||
// if(relatorio.getCustomDataSource().next())
|
||||
// {
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioReceitaServicoController.window.title"), args, MODAL);
|
||||
// }else
|
||||
// {
|
||||
// try {
|
||||
// Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
// Labels.getLabel("relatorioReceitaServicoController.window.title"),
|
||||
// Messagebox.OK, Messagebox.INFORMATION);
|
||||
// } catch (InterruptedException ex) {
|
||||
// ex.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue