bug #6010: Boleto - Fechamento automático por agência par todas empresas
Descrição: 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-87c2c4800839master
parent
fb95d56fff
commit
2c3f0644ea
|
@ -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<FechamentoParamptovta, Long> {
|
||||
|
||||
public List<FechamentoParamptovta> buscaParametrosPorEmpresas(List<Integer> empresasId);
|
||||
public List<FechamentoParamptovta> buscaParametrosPorEmpresa(Integer empresasId);
|
||||
public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId);
|
||||
public List<FechamentoParamptovta> buscaParametrosPorPuntoventa(PuntoVenta puntoventa);
|
||||
|
||||
}
|
||||
|
|
|
@ -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<Fecha
|
|||
}
|
||||
|
||||
@Override
|
||||
public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId) {
|
||||
Criteria query = getSession().createCriteria(getPersistentClass());
|
||||
query.createAlias("puntoventa", "ptovta");
|
||||
query.add(Restrictions.eq("ptovta.puntoventaId", puntoventaId));
|
||||
public List<FechamentoParamptovta> 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<FechamentoParamptovta> params = query.list();
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<FechamentoParamptovta, Long> {
|
||||
|
||||
public List<FechamentoParamptovta> buscaParametrosPorEmpresas(List<Integer> empresasId);
|
||||
public List<FechamentoParamptovta> buscaParametrosPorEmpresa(Integer empresasId);
|
||||
public FechamentoParamptovta suscribirOrActualizacion(FechamentoParamptovta FechamentoParamptovta);
|
||||
public FechamentoParamptovta buscaParametrosPorPuntoventa(Integer puntoventaId);
|
||||
public List<FechamentoParamptovta> buscaParametrosPorPuntoventa(PuntoVenta puntoventa);
|
||||
|
||||
}
|
||||
|
|
|
@ -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<FechamentoParamptovta> buscaParametrosPorPuntoventa(PuntoVenta puntoventa) {
|
||||
List<FechamentoParamptovta> params = fechamentoParamptovtaDAO.buscaParametrosPorPuntoventa(puntoventa);
|
||||
return params;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue