fixes bug#9888
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@74292 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
cb7126f94d
commit
4ec97ef2a4
|
@ -38,7 +38,7 @@ public interface ConferenciaComissaoDAO extends GenericDAO<Conferencia, Long> {
|
||||||
|
|
||||||
public LogConferencia obtenerLogConferenciaID(Long logconferenciaId);
|
public LogConferencia obtenerLogConferenciaID(Long logconferenciaId);
|
||||||
|
|
||||||
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia) throws BusinessException;
|
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia, boolean ehConsultaComissao) throws BusinessException;
|
||||||
|
|
||||||
public List<OcdVO> carregarOcds(Conferencia conferencia) throws BusinessException;
|
public List<OcdVO> carregarOcds(Conferencia conferencia) throws BusinessException;
|
||||||
|
|
||||||
|
|
|
@ -798,7 +798,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia)
|
public List<BoletoComissao> carregarBilhetesComissao(Conferencia conferencia, boolean ehConsultaComissao)
|
||||||
throws BusinessException {
|
throws BusinessException {
|
||||||
try {
|
try {
|
||||||
Map<String, Object> parametros = carregarParametros(null, null, conferencia.getCompetencia(), conferencia.getEmpresa(),
|
Map<String, Object> parametros = carregarParametros(null, null, conferencia.getCompetencia(), conferencia.getEmpresa(),
|
||||||
|
@ -842,7 +842,11 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
sQuery.append("AND M.EMPRESA_ID = :empresaId ");
|
sQuery.append("AND M.EMPRESA_ID = :empresaId ");
|
||||||
}
|
}
|
||||||
if (parametros.containsKey("puntoventaId")) {
|
if (parametros.containsKey("puntoventaId")) {
|
||||||
|
if (ehConsultaComissao){
|
||||||
sQuery.append("AND (C.PUNTOVENTA_ID = :puntoventaId or (C.ptovtaventa_id =:puntoventaId and C.MOTIVOCANCELACION_ID IN (32,31,10) AND C.INDSTATUSOPERACION = 'F' ) )");
|
sQuery.append("AND (C.PUNTOVENTA_ID = :puntoventaId or (C.ptovtaventa_id =:puntoventaId and C.MOTIVOCANCELACION_ID IN (32,31,10) AND C.INDSTATUSOPERACION = 'F' ) )");
|
||||||
|
}else{
|
||||||
|
sQuery.append("AND C.PUNTOVENTA_ID = :puntoventaId ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(conferencia.getNumfoliosistema())) {
|
if (StringUtils.isNotBlank(conferencia.getNumfoliosistema())) {
|
||||||
sQuery.append("AND C.NUMFOLIOSISTEMA = :numfoliosistema ");
|
sQuery.append("AND C.NUMFOLIOSISTEMA = :numfoliosistema ");
|
||||||
|
|
|
@ -309,7 +309,7 @@ public class CalculoComissaoServiceImpl implements CalculoComissaoService {
|
||||||
conferencia.setPuntoVenta(new PuntoVenta(puntoVentaId));
|
conferencia.setPuntoVenta(new PuntoVenta(puntoVentaId));
|
||||||
conferencia.setEmpresa(new Empresa(empresaId));
|
conferencia.setEmpresa(new Empresa(empresaId));
|
||||||
conferencia.setCompetencia(DateUtil.getStringDate(periodo, "MM/yyyy"));
|
conferencia.setCompetencia(DateUtil.getStringDate(periodo, "MM/yyyy"));
|
||||||
List<BoletoComissao> receitasBoleto = conferenciaComissaoDAO.carregarBilhetesComissao(conferencia);
|
List<BoletoComissao> receitasBoleto = conferenciaComissaoDAO.carregarBilhetesComissao(conferencia, true);
|
||||||
List<EventosFinanceirosVO> eventosFinanceirosVOs = conferenciaComissaoDAO.carregarEventosFinanceiros(conferencia);
|
List<EventosFinanceirosVO> eventosFinanceirosVOs = conferenciaComissaoDAO.carregarEventosFinanceiros(conferencia);
|
||||||
|
|
||||||
Calendar calendario = Calendar.getInstance();
|
Calendar calendario = Calendar.getInstance();
|
||||||
|
|
|
@ -192,7 +192,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boletoComissaos == null || boletoComissaos.isEmpty()) {
|
if (boletoComissaos == null || boletoComissaos.isEmpty()) {
|
||||||
boletoComissaos = conferenciaComissaoDAO.carregarBilhetesComissao(c);
|
boletoComissaos = conferenciaComissaoDAO.carregarBilhetesComissao(c, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(boletoStatusComissao == null){
|
if(boletoStatusComissao == null){
|
||||||
|
@ -242,7 +242,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
@Override
|
@Override
|
||||||
public List<BoletoComissao> carregarBilhetesComissao(List<BoletoComissao> boletoComissaos, Conferencia conferencia, BoletoStatusComissao boletoStatusComissao, boolean carregarDadosFaltantes) throws BusinessException {
|
public List<BoletoComissao> carregarBilhetesComissao(List<BoletoComissao> boletoComissaos, Conferencia conferencia, BoletoStatusComissao boletoStatusComissao, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
if (boletoComissaos == null) {
|
if (boletoComissaos == null) {
|
||||||
boletoComissaos = conferenciaComissaoDAO.carregarBilhetesComissao(conferencia);
|
boletoComissaos = conferenciaComissaoDAO.carregarBilhetesComissao(conferencia, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boletoStatusComissao == null) {
|
if (boletoStatusComissao == null) {
|
||||||
|
|
Loading…
Reference in New Issue