bug #6250: Adm - Telas para Persistirem os dados fiscais
Descrição Telas para persistirem os dados: - Totalizadores não fiscais - Meios de pagamento - Relatórios gerencias git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@43722 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bb142cb1e7
commit
3acd8b239a
|
@ -1,12 +1,22 @@
|
||||||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.xmlbeans.impl.xb.xsdschema.RestrictionDocument.Restriction;
|
||||||
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.Query;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.hibernate.criterion.Restrictions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.FiscalImpressoraDAO;
|
import com.rjconsultores.ventaboletos.dao.FiscalImpressoraDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.FiscalImpressora;
|
import com.rjconsultores.ventaboletos.entidad.FiscalImpressora;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||||
|
|
||||||
@Repository("fiscalImpressoraDAO")
|
@Repository("fiscalImpressoraDAO")
|
||||||
public class FiscalImpressoraHibernateDAO extends GenericHibernateDAO<FiscalImpressora, Integer> implements FiscalImpressoraDAO {
|
public class FiscalImpressoraHibernateDAO extends GenericHibernateDAO<FiscalImpressora, Integer> implements FiscalImpressoraDAO {
|
||||||
|
@ -16,4 +26,144 @@ public class FiscalImpressoraHibernateDAO extends GenericHibernateDAO<FiscalImpr
|
||||||
setSessionFactory(factory);
|
setSessionFactory(factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<FiscalTotnaofiscalEmpresa> buscarTotsNaoFiscaisEmpresa(Integer empresaEcfId) {
|
||||||
|
StringBuilder impostoHql = new StringBuilder();
|
||||||
|
impostoHql.append(" select e");
|
||||||
|
impostoHql.append(" from FiscalTotnaofiscalEmpresa e");
|
||||||
|
impostoHql.append(" where e.activo = 1 and e.empresa.id = :empresaEcfId");
|
||||||
|
|
||||||
|
Query qry = getSession().createQuery(impostoHql.toString());
|
||||||
|
qry.setParameter("empresaEcfId", empresaEcfId);
|
||||||
|
|
||||||
|
List<FiscalTotnaofiscalEmpresa> list = qry.list();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FiscalFormapagoEmpresa> buscarFormaPagoEmpresa(Integer empresaEcfId) {
|
||||||
|
StringBuilder impostoHql = new StringBuilder();
|
||||||
|
impostoHql.append(" select e");
|
||||||
|
impostoHql.append(" from FiscalFormapagoEmpresa e");
|
||||||
|
impostoHql.append(" where e.activo = 1 and e.empresa.id = :empresaEcfId");
|
||||||
|
|
||||||
|
Query qry = getSession().createQuery(impostoHql.toString());
|
||||||
|
qry.setParameter("empresaEcfId", empresaEcfId);
|
||||||
|
|
||||||
|
List<FiscalFormapagoEmpresa> list = qry.list();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FiscalRelgerencialEmpresa> buscarItensRelgerencialEmpresa(
|
||||||
|
Integer empresaEcfId) {
|
||||||
|
|
||||||
|
StringBuilder impostoHql = new StringBuilder();
|
||||||
|
impostoHql.append(" select e");
|
||||||
|
impostoHql.append(" from FiscalRelgerencialEmpresa e");
|
||||||
|
impostoHql.append(" where e.activo = 1 and e.empresa.id = :empresaEcfId");
|
||||||
|
|
||||||
|
Query qry = getSession().createQuery(impostoHql.toString());
|
||||||
|
qry.setParameter("empresaEcfId", empresaEcfId);
|
||||||
|
|
||||||
|
List<FiscalRelgerencialEmpresa> list = qry.list();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FormaPago> buscarFormaPagoAplicacaoImpfiscal() {
|
||||||
|
|
||||||
|
StringBuilder impostoHql = new StringBuilder();
|
||||||
|
impostoHql.append(" select e");
|
||||||
|
impostoHql.append(" from FormaPago e");
|
||||||
|
impostoHql.append(" where e.activo = 1 and e.impfiscal = 1");
|
||||||
|
|
||||||
|
Query qry = getSession().createQuery(impostoHql.toString());
|
||||||
|
List<FormaPago> list = qry.list();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalTotnaofiscalEmpresa> obtenerTodosTotnaofiscalEmpresa() {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalTotnaofiscalEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
return criteria.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa obtenerIDTotnaofiscalEmpresa(Long id) {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalTotnaofiscalEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
criteria.add(Restrictions.eq("fiscalformapagoempresaId", id));
|
||||||
|
|
||||||
|
return (FiscalTotnaofiscalEmpresa) criteria.uniqueResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa suscribirTotnaofiscalEmpresa(FiscalTotnaofiscalEmpresa entidad) {
|
||||||
|
return (FiscalTotnaofiscalEmpresa) getSession().save(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa actualizacionTotnaofiscalEmpres(FiscalTotnaofiscalEmpresa entidad) {
|
||||||
|
getSession().update(entidad);
|
||||||
|
return entidad;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalFormapagoEmpresa> obtenerTodosFormapagoEmpresa() {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalFormapagoEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
return criteria.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa obtenerIDFormapagoEmpresa(Long id) {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalFormapagoEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
criteria.add(Restrictions.eq("fiscalformapagoempresaId", id));
|
||||||
|
|
||||||
|
return (FiscalFormapagoEmpresa) criteria.uniqueResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa suscribirFormapagoEmpresa(FiscalFormapagoEmpresa entidad) {
|
||||||
|
return (FiscalFormapagoEmpresa) getSession().save(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa actualizacionFormapagoEmpresa(FiscalFormapagoEmpresa entidad) {
|
||||||
|
getSession().update(entidad);
|
||||||
|
return entidad;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalRelgerencialEmpresa> obtenerTodosRelgerencialEmpresa() {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalRelgerencialEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
return criteria.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa obtenerIDRelgerencialEmpresa(Long id) {
|
||||||
|
Criteria criteria = getSession().createCriteria(FiscalTotnaofiscalEmpresa.class);
|
||||||
|
criteria.add(Restrictions.eq("activo", true));
|
||||||
|
criteria.add(Restrictions.eq("fiscalformapagoempresaId", id));
|
||||||
|
|
||||||
|
return (FiscalRelgerencialEmpresa) criteria.uniqueResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa suscribirRelgerencialEmpresa(FiscalRelgerencialEmpresa entidad) {
|
||||||
|
return (FiscalRelgerencialEmpresa) getSession().save(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa actualizacionRelgerencialEmpresa(FiscalRelgerencialEmpresa entidad) {
|
||||||
|
getSession().update(entidad);
|
||||||
|
return entidad;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,10 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.FiscalImpressoraDAO;
|
import com.rjconsultores.ventaboletos.dao.FiscalImpressoraDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.FiscalImpressora;
|
import com.rjconsultores.ventaboletos.entidad.FiscalImpressora;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa;
|
||||||
import com.rjconsultores.ventaboletos.service.FiscalImpressoraService;
|
import com.rjconsultores.ventaboletos.service.FiscalImpressoraService;
|
||||||
|
|
||||||
@Service("fiscalImpressoraService")
|
@Service("fiscalImpressoraService")
|
||||||
|
@ -15,7 +18,7 @@ public class FiscalImpressoraServiceImpl implements FiscalImpressoraService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
FiscalImpressoraDAO fiscalImpressoraDAO;
|
FiscalImpressoraDAO fiscalImpressoraDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FiscalImpressora> obtenerTodos() {
|
public List<FiscalImpressora> obtenerTodos() {
|
||||||
return fiscalImpressoraDAO.obtenerTodos();
|
return fiscalImpressoraDAO.obtenerTodos();
|
||||||
|
@ -38,4 +41,78 @@ public class FiscalImpressoraServiceImpl implements FiscalImpressoraService {
|
||||||
return fiscalImpressoraDAO.actualizacion(entidad);
|
return fiscalImpressoraDAO.actualizacion(entidad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalTotnaofiscalEmpresa> buscarTotsNaoFiscaisEmpresa(Integer empresaEcfId) {
|
||||||
|
return fiscalImpressoraDAO.buscarTotsNaoFiscaisEmpresa(empresaEcfId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalFormapagoEmpresa> buscarFormaPagoEmpresa(Integer empresaEcfId) {
|
||||||
|
return fiscalImpressoraDAO.buscarFormaPagoEmpresa(empresaEcfId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalRelgerencialEmpresa> buscarItensRelgerencialEmpresa(Integer empresaEcfId) {
|
||||||
|
return fiscalImpressoraDAO.buscarItensRelgerencialEmpresa(empresaEcfId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalTotnaofiscalEmpresa> obtenerTodosTotnaofiscalEmpresa() {
|
||||||
|
return fiscalImpressoraDAO.obtenerTodosTotnaofiscalEmpresa();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa obtenerIDTotnaofiscalEmpresa(Long id) {
|
||||||
|
return fiscalImpressoraDAO.obtenerIDTotnaofiscalEmpresa(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa suscribirTotnaofiscalEmpresa(FiscalTotnaofiscalEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.suscribirTotnaofiscalEmpresa(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalTotnaofiscalEmpresa actualizacionTotnaofiscalEmpresa(FiscalTotnaofiscalEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.actualizacionTotnaofiscalEmpres(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalFormapagoEmpresa> obtenerTodosFormapagoEmpresa() {
|
||||||
|
return fiscalImpressoraDAO.obtenerTodosFormapagoEmpresa();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa obtenerIDFormapagoEmpresa(Long id) {
|
||||||
|
return fiscalImpressoraDAO.obtenerIDFormapagoEmpresa(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa suscribirFormapagoEmpresa(FiscalFormapagoEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.suscribirFormapagoEmpresa(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalFormapagoEmpresa actualizacionFormapagoEmpresa(FiscalFormapagoEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.actualizacionFormapagoEmpresa(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FiscalRelgerencialEmpresa> obtenerTodosRelgerencialEmpresa() {
|
||||||
|
return fiscalImpressoraDAO.obtenerTodosRelgerencialEmpresa();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa obtenerIDRelgerencialEmpresa(Long id) {
|
||||||
|
return fiscalImpressoraDAO.obtenerIDRelgerencialEmpresa(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa suscribirRelgerencialEmpresa(FiscalRelgerencialEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.suscribirRelgerencialEmpresa(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FiscalRelgerencialEmpresa actualizacionRelgerencialEmpresa(FiscalRelgerencialEmpresa entidad) {
|
||||||
|
return fiscalImpressoraDAO.actualizacionRelgerencialEmpresa(entidad);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue