From dda3feed15210413083dd5837fbbddb5d5818ff6 Mon Sep 17 00:00:00 2001 From: edgar Date: Fri, 2 Jun 2017 18:22:33 +0000 Subject: [PATCH] fixes bug #9066 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@69591 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/dao/PuntoVentaDAO.java | 2 +- .../dao/hibernate/PuntoVentaHibernateDAO.java | 23 ++++++++----------- .../service/ConferenciaComissaoService.java | 2 +- .../impl/ConferenciaComissaoServiceImpl.java | 6 ++--- .../vo/comissao/ResumoComissao.java | 21 +++++++++-------- 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java b/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java index b153cfddf..56e2025c5 100644 --- a/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java @@ -35,5 +35,5 @@ public interface PuntoVentaDAO extends GenericDAO { public List buscarPuntoVentaPorTipoEstoque(PtovtaTipoEstoque tipoEstoque); - public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID); + public List quantidadeECFPorPuntoVenta(Integer puntoVentaID); } diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java index a7da5e90f..40d3ec660 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java @@ -237,22 +237,17 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO quantidadeECFPorPuntoVenta(Integer puntoVentaID) { + String query = " select DISTINCT NUMSERIE20 from FISCAL_R4 f" + +" join Boleto b on b.BOLETO_ID=f.BOLETO_ID" + +" WHERE b.PUNTOVENTA_ID=:puntoVentaId" + +" GROUP BY NUMSERIE20"; Query q = getSession().createSQLQuery(query); - q.setInteger("punto_venta_id", puntoVentaID); - q.setInteger("empresa_id", empresaID); - BigDecimal quantidadeEcf = (BigDecimal) q.uniqueResult(); - return quantidadeEcf == null ? 0 : quantidadeEcf.intValue(); + q.setInteger("puntoVentaId", puntoVentaID); + return q.list(); } } diff --git a/src/com/rjconsultores/ventaboletos/service/ConferenciaComissaoService.java b/src/com/rjconsultores/ventaboletos/service/ConferenciaComissaoService.java index 124f32238..643d8ce79 100644 --- a/src/com/rjconsultores/ventaboletos/service/ConferenciaComissaoService.java +++ b/src/com/rjconsultores/ventaboletos/service/ConferenciaComissaoService.java @@ -76,7 +76,7 @@ public interface ConferenciaComissaoService extends GenericService quantidadeECFPorPuntoVenta(Integer puntoVentaID); public void enviarEmailIrregularidadeECF(String email, String msg,String assunto)throws Exception ; diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java index a859bd9df..0a6c5fb5f 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java @@ -469,7 +469,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic //subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao); carregarTotalDeposito(resumoComissao, boletoComissaos, lsEventosFinanceiros); - resumoComissao.setQuantidadeEcf(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getEmpresa().getEmpresaId(), conferencia.getPuntoVenta().getPuntoventaId())); + resumoComissao.setListNumSerieECF(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getPuntoVenta().getPuntoventaId())); return resumoComissao; } @@ -715,8 +715,8 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic } @Override - public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID) { - return puntoVentaDAO.quantidadeECFPorPuntoVenta(empresaID, puntoVentaID); + public List quantidadeECFPorPuntoVenta(Integer puntoVentaID) { + return puntoVentaDAO.quantidadeECFPorPuntoVenta(puntoVentaID); } @Override diff --git a/src/com/rjconsultores/ventaboletos/vo/comissao/ResumoComissao.java b/src/com/rjconsultores/ventaboletos/vo/comissao/ResumoComissao.java index c16a5aa31..5801b2b7e 100644 --- a/src/com/rjconsultores/ventaboletos/vo/comissao/ResumoComissao.java +++ b/src/com/rjconsultores/ventaboletos/vo/comissao/ResumoComissao.java @@ -15,7 +15,8 @@ public class ResumoComissao { private BigDecimal totalReceitas; private BigDecimal totalDespesas; private BigDecimal valorDeposito; - private Integer quantidadeEcf; + private List listNumSerieECF; + private OcdVO totalOcd; private List totalFormapago; @@ -84,14 +85,6 @@ public class ResumoComissao { this.totalFormapago = totalFormapago; } - public Integer getQuantidadeEcf() { - return quantidadeEcf; - } - - public void setQuantidadeEcf(Integer quantidadeEcf) { - this.quantidadeEcf = quantidadeEcf; - } - public OcdVO getTotalOcd() { return totalOcd; } @@ -99,6 +92,14 @@ public class ResumoComissao { public void setTotalOcd(OcdVO totalOcd) { this.totalOcd = totalOcd; } + + public List getListNumSerieECF() { + return listNumSerieECF; + } + + public void setListNumSerieECF(List listNumSerieECF) { + this.listNumSerieECF = listNumSerieECF; + } public String getTotalVendasFormatado() { return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getTotalVendas(), LocaleUtil.getLocale()); @@ -135,5 +136,7 @@ public class ResumoComissao { public String getValorDepositoFormatado() { return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale()); } + + }