rodrigo 2013-09-02 22:02:14 +00:00
parent 9752724df4
commit 6c556efe8a
4 changed files with 23 additions and 6 deletions

View File

@ -7,6 +7,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -248,6 +249,8 @@ public class RelatorioOrigemDestino extends Relatorio {
} }
} }
Collections.sort(lsPesoOperacionalRelatorio);
return lsPesoOperacionalRelatorio; return lsPesoOperacionalRelatorio;
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?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="RelatorioOrigemDestino" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4"> <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="RelatorioOrigemDestino" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
<property name="ireport.zoom" value="1.3310000000000028"/> <property name="ireport.zoom" value="1.3310000000000028"/>
<property name="ireport.x" value="148"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="153"/> <property name="ireport.y" value="153"/>
<subDataset name="peso_operacional" uuid="6107709b-669e-4e25-b14f-19ae373fd33c"> <subDataset name="peso_operacional" uuid="6107709b-669e-4e25-b14f-19ae373fd33c">
<parameter name="corrida_id_relatorio" class="java.math.BigDecimal"/> <parameter name="corrida_id_relatorio" class="java.math.BigDecimal"/>
@ -16,7 +16,7 @@
<field name="corridaId" class="java.lang.Integer"/> <field name="corridaId" class="java.lang.Integer"/>
<field name="secuencia" class="java.lang.Integer"/> <field name="secuencia" class="java.lang.Integer"/>
<sortField name="secuencia"/> <sortField name="secuencia"/>
<filterExpression><![CDATA[$F{corridaId} ==$P{corrida_id_relatorio}.intValue()]]></filterExpression> <filterExpression><![CDATA[$F{corridaId}==$P{corrida_id_relatorio}.intValue()]]></filterExpression>
</subDataset> </subDataset>
<parameter name="SQL" class="java.lang.String"/> <parameter name="SQL" class="java.lang.String"/>
<parameter name="DATA_DE" class="java.lang.String"/> <parameter name="DATA_DE" class="java.lang.String"/>
@ -440,7 +440,7 @@
<componentElement> <componentElement>
<reportElement uuid="fc473644-667d-480e-adf3-0b7abdc99aa5" x="0" y="211" width="436" height="20" isRemoveLineWhenBlank="true"/> <reportElement uuid="fc473644-667d-480e-adf3-0b7abdc99aa5" x="0" y="211" width="436" height="20" isRemoveLineWhenBlank="true"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="peso_operacional" uuid="cceb69bf-5b20-4d36-b039-25196730651a"> <datasetRun subDataset="peso_operacional" uuid="522d9fc1-f32a-42a0-aac6-d2149d3ef7c8">
<datasetParameter name="corrida_id_relatorio"> <datasetParameter name="corrida_id_relatorio">
<datasetParameterExpression><![CDATA[$F{CORRIDA_1}]]></datasetParameterExpression> <datasetParameterExpression><![CDATA[$F{CORRIDA_1}]]></datasetParameterExpression>
</datasetParameter> </datasetParameter>

View File

@ -3,7 +3,7 @@ package com.rjconsultores.ventaboletos.relatorios.utilitarios.beans;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
public class PesoOperacional { public class PesoOperacional implements Comparable<PesoOperacional> {
private Integer corridaId; private Integer corridaId;
private Date fecCorrida; private Date fecCorrida;
private String localidade; private String localidade;
@ -76,5 +76,19 @@ public class PesoOperacional {
public void setSecuencia(Integer secuencia) { public void setSecuencia(Integer secuencia) {
this.secuencia = secuencia; this.secuencia = secuencia;
} }
@Override
public int compareTo(PesoOperacional o) {
if ((secuencia.equals(1)) && (o.getSecuencia().equals(1))) {
if (receitaSaida.compareTo(o.getReceitaSaida()) == 1) {
return -1;
} else if (receitaSaida.compareTo(o.getReceitaSaida()) == -1) {
return 1;
} else {
return 0;
}
} else {
return secuencia.compareTo(o.getSecuencia());
}
}
} }

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX # <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto: #Versao do VentaBoleto:
versao = ADM_20130902_1RC219 versao = ADM_20130902_1RC220
# 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