fixes bug #9157
fixes bug #9391 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@73199 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
dc6c73efa9
commit
9351a90960
|
@ -0,0 +1,19 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.relatorios.receitaDespesa.RelatorioFinanceiroReceitasDespesasBean;
|
||||
|
||||
public interface ReceitaDespesaDAO {
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioDetalhado(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioSintetico(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioAgencia(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioEvento(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
}
|
|
@ -0,0 +1,298 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.ReceitaDespesaDAO;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.relatorios.receitaDespesa.RelatorioFinanceiroReceitasDespesasBean;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
@Repository("receitaDespesaDAO")
|
||||
public class ReceitaDespesaHibernateDAO implements ReceitaDespesaDAO {
|
||||
|
||||
private static Logger log = Logger.getLogger(ReceitaDespesaHibernateDAO.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
private Map<String, Object> parametrosFiltro;
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioDetalhado(Map<String, Object> parametros) throws BusinessException {
|
||||
Connection con = null;
|
||||
try {
|
||||
con = dataSourceRead.getConnection();
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT C.FECHORVTA, P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.INDTIPO, TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, C.PRECIO ")
|
||||
.append("FROM CAJA_DIVERSOS C ")
|
||||
.append("JOIN EVENTO_EXTRA E ON E.EVENTOEXTRA_ID = C.EVENTOEXTRA_ID ")
|
||||
.append("JOIN TIPO_EVENTO_EXTRA TE ON TE.TIPOEVENTOEXTRA_ID = E.TIPOEVENTOEXTRA_ID ")
|
||||
.append("JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
|
||||
.append("WHERE C.ACTIVO = 1 ");
|
||||
|
||||
adicionarFiltros(sql, parametros);
|
||||
|
||||
sql.append("ORDER BY C.FECHORVTA, TE.DESCTIPOEVENTO, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA");
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(con, sql.toString());
|
||||
setParametros(stmt);
|
||||
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
List<RelatorioFinanceiroReceitasDespesasBean> lsBean = new ArrayList<RelatorioFinanceiroReceitasDespesasBean>();
|
||||
while (resultSet.next()) {
|
||||
RelatorioFinanceiroReceitasDespesasBean bean = new RelatorioFinanceiroReceitasDespesasBean();
|
||||
bean.setDescTipoEvento(resultSet.getString("DESCTIPOEVENTO"));
|
||||
bean.setFecHorVta(resultSet.getDate("FECHORVTA"));
|
||||
bean.setTipoEventoExtraId(resultSet.getString("TIPOEVENTOEXTRA_ID"));
|
||||
bean.setNombPuntoVenta(resultSet.getString("NOMBPUNTOVENTA"));
|
||||
bean.setNumPuntoVenta(resultSet.getString("NUMPUNTOVENTA"));
|
||||
bean.setPrecio(resultSet.getBigDecimal("PRECIO"));
|
||||
bean.setPuntoVentaId(resultSet.getInt("PUNTOVENTA_ID"));
|
||||
lsBean.add(bean);
|
||||
}
|
||||
|
||||
return lsBean;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BusinessException(e.getMessage(), e);
|
||||
}finally {
|
||||
try {
|
||||
if (con != null && !con.isClosed()) {
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioSintetico(Map<String, Object> parametros) throws BusinessException {
|
||||
Connection con = null;
|
||||
try {
|
||||
con = dataSourceRead.getConnection();
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, ")
|
||||
.append("SUM(CASE WHEN TE.INDTIPO = 1 THEN C.PRECIO ELSE 0 END) RECEITA, ")
|
||||
.append("SUM(CASE WHEN TE.INDTIPO = 0 THEN CASE WHEN C.PRECIO < 0 THEN (C.PRECIO * -1) ELSE C.PRECIO END ELSE 0 END) DESPESA ")
|
||||
.append("FROM CAJA_DIVERSOS C ")
|
||||
.append("JOIN EVENTO_EXTRA E ON E.EVENTOEXTRA_ID = C.EVENTOEXTRA_ID ")
|
||||
.append("JOIN TIPO_EVENTO_EXTRA TE ON TE.TIPOEVENTOEXTRA_ID = E.TIPOEVENTOEXTRA_ID ")
|
||||
.append("JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
|
||||
.append("WHERE C.ACTIVO = 1 ");
|
||||
|
||||
adicionarFiltros(sql, parametros);
|
||||
|
||||
sql.append("GROUP BY P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA ")
|
||||
.append("ORDER BY P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA");
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(con, sql.toString());
|
||||
setParametros(stmt);
|
||||
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
List<RelatorioFinanceiroReceitasDespesasBean> lsBean = new ArrayList<RelatorioFinanceiroReceitasDespesasBean>();
|
||||
while (resultSet.next()) {
|
||||
RelatorioFinanceiroReceitasDespesasBean bean = new RelatorioFinanceiroReceitasDespesasBean();
|
||||
bean.setPuntoVentaId(resultSet.getInt("PUNTOVENTA_ID"));
|
||||
bean.setNombPuntoVenta(resultSet.getString("NOMBPUNTOVENTA"));
|
||||
bean.setNumPuntoVenta(resultSet.getString("NUMPUNTOVENTA"));
|
||||
bean.setReceita(resultSet.getBigDecimal("RECEITA"));
|
||||
bean.setDespesa(resultSet.getBigDecimal("DESPESA"));
|
||||
lsBean.add(bean);
|
||||
}
|
||||
|
||||
return lsBean;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BusinessException(e.getMessage(), e);
|
||||
}finally {
|
||||
try {
|
||||
if (con != null && !con.isClosed()) {
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioAgencia(Map<String, Object> parametros) throws BusinessException {
|
||||
Connection con = null;
|
||||
try {
|
||||
con = dataSourceRead.getConnection();
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, TE.INDTIPO, ")
|
||||
.append("SUM(CASE WHEN TE.INDTIPO = 1 THEN C.PRECIO ELSE (CASE WHEN TE.INDTIPO = 0 THEN CASE WHEN C.PRECIO < 0 THEN (C.PRECIO * -1) ELSE C.PRECIO END ELSE 0 END) END) PRECIO ")
|
||||
.append("FROM CAJA_DIVERSOS C ")
|
||||
.append("JOIN EVENTO_EXTRA E ON E.EVENTOEXTRA_ID = C.EVENTOEXTRA_ID ")
|
||||
.append("JOIN TIPO_EVENTO_EXTRA TE ON TE.TIPOEVENTOEXTRA_ID = E.TIPOEVENTOEXTRA_ID ")
|
||||
.append("JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
|
||||
.append("WHERE C.ACTIVO = 1 ");
|
||||
|
||||
adicionarFiltros(sql, parametros);
|
||||
|
||||
sql.append("GROUP BY P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, TE.INDTIPO ")
|
||||
.append("ORDER BY P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.DESCTIPOEVENTO");
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(con, sql.toString());
|
||||
setParametros(stmt);
|
||||
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
List<RelatorioFinanceiroReceitasDespesasBean> lsBean = new ArrayList<RelatorioFinanceiroReceitasDespesasBean>();
|
||||
while (resultSet.next()) {
|
||||
RelatorioFinanceiroReceitasDespesasBean bean = new RelatorioFinanceiroReceitasDespesasBean();
|
||||
bean.setPuntoVentaId(resultSet.getInt("PUNTOVENTA_ID"));
|
||||
bean.setNombPuntoVenta(resultSet.getString("NOMBPUNTOVENTA"));
|
||||
bean.setNumPuntoVenta(resultSet.getString("NUMPUNTOVENTA"));
|
||||
bean.setPrecio(resultSet.getBigDecimal("PRECIO"));
|
||||
bean.setIndtipo(resultSet.getInt("INDTIPO"));
|
||||
bean.setTipoEventoExtraId(resultSet.getString("TIPOEVENTOEXTRA_ID"));
|
||||
bean.setDescTipoEvento(resultSet.getString("DESCTIPOEVENTO"));
|
||||
lsBean.add(bean);
|
||||
}
|
||||
|
||||
return lsBean;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BusinessException(e.getMessage(), e);
|
||||
}finally {
|
||||
try {
|
||||
if (con != null && !con.isClosed()) {
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioEvento(Map<String, Object> parametros) throws BusinessException {
|
||||
Connection con = null;
|
||||
try {
|
||||
con = dataSourceRead.getConnection();
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, TE.INDTIPO, ")
|
||||
.append("SUM(CASE WHEN TE.INDTIPO = 1 THEN C.PRECIO ELSE (CASE WHEN TE.INDTIPO = 0 THEN CASE WHEN C.PRECIO < 0 THEN (C.PRECIO * -1) ELSE C.PRECIO END ELSE 0 END) END) PRECIO ")
|
||||
.append("FROM CAJA_DIVERSOS C ")
|
||||
.append("JOIN EVENTO_EXTRA E ON E.EVENTOEXTRA_ID = C.EVENTOEXTRA_ID ")
|
||||
.append("JOIN TIPO_EVENTO_EXTRA TE ON TE.TIPOEVENTOEXTRA_ID = E.TIPOEVENTOEXTRA_ID ")
|
||||
.append("JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
|
||||
.append("WHERE C.ACTIVO = 1 ");
|
||||
|
||||
adicionarFiltros(sql, parametros);
|
||||
|
||||
sql.append("GROUP BY P.PUNTOVENTA_ID, P.NOMBPUNTOVENTA, P.NUMPUNTOVENTA, TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, TE.INDTIPO ")
|
||||
.append("ORDER BY TE.TIPOEVENTOEXTRA_ID, TE.DESCTIPOEVENTO, TE.INDTIPO, P.NOMBPUNTOVENTA");
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(con, sql.toString());
|
||||
setParametros(stmt);
|
||||
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
List<RelatorioFinanceiroReceitasDespesasBean> lsBean = new ArrayList<RelatorioFinanceiroReceitasDespesasBean>();
|
||||
while (resultSet.next()) {
|
||||
RelatorioFinanceiroReceitasDespesasBean bean = new RelatorioFinanceiroReceitasDespesasBean();
|
||||
bean.setPuntoVentaId(resultSet.getInt("PUNTOVENTA_ID"));
|
||||
bean.setNombPuntoVenta(resultSet.getString("NOMBPUNTOVENTA"));
|
||||
bean.setNumPuntoVenta(resultSet.getString("NUMPUNTOVENTA"));
|
||||
bean.setPrecio(resultSet.getBigDecimal("PRECIO"));
|
||||
bean.setIndtipo(resultSet.getInt("INDTIPO"));
|
||||
bean.setTipoEventoExtraId(resultSet.getString("TIPOEVENTOEXTRA_ID"));
|
||||
bean.setDescTipoEvento(resultSet.getString("DESCTIPOEVENTO"));
|
||||
lsBean.add(bean);
|
||||
}
|
||||
|
||||
return lsBean;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BusinessException(e.getMessage(), e);
|
||||
}finally {
|
||||
try {
|
||||
if (con != null && !con.isClosed()) {
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
private void adicionarFiltros(StringBuilder sql, Map<String, Object> parametros) {
|
||||
parametrosFiltro = new HashMap<String, Object>();
|
||||
if(parametros.containsKey("empresaId")) {
|
||||
sql.append("AND E.EMPRESA_ID = :empresaId ");
|
||||
parametrosFiltro.put("empresaId", parametros.get("empresaId"));
|
||||
}
|
||||
|
||||
if(parametros.containsKey("fecInicio")) {
|
||||
sql.append("AND C.FECHORVTA >= TO_DATE(:fecInicio,'DD/MM/YYYY HH24:MI') ");
|
||||
parametrosFiltro.put("fecInicio", parametros.get("fecInicio"));
|
||||
}
|
||||
|
||||
if(parametros.containsKey("fecFinal")) {
|
||||
sql.append("AND C.FECHORVTA <= TO_DATE(:fecFinal,'DD/MM/YYYY HH24:MI') ");
|
||||
parametrosFiltro.put("fecFinal", parametros.get("fecFinal"));
|
||||
}
|
||||
|
||||
if(parametros.containsKey("indTipo")) {
|
||||
sql.append("AND TE.INDTIPO = :indTipo ");
|
||||
parametrosFiltro.put("indTipo", parametros.get("indTipo"));
|
||||
}
|
||||
|
||||
if(parametros.containsKey("lsPuntoVenta")) {
|
||||
List<Object> values = parametros.get("lsPuntoVenta") instanceof Collection ? new ArrayList<Object>((Collection) parametros.get("lsPuntoVenta")) : new ArrayList<Object>(((List) parametros.get("lsPuntoVenta")));
|
||||
int size = values.size();
|
||||
Integer[] ls = new Integer[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
ls[i] = Integer.valueOf((values.get(i).toString()));
|
||||
}
|
||||
sql.append("AND C.PUNTOVENTA_ID IN (" + StringUtils.join(ls, ',') + ") ");
|
||||
}
|
||||
|
||||
if(parametros.containsKey("lsEventosExtra")) {
|
||||
List<Object> values = parametros.get("lsEventosExtra") instanceof Collection ? new ArrayList<Object>((Collection) parametros.get("lsEventosExtra")) : new ArrayList<Object>(((List) parametros.get("lsEventosExtra")));
|
||||
int size = values.size();
|
||||
Integer[] ls = new Integer[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
ls[i] = Integer.valueOf((values.get(i).toString()));
|
||||
}
|
||||
sql.append("AND TE.TIPOEVENTOEXTRA_ID IN (" + StringUtils.join(ls, ',') + ") ");
|
||||
}
|
||||
}
|
||||
|
||||
private void setParametros(NamedParameterStatement stmt) throws SQLException {
|
||||
for (Entry<String, Object> parametro : parametrosFiltro.entrySet()) {
|
||||
stmt.setObject(parametro.getKey(), parametro.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.receitaDespesa;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class RelatorioFinanceiroReceitasDespesasBean {
|
||||
|
||||
public static Integer TIPO_CREDITO = 1;
|
||||
public static Integer TIPO_DEBITO = 0;
|
||||
|
||||
private Date fecHorVta;
|
||||
|
||||
private Integer puntoVentaId;
|
||||
|
||||
private String nombPuntoVenta;
|
||||
|
||||
private String tipoEventoExtraId;
|
||||
|
||||
private String numPuntoVenta;
|
||||
|
||||
private String descTipoEvento;
|
||||
|
||||
private BigDecimal precio;
|
||||
|
||||
private BigDecimal receita;
|
||||
private BigDecimal despesa;
|
||||
|
||||
private Integer indtipo;
|
||||
|
||||
public Date getFecHorVta() {
|
||||
return fecHorVta;
|
||||
}
|
||||
|
||||
public void setFecHorVta(Date fecHorVta) {
|
||||
this.fecHorVta = fecHorVta;
|
||||
}
|
||||
|
||||
public Integer getPuntoVentaId() {
|
||||
return puntoVentaId;
|
||||
}
|
||||
|
||||
public void setPuntoVentaId(Integer puntoVentaId) {
|
||||
this.puntoVentaId = puntoVentaId;
|
||||
}
|
||||
|
||||
public String getNombPuntoVenta() {
|
||||
return nombPuntoVenta;
|
||||
}
|
||||
|
||||
public void setNombPuntoVenta(String nombPuntoVenta) {
|
||||
this.nombPuntoVenta = nombPuntoVenta;
|
||||
}
|
||||
|
||||
public String getTipoEventoExtraId() {
|
||||
return tipoEventoExtraId;
|
||||
}
|
||||
|
||||
public void setTipoEventoExtraId(String tipoEventoExtraId) {
|
||||
this.tipoEventoExtraId = tipoEventoExtraId;
|
||||
}
|
||||
|
||||
public String getDescTipoEvento() {
|
||||
return descTipoEvento;
|
||||
}
|
||||
|
||||
public void setDescTipoEvento(String descTipoEvento) {
|
||||
this.descTipoEvento = descTipoEvento;
|
||||
}
|
||||
|
||||
public BigDecimal getPrecio() {
|
||||
return precio;
|
||||
}
|
||||
|
||||
public void setPrecio(BigDecimal precio) {
|
||||
this.precio = precio;
|
||||
}
|
||||
|
||||
public BigDecimal getReceita() {
|
||||
return receita;
|
||||
}
|
||||
|
||||
public void setReceita(BigDecimal receita) {
|
||||
this.receita = receita;
|
||||
}
|
||||
|
||||
public BigDecimal getDespesa() {
|
||||
return despesa;
|
||||
}
|
||||
|
||||
public void setDespesa(BigDecimal despesa) {
|
||||
this.despesa = despesa;
|
||||
}
|
||||
|
||||
public String getNumPuntoVenta() {
|
||||
return numPuntoVenta;
|
||||
}
|
||||
|
||||
public void setNumPuntoVenta(String numPuntoVenta) {
|
||||
this.numPuntoVenta = numPuntoVenta;
|
||||
}
|
||||
|
||||
public BigDecimal getSaldo() {
|
||||
return receita.subtract(despesa);
|
||||
}
|
||||
|
||||
public Integer getIndtipo() {
|
||||
return indtipo;
|
||||
}
|
||||
|
||||
public void setIndtipo(Integer indtipo) {
|
||||
this.indtipo = indtipo;
|
||||
}
|
||||
|
||||
public String getDescTipo() {
|
||||
if(getIndtipo() != null) {
|
||||
if(getIndtipo().equals(TIPO_CREDITO)) {
|
||||
return "Receita";
|
||||
} else if(getIndtipo().equals(TIPO_DEBITO)) {
|
||||
return "Despesa";
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.relatorios.receitaDespesa.RelatorioFinanceiroReceitasDespesasBean;
|
||||
|
||||
public interface ReceitaDespesaService {
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioDetalhado(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioSintetico(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioAgencia(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioEvento(Map<String, Object> parametros) throws BusinessException;
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.ReceitaDespesaDAO;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.relatorios.receitaDespesa.RelatorioFinanceiroReceitasDespesasBean;
|
||||
import com.rjconsultores.ventaboletos.service.ReceitaDespesaService;
|
||||
|
||||
@Repository("receitaDespesaService")
|
||||
public class ReceitaDespesaServiceImpl implements ReceitaDespesaService {
|
||||
|
||||
@Autowired
|
||||
ReceitaDespesaDAO receitaDespesaoDAO;
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioDetalhado(Map<String, Object> parametros) throws BusinessException {
|
||||
return receitaDespesaoDAO.getRelatorioDetalhado(parametros);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioSintetico(Map<String, Object> parametros) throws BusinessException {
|
||||
return receitaDespesaoDAO.getRelatorioSintetico(parametros);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioAgencia(Map<String, Object> parametros) throws BusinessException {
|
||||
return receitaDespesaoDAO.getRelatorioAgencia(parametros);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RelatorioFinanceiroReceitasDespesasBean> getRelatorioEvento(Map<String, Object> parametros) throws BusinessException {
|
||||
return receitaDespesaoDAO.getRelatorioEvento(parametros);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue