fixes bug#AL-3818
parent
0b36660ac1
commit
f869a0f46d
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.61.3</version>
|
<version>1.61.4</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Checkin;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
|
||||||
|
public class RelatorioCheckinModoConsolidadoPorUsuario extends Relatorio {
|
||||||
|
|
||||||
|
public RelatorioCheckinModoConsolidadoPorUsuario(Map<String, Object> parametros, Connection conexao) {
|
||||||
|
super(parametros, conexao);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Integer> lsInt;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
|
||||||
|
Integer corridaId = (Integer) getParametros().get("CORRIDA_ID");
|
||||||
|
Integer origenId = (Integer) getParametros().get("ORIGEN_ID");
|
||||||
|
String idsBilheteiros = (String) getParametros().get("IDS_BILHETEIROS");
|
||||||
|
Date fecInicio = (Date) getParametros().get("DATA_INICIAL");
|
||||||
|
Date fecFinal = (Date) getParametros().get("DATA_FINAL");
|
||||||
|
fecInicio = DateUtil.inicioFecha(fecInicio);
|
||||||
|
fecFinal = DateUtil.fimFecha(fecFinal);
|
||||||
|
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(idsBilheteiros)) {
|
||||||
|
String []ls = idsBilheteiros.split(",");
|
||||||
|
lsInt = new ArrayList<Integer>();
|
||||||
|
for(String i : ls){
|
||||||
|
lsInt.add(new Integer(Integer.parseInt(i.trim())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = getSql(corridaId, origenId, idsBilheteiros);
|
||||||
|
|
||||||
|
PreparedStatement pstmt = getConexao().prepareStatement(sql);
|
||||||
|
|
||||||
|
int index = 1;
|
||||||
|
pstmt.setTimestamp(index++, new java.sql.Timestamp(fecInicio.getTime()));
|
||||||
|
pstmt.setTimestamp(index++, new java.sql.Timestamp(fecFinal.getTime()));
|
||||||
|
|
||||||
|
if (corridaId != null) {
|
||||||
|
pstmt.setInt(index++, corridaId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (origenId != null) {
|
||||||
|
pstmt.setInt(index++, origenId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(idsBilheteiros)) {
|
||||||
|
for(int i = 0 ; i < lsInt.size() ; i++){
|
||||||
|
pstmt.setInt(index++, lsInt.get(i));//Object("idsBilheteiros", lsInt.toArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Checkin> checkins = new ArrayList<Checkin>();
|
||||||
|
|
||||||
|
ResultSet rset = pstmt.executeQuery();
|
||||||
|
while (rset.next()) {
|
||||||
|
|
||||||
|
Checkin checkin = new Checkin();
|
||||||
|
checkin.setBoletoId(rset.getLong("boleto_Id"));
|
||||||
|
checkin.setNumFolioSistema(rset.getString("numoperacion"));
|
||||||
|
checkin.setOrigen(rset.getString("descparada"));
|
||||||
|
checkin.setCorridaId(rset.getInt("corrida_id"));
|
||||||
|
checkin.setFeccorrida(rset.getTimestamp("feccorrida"));
|
||||||
|
checkin.setDataVenda(rset.getTimestamp("datavenda"));
|
||||||
|
checkin.setDataCancelado(rset.getTimestamp("datacancelado"));
|
||||||
|
checkin.setDataRemarcacao(rset.getTimestamp("dataremarcacao"));
|
||||||
|
checkin.setNombUsuario(rset.getString("nombusuario"));
|
||||||
|
checkin.setCveusuario(rset.getString("cveusuario"));
|
||||||
|
checkin.setUsuariovenda(rset.getString("usuariovenda"));
|
||||||
|
checkin.setUsuarioNowShow(rset.getString("usuarioNowShow"));
|
||||||
|
checkin.setUsuariocheckin(rset.getString("usuariocheckin"));
|
||||||
|
|
||||||
|
checkins.add(checkin);
|
||||||
|
}
|
||||||
|
|
||||||
|
setLsDadosRelatorio(checkins);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsDadosRelatorio(List<Checkin> checkins) {
|
||||||
|
this.setCollectionDataSource(new JRBeanCollectionDataSource(checkins));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSql(Integer corridaId, Integer origenId, String idsBilheteiros) {
|
||||||
|
|
||||||
|
StringBuffer sql = new StringBuffer();
|
||||||
|
sql.append("select b.boleto_id, o.descparada, b.corrida_id, ");
|
||||||
|
sql.append(" case when b.numfoliosistema is not null ");
|
||||||
|
sql.append(" then b.numfoliosistema else b.numoperacion ");
|
||||||
|
sql.append(" end numoperacion, ");
|
||||||
|
sql.append(" b.feccorrida, ");
|
||||||
|
sql.append(" bc.datavenda, ");
|
||||||
|
sql.append(" bc.datacancelado, ");
|
||||||
|
sql.append(" bc.dataremarcacao, ");
|
||||||
|
sql.append(" u.cveusuario as usuariovenda, ");
|
||||||
|
sql.append(" uc.cveusuario as usuarioNowShow, ");
|
||||||
|
sql.append(" case when uca.cveusuario is not null then uca.cveusuario else ucr.cveusuario end as usuariocheckin, ");
|
||||||
|
sql.append(" u.cveusuario, ");
|
||||||
|
sql.append(" u.nombusuario ");
|
||||||
|
sql.append(" from boleto b left join boleto_checkin bc on (b.boleto_id = bc.boletooriginal_id) ");
|
||||||
|
sql.append(" inner join parada o on b.origen_id = o.parada_id ");
|
||||||
|
sql.append(" left join checkin_automatico ca on (ca.boleto_id = b.boleto_id)");
|
||||||
|
sql.append(" left join checkin_cerrado cc on (cc.feccorrida = b.feccorrida and ");
|
||||||
|
sql.append(" cc.corrida_id = b.corrida_id and ");
|
||||||
|
sql.append(" cc.origen_id = b.origen_id) ");
|
||||||
|
//sql.append(" and cc.destino_id = b.destino_id) ");
|
||||||
|
sql.append(" left join usuario u on (u.usuario_id = b.usuario_id)");
|
||||||
|
sql.append(" left join usuario uc on (uc.usuario_id = bc.usuario_id)");
|
||||||
|
sql.append(" left join usuario uca on (uca.usuario_id = ca.usuario_id)");
|
||||||
|
sql.append(" left join usuario ucr on (ucr.usuario_id = cc.usuario_id)");
|
||||||
|
sql.append("");
|
||||||
|
sql.append(" where b.activo = 1 ");
|
||||||
|
sql.append("and bc.FECMODIF between ? and ? ");
|
||||||
|
sql.append(corridaId == null ? "" : " and b.corrida_id = ? ");
|
||||||
|
sql.append(origenId == null ? "" : " and b.origen_id = ? ");
|
||||||
|
sql.append((lsInt == null || lsInt.size() == 0) ? "" : " and u.USUARIO_ID in ( "+ createIn(lsInt.size()) + ") ");
|
||||||
|
|
||||||
|
sql.append(" order by 3, 4, 7 desc");
|
||||||
|
|
||||||
|
return sql.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String createIn(int n) {
|
||||||
|
if(n > 0){
|
||||||
|
String str = StringUtils.repeat(" ? ,", n);
|
||||||
|
return str.substring(0, str.length()-1);
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
|
||||||
|
#Labels cabeçalho
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impressor por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
|
||||||
|
#Labels datail
|
||||||
|
datail.voucher=Nº Bilhete / Voucher
|
||||||
|
datail.origen=Origem do Serviço
|
||||||
|
datail.servicio=Serviço
|
||||||
|
datail.data.servicio=Data do Serviço
|
||||||
|
datail.data.checkin=Data Checkin
|
||||||
|
datail.bilheteiro=Bilheteiro
|
||||||
|
datail.data.remarcada=Data Remarcada
|
||||||
|
datail.cveusuario=Login
|
||||||
|
datail.usuariocheckin=Usuário Checkin
|
||||||
|
datail.usuarionowshow=Usuário Now Show
|
|
@ -0,0 +1,30 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
|
||||||
|
#Labels cabeçalho
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impressor por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
#Labels header
|
||||||
|
cabecalho.pagina=Página\:
|
||||||
|
cabecalho.empresa=Empresa\:
|
||||||
|
cabecalho.bilheteiro = Bilheteiro(s)\:
|
||||||
|
cabecalho.usuario = Usuário\:
|
||||||
|
|
||||||
|
|
||||||
|
#Labels datail
|
||||||
|
datail.voucher=Nº Bilhete / Voucher
|
||||||
|
datail.origen=Origem do Serviço
|
||||||
|
datail.servicio=Serviço
|
||||||
|
datail.data.servicio=Data do Serviço
|
||||||
|
datail.data.checkin=Data Checkin
|
||||||
|
datail.bilheteiro=Bilheteiro
|
||||||
|
datail.data.remarcada=Data Remarcada
|
||||||
|
datail.cveusuario=Login
|
||||||
|
datail.usuariocheckin=Usuário Checkin
|
||||||
|
datail.usuarionowshow=Usuário Now Show
|
Binary file not shown.
|
@ -0,0 +1,281 @@
|
||||||
|
<?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="RelatorioCheckin" pageWidth="915" pageHeight="675" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="875" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="48d32af4-ba9f-41c2-91a5-5d2fe57e149c">
|
||||||
|
<property name="ireport.zoom" value="1.4641000000000008"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||||
|
<parameter name="DATA_INICIAL" class="java.util.Date"/>
|
||||||
|
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||||
|
<parameter name="CORRIDA_ID" class="java.lang.Long"/>
|
||||||
|
<parameter name="ORIGEN" class="java.lang.String"/>
|
||||||
|
<parameter name="IDS_BILHETEIROS" class="java.lang.String"/>
|
||||||
|
<parameter name="IS_CHECKIN_ABERTO" class="java.lang.Boolean"/>
|
||||||
|
<parameter name="nomb_empresa" class="java.lang.String"/>
|
||||||
|
<parameter name="nombUsuario" class="java.lang.String"/>
|
||||||
|
<queryString>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</queryString>
|
||||||
|
<field name="boletoId" class="java.lang.Long"/>
|
||||||
|
<field name="numFolioSistema" class="java.lang.String"/>
|
||||||
|
<field name="origen" class="java.lang.String"/>
|
||||||
|
<field name="corridaId" class="java.lang.Integer"/>
|
||||||
|
<field name="feccorrida" class="java.util.Date"/>
|
||||||
|
<field name="dataVenda" class="java.util.Date"/>
|
||||||
|
<field name="dataCancelado" class="java.util.Date"/>
|
||||||
|
<field name="dataRemarcacao" class="java.util.Date"/>
|
||||||
|
<field name="nombUsuario" class="java.lang.String"/>
|
||||||
|
<field name="cveusuario" class="java.lang.String"/>
|
||||||
|
<field name="usuariovenda" class="java.lang.String"/>
|
||||||
|
<field name="usuarioNowShow" class="java.lang.String"/>
|
||||||
|
<field name="usuariocheckin" class="java.lang.String"/>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band height="83" splitType="Stretch">
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="b28df970-c219-4853-afeb-6821e0a44f04" x="0" y="80" width="873" height="3"/>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="50c553a9-7292-44df-8b24-24eb14e98841" mode="Opaque" x="0" y="0" width="646" height="30" backcolor="#D7D7D7"/>
|
||||||
|
<textElement markup="styled">
|
||||||
|
<font size="16" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="3cbad5ad-ea6f-4718-b7e5-a98dc6be0188" x="0" y="31" width="130" height="16"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="6c12f1b5-cae1-4ea9-b674-703d0f3d2bdc" x="130" y="31" width="672" height="16"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[($P{DATA_INICIAL} != null ? new java.text.SimpleDateFormat("dd/MM/yyyy").format($P{DATA_INICIAL}) : "") +
|
||||||
|
" à " +
|
||||||
|
($P{DATA_FINAL} != null ? new java.text.SimpleDateFormat("dd/MM/yyyy").format($P{DATA_FINAL}) : "")]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="64d65c79-be80-4596-b84e-e2c3c3ddaa8a" x="131" y="49" width="504" height="16" isRemoveLineWhenBlank="true"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{nombUsuario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="cdd0af8e-575e-4afa-b68f-6d0812032d4b" x="0" y="49" width="130" height="16" isRemoveLineWhenBlank="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.usuario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="17fabb43-59cc-4375-86a8-793ff7a67f50" mode="Opaque" x="817" y="15" width="29" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e0a35762-56d1-4da2-a945-8ae4d5348bb7" mode="Opaque" x="646" y="15" width="132" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.pagina}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm">
|
||||||
|
<reportElement uuid="54f55cc3-21cb-482f-a58b-fca885e48517" mode="Opaque" x="778" y="0" width="97" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement textAlignment="Left"/>
|
||||||
|
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Report">
|
||||||
|
<reportElement uuid="d0201aca-580e-4359-9503-c579a43dcccd" mode="Opaque" x="846" y="15" width="29" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement textAlignment="Left"/>
|
||||||
|
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="1ac071ee-3dcd-427a-909f-9d39e40c6708" mode="Opaque" x="646" y="0" width="132" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="fb1a5b0c-1e7e-443e-b0ff-db26c4ed289d" mode="Opaque" x="778" y="15" width="39" height="15" backcolor="#D7D7D7"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="33" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="7312aafd-f1c4-4ebf-a39a-0477abc22e70" x="671" y="0" width="100" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.usuariocheckin}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166" x="0" y="0" width="100" height="30" isRemoveLineWhenBlank="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.voucher}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="1e0b20c0-f208-4853-8601-73cec6e1992e" x="238" y="0" width="103" height="30"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.origen}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="32e830a3-6303-465c-85aa-12678fe6b80a" x="100" y="0" width="47" height="30"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.servicio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="d937b8b4-5e49-4d0d-a211-42e3d3fb45ba" x="342" y="0" width="48" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.data.checkin}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="44e42972-eac1-40e6-ba0e-7c83b208d41b" x="391" y="0" width="114" height="30"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.bilheteiro}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae" x="505" y="0" width="64" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.data.remarcada}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="acc2f86e-4ee2-4e61-807f-27fd740db652" x="0" y="30" width="873" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="28a7ce94-e2d1-4a68-a816-185b176ba0a8" x="571" y="0" width="100" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.cveusuario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec" x="148" y="0" width="89" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement rotation="None" markup="none">
|
||||||
|
<font isBold="true" isUnderline="false"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.data.servicio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="1021978f-e3d2-4336-8b0e-d180e18f8759" x="772" y="0" width="100" height="30" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{datail.usuarionowshow}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="23" splitType="Stretch">
|
||||||
|
<textField isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="82b42ca3-255a-4038-9730-35e2f9a1bb0f" isPrintRepeatedValues="false" x="0" y="0" width="100" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{numFolioSistema}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="c5cc5e04-b1fa-4ebc-b408-3810648fc7eb" x="246" y="0" width="96" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{origen}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="false">
|
||||||
|
<reportElement uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3" x="100" y="0" width="47" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{corridaId}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="1ce5d236-a684-450f-8e63-1523f0c7e103" x="342" y="0" width="48" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dataCancelado}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c" x="391" y="0" width="114" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{usuariovenda}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="648d03b0-ee8a-4b2f-af9f-c33c4d01f40e" x="505" y="0" width="65" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dataRemarcacao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e" x="148" y="0" width="89" height="20"/>
|
||||||
|
<textElement textAlignment="Left">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{feccorrida}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="80c86e43-26cc-428c-b2e5-99d685118a06" x="571" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{cveusuario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="9e9da70d-3437-40e4-9c79-fa1d63fd39f9" x="671" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{usuariocheckin}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="86d77df3-9597-4163-b78d-b5d4bf6d07af" x="772" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{usuarioNowShow}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="38">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="c68d03cd-3b82-4f22-ba2a-6bb344fd3944" x="0" y="11" width="530" height="20"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -16,6 +16,7 @@ import org.zkoss.zhtml.Messagebox;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Bandbox;
|
import org.zkoss.zul.Bandbox;
|
||||||
|
import org.zkoss.zul.Checkbox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.ComboitemRenderer;
|
import org.zkoss.zul.ComboitemRenderer;
|
||||||
import org.zkoss.zul.Datebox;
|
import org.zkoss.zul.Datebox;
|
||||||
|
@ -26,6 +27,7 @@ import org.zkoss.zul.Textbox;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCheckin;
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCheckin;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCheckinModoConsolidadoPorUsuario;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
||||||
|
@ -55,6 +57,7 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
||||||
private MyListbox usuarioSelList;
|
private MyListbox usuarioSelList;
|
||||||
private MyComboboxParada cmbParadaOrigem;
|
private MyComboboxParada cmbParadaOrigem;
|
||||||
private MyComboboxParadaCve cmbParadaOrigemCve;
|
private MyComboboxParadaCve cmbParadaOrigemCve;
|
||||||
|
private Checkbox chkConsolidadoPorUsuario;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,6 +117,8 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
|
|
||||||
|
Relatorio relatorio;
|
||||||
|
|
||||||
List<Usuario> lsUsuariosSelecionados = new ArrayList(Arrays.asList(usuarioSelList.getData()));
|
List<Usuario> lsUsuariosSelecionados = new ArrayList(Arrays.asList(usuarioSelList.getData()));
|
||||||
|
|
||||||
Integer origenId = cmbParadaOrigemCve.getSelectedItem() == null ? null
|
Integer origenId = cmbParadaOrigemCve.getSelectedItem() == null ? null
|
||||||
|
@ -152,8 +157,11 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
parametros.put("IDS_BILHETEIROS", usuariosIds);
|
parametros.put("IDS_BILHETEIROS", usuariosIds);
|
||||||
|
|
||||||
|
if (chkConsolidadoPorUsuario.isChecked()) {
|
||||||
Relatorio relatorio = new RelatorioCheckin(parametros, dataSourceRead.getConnection());
|
relatorio = new RelatorioCheckinModoConsolidadoPorUsuario(parametros, dataSourceRead.getConnection());
|
||||||
|
}else {
|
||||||
|
relatorio = new RelatorioCheckin(parametros, dataSourceRead.getConnection());
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, Object> args = new HashMap<String, Object>();
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
args.put("relatorio", relatorio);
|
args.put("relatorio", relatorio);
|
||||||
|
|
|
@ -113,7 +113,14 @@
|
||||||
<paging id="pagingSelUsuario" pageSize="10" />
|
<paging id="pagingSelUsuario" pageSize="10" />
|
||||||
</vbox>
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<cell colspan="2">
|
||||||
|
<checkbox id="chkConsolidadoPorUsuario"
|
||||||
|
label="Modo Consolidado por Usuário" >
|
||||||
|
</checkbox>
|
||||||
|
<image src="/gui/img/Question_mark_1.png" tooltiptext="Este modelo irá imprimir todas as estapas e usuários no processo" style="cursor: help" />
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
<toolbar>
|
<toolbar>
|
||||||
|
|
Loading…
Reference in New Issue