fixes bug#0014687
qua:junia dev:thiago git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@94608 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
1f63933cbd
commit
14e60cc033
|
@ -34,6 +34,8 @@ public class CtrlSerieBPeHibernateDAO extends GenericHibernateDAO<CtrlSerieBPe,
|
|||
Boolean retorno = Boolean.FALSE;
|
||||
Connection conn = null;
|
||||
|
||||
log.info(String.format("Gerando sequence empresaId:%s, estado:%s, minvalue:%s",empresaId,estado,minvalue));
|
||||
|
||||
try {
|
||||
conn = dataSource.getConnection();
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -14,6 +16,9 @@ import com.rjconsultores.ventaboletos.vo.embarcada.SerieEmbarcada;
|
|||
|
||||
@Service("controleSerieEmbarcadaService")
|
||||
public class ControleSerieEmbarcadaServiceImpl implements ControleSerieEmbarcadaService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ControleSerieEmbarcadaServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private CtrlSerieEmbarcadaDAO ctrlSerieEmbarcadaDAO;
|
||||
|
||||
|
@ -25,6 +30,8 @@ public class ControleSerieEmbarcadaServiceImpl implements ControleSerieEmbarcada
|
|||
public SerieEmbarcada buscarSerieEmbarcada(CtrlSerieEmbarcada controleSerieEmbarcada) {
|
||||
SerieEmbarcada serieembarcada = null;
|
||||
|
||||
log.info(String.format("Empresa:%s Estado:%s" , controleSerieEmbarcada.getEmpresa().getEmpresaId(),controleSerieEmbarcada.getEstado()));
|
||||
|
||||
// Verificando se há Serie Embarcada disponível para reaproveitamento
|
||||
int tentativas = 0;
|
||||
|
||||
|
@ -49,9 +56,9 @@ public class ControleSerieEmbarcadaServiceImpl implements ControleSerieEmbarcada
|
|||
|
||||
Integer serie = (ctrlSerieBpe == null ? 1 : Integer.valueOf(ctrlSerieBpe.getSerie()) + 1);
|
||||
|
||||
try {
|
||||
ctrlSerieBPeDAO.gerarSeqSerieBPe(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado(), serie);
|
||||
} catch (Exception e) {}
|
||||
|
||||
ctrlSerieBPeDAO.gerarSeqSerieBPe(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado(), serie);
|
||||
|
||||
|
||||
serie = ctrlSerieBPeDAO.buscarSequencia(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getCveestado());
|
||||
|
||||
|
|
Loading…
Reference in New Issue