eduardo.dicarde 2017-06-13 14:31:28 +00:00
parent d8eb1b275d
commit c714f8f2f2
1 changed files with 15 additions and 2 deletions

View File

@ -25,6 +25,7 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
private Integer puntoventaId;
private Date dataInicial;
private Date dataFinal;
private Integer pendenciaId;
private Boolean pendencia;
private Boolean taxaEmbarque;
private Boolean credito;
@ -50,7 +51,9 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
NamedParameterStatement stmt = null;
try {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT PV.NOMBPUNTOVENTA, C.DATAMOVIMENTO, LOG.STATUS, LOG.OBSERVACAO, NVL(B.NUMFOLIOSISTEMA,CJ.NUMFOLIOSISTEMA) AS NUMFOLIOSISTEMA, CAT.DESCCATEGORIA, LOG.PRECO, LOG.FECMODIF, LOG.INDCREDITO, NVL(B.TIPOVENTA_ID,CJ.TIPOVENTA_ID) AS TIPOVENTA_ID, U.NOMBUSUARIO, LOG.TIPO, EE.DESCINFO, TEE.DESCTIPOEVENTO ")
sQuery.append("SELECT PV.NOMBPUNTOVENTA, C.DATAMOVIMENTO, LOG.STATUS, LOG.OBSERVACAO, NVL(B.NUMFOLIOSISTEMA,CJ.NUMFOLIOSISTEMA) AS NUMFOLIOSISTEMA,")
.append("CAT.DESCCATEGORIA, LOG.PRECO, LOG.FECMODIF, LOG.INDCREDITO, NVL(B.TIPOVENTA_ID,CJ.TIPOVENTA_ID) AS TIPOVENTA_ID, U.NOMBUSUARIO, LOG.TIPO,")
.append("EE.DESCINFO, TEE.DESCTIPOEVENTO, LOG.CONFERENCIAPENDENCIA_ID AS PENDENCIAID ")
.append("FROM LOG_CONFERENCIA LOG ")
.append("INNER JOIN CONFERENCIA C ON C.CONFERENCIA_ID = LOG.CONFERENCIA_ID ")
.append("INNER JOIN EMPRESA E ON E.EMPRESA_ID = C.EMPRESA_ID ")
@ -66,6 +69,10 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
if(pendencia){
sQuery.append("AND LOG.STATUS = 1 ");
if (pendenciaId != null) {
sQuery.append("AND LOG.CONFERENCIAPENDENCIA_ID = :pendenciaId ");
}
}
if (taxaEmbarque) {
@ -107,6 +114,10 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
stmt.setBoolean("credito", credito);
}
if (pendenciaId != null) {
stmt.setInt("pendenciaId", pendenciaId);
}
rset = stmt.executeQuery();
while (rset.next()) {
@ -125,6 +136,7 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
logConferencia.setTipo(rset.getInt("tipo"));
logConferencia.setDescinfoevento(rset.getString("descinfo"));
logConferencia.setDesctipoevento(rset.getString("desctipoevento"));
logConferencia.setPendenciaId(rset.getInt("pendenciaid"));
lsDadosRelatorio.add(logConferencia);
}
@ -161,9 +173,10 @@ public class RelatorioObservacaoConferenciaMovimento extends Relatorio {
this.dataInicial = (Date) parametros.get("dataFiltroInicial");
this.dataFinal = (Date) parametros.get("dataFiltroFinal");
this.pendencia = (Boolean) parametros.get("pendencia");
this.taxaEmbarque = (Boolean) parametros.get("taxaEmbarque");
this.outros = (Boolean) parametros.get("outros");
this.taxaEmbarque = (Boolean) parametros.get("taxaEmbarque");
this.credito = (Boolean) parametros.get("credito");
this.pendenciaId = !parametros.get("pendenciaId").toString().isEmpty() ? Integer.parseInt(parametros.get("pendenciaId").toString()) : null;
if(empresaId != null) {
this.empresaId = empresaId;