From 2c3f0644eacf75c10817974a91793a12e3381dde Mon Sep 17 00:00:00 2001 From: vinicius Date: Thu, 29 Jan 2015 18:48:17 +0000 Subject: [PATCH] =?UTF-8?q?bug=20#6010:=20Boleto=20-=20Fechamento=20autom?= =?UTF-8?q?=C3=A1tico=20por=20ag=C3=AAncia=20par=20todas=20empresas=20Desc?= =?UTF-8?q?ri=C3=A7=C3=A3o:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.2) Quando houver um fechamento de caixa automático, o usuário deve ser avisado que existem boletos que devem ser impressos para pagamento. 2) Tanto o fechamento automático quanto o feito manualmente devem permitir gerar o boleto de todas as empresas do ponto de venda, gerando um boleto para cada empresa. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@41101 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/dao/FechamentoParamptovtaDAO.java | 3 ++- .../hibernate/FechamentoParamptovtaHibernateDAO.java | 12 +++++++----- .../service/FechamentoParamptovtaService.java | 3 ++- .../impl/FechamentoParamptovtaServiceImpl.java | 5 +++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/dao/FechamentoParamptovtaDAO.java b/src/com/rjconsultores/ventaboletos/dao/FechamentoParamptovtaDAO.java index 1effcceab..56de43823 100644 --- a/src/com/rjconsultores/ventaboletos/dao/FechamentoParamptovtaDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/FechamentoParamptovtaDAO.java @@ -3,11 +3,12 @@ package com.rjconsultores.ventaboletos.dao; import java.util.List; import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; public interface FechamentoParamptovtaDAO extends GenericDAO { public List buscaParametrosPorEmpresas(List empresasId); public List buscaParametrosPorEmpresa(Integer empresasId); - public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId); + public List buscaParametrosPorPuntoventa(PuntoVenta puntoventa); } diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/FechamentoParamptovtaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/FechamentoParamptovtaHibernateDAO.java index 0ea9fb604..57b6e1e76 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/FechamentoParamptovtaHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/FechamentoParamptovtaHibernateDAO.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Repository; import com.rjconsultores.ventaboletos.dao.FechamentoParamptovtaDAO; import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; @Repository("fechamentoParamptovtaDAO") @@ -61,13 +62,14 @@ public class FechamentoParamptovtaHibernateDAO extends GenericHibernateDAO buscaParametrosPorPuntoventa(PuntoVenta puntoventa) { + Criteria query = getSession().createCriteria(getPersistentClass()); + query.add(Restrictions.eq("puntoventa", puntoventa)); query.add(Restrictions.eq("activo", Boolean.TRUE)); - return (FechamentoParamptovta)query.uniqueResult(); + List params = query.list(); + + return params; } } diff --git a/src/com/rjconsultores/ventaboletos/service/FechamentoParamptovtaService.java b/src/com/rjconsultores/ventaboletos/service/FechamentoParamptovtaService.java index 0725fc141..117749935 100644 --- a/src/com/rjconsultores/ventaboletos/service/FechamentoParamptovtaService.java +++ b/src/com/rjconsultores/ventaboletos/service/FechamentoParamptovtaService.java @@ -3,12 +3,13 @@ package com.rjconsultores.ventaboletos.service; import java.util.List; import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; public interface FechamentoParamptovtaService extends GenericService { public List buscaParametrosPorEmpresas(List empresasId); public List buscaParametrosPorEmpresa(Integer empresasId); public FechamentoParamptovta suscribirOrActualizacion(FechamentoParamptovta FechamentoParamptovta); - public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId); + public List buscaParametrosPorPuntoventa(PuntoVenta puntoventa); } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/FechamentoParamptovtaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/FechamentoParamptovtaServiceImpl.java index 110b3eabf..2744e4936 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/FechamentoParamptovtaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/FechamentoParamptovtaServiceImpl.java @@ -8,6 +8,7 @@ import org.springframework.transaction.annotation.Transactional; import com.rjconsultores.ventaboletos.dao.FechamentoParamptovtaDAO; import com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.service.FechamentoParamptovtaService; @Service("fechamentoParamptovtaService") @@ -71,8 +72,8 @@ public class FechamentoParamptovtaServiceImpl implements FechamentoParamptovtaSe } @Override - public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId) { - FechamentoParamptovta params = fechamentoParamptovtaDAO.buscaParametrosPorPuntoventa(puntoventaId); + public List buscaParametrosPorPuntoventa(PuntoVenta puntoventa) { + List params = fechamentoParamptovtaDAO.buscaParametrosPorPuntoventa(puntoventa); return params; } }