0022156: Espec - Conferencia de Movimento - Valor Depósito
bug#22156 dev: Valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@107526 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e1adfc1bb4
commit
dae105efb5
|
@ -39,7 +39,7 @@ public interface ConferenciaComissaoDAO extends GenericDAO<Conferencia, Long> {
|
||||||
public LogConferencia obtenerLogConferenciaID(Long logconferenciaId);
|
public LogConferencia obtenerLogConferenciaID(Long logconferenciaId);
|
||||||
|
|
||||||
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia, boolean isCalculoComissao, boolean ehConsultaComissao) throws BusinessException;
|
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia, boolean isCalculoComissao, boolean ehConsultaComissao) throws BusinessException;
|
||||||
|
|
||||||
public List<OcdVO> carregarOcds(Conferencia conferencia) throws BusinessException;
|
public List<OcdVO> carregarOcds(Conferencia conferencia) throws BusinessException;
|
||||||
|
|
||||||
public Conferencia reabrirMovimentoDiario(Conferencia conferencia) throws BusinessException;
|
public Conferencia reabrirMovimentoDiario(Conferencia conferencia) throws BusinessException;
|
||||||
|
@ -63,5 +63,6 @@ public interface ConferenciaComissaoDAO extends GenericDAO<Conferencia, Long> {
|
||||||
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
||||||
|
|
||||||
public boolean isConfMovFPTrocaVlrDeposito(Empresa empresa);
|
public boolean isConfMovFPTrocaVlrDeposito(Empresa empresa);
|
||||||
|
|
||||||
|
public BigDecimal getComissaoPuntoVenta(Integer puntoventaId, Integer empresaId, Date dataInicial, Date dataFinal) throws BusinessException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1400,4 +1400,24 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
return !qr.list().isEmpty();
|
return !qr.list().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BigDecimal getComissaoPuntoVenta(Integer puntoventaId, Integer empresaId, Date dataInicial, Date dataFinal) throws BusinessException {
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append(" SELECT SUM(importe) ")
|
||||||
|
.append(" FROM conta_corrente_ptovta ")
|
||||||
|
.append(" WHERE ACTIVO = 1 ")
|
||||||
|
.append(" AND EMPRESA_ID = :empresaId ")
|
||||||
|
.append(" AND PUNTOVENTA_ID = :puntoventaId ")
|
||||||
|
.append(" AND TIPOOPERACIONCC_ID = 5 ")
|
||||||
|
.append(" AND feccorte BETWEEN to_date(:dataInicial, 'DD/MM/YYYY') AND to_date(:dataFinal, 'DD/MM/YYYY') ");
|
||||||
|
|
||||||
|
|
||||||
|
Query qr = getSession().createSQLQuery(sql.toString());
|
||||||
|
qr.setParameter("empresaId", empresaId);
|
||||||
|
qr.setParameter("puntoventaId", puntoventaId);
|
||||||
|
qr.setParameter("dataInicial", DateUtil.getStringDate(DateUtil.inicioFecha(dataInicial), "dd/MM/yyyy"));
|
||||||
|
qr.setParameter("dataFinal", DateUtil.getStringDate(DateUtil.inicioFecha(dataFinal), "dd/MM/yyyy"));
|
||||||
|
|
||||||
|
return (BigDecimal) qr.uniqueResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,4 +94,5 @@ public interface ConferenciaComissaoService extends GenericService<Conferencia,
|
||||||
|
|
||||||
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
||||||
|
|
||||||
|
public BigDecimal getComissaoPuntoVenta(Integer puntoventaId, Integer empresaId, Date dataInicial, Date dataFinal) throws BusinessException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -989,4 +989,11 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
return conferenciaComissaoDAO.isConferenciaCompetenciaEncerrada(dataInicial, dataFinal, empresa, puntoVenta, isDesconsideraPtVendaFechados);
|
return conferenciaComissaoDAO.isConferenciaCompetenciaEncerrada(dataInicial, dataFinal, empresa, puntoVenta, isDesconsideraPtVendaFechados);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BigDecimal getComissaoPuntoVenta(Integer puntoventaId, Integer empresaId, Date dataInicial, Date dataFinal) throws BusinessException {
|
||||||
|
return conferenciaComissaoDAO.getComissaoPuntoVenta(puntoventaId, empresaId, dataInicial, dataFinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue