Série para venda embarcada

bug#13748
dev:trevezani
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@91499 d1611594-4594-4d17-8e1d-87c2c4800839
master
alberto 2019-04-02 22:32:14 +00:00
parent 4e10906d31
commit 88a1ec6150
1 changed files with 6 additions and 3 deletions

View File

@ -23,12 +23,10 @@ import org.springframework.transaction.annotation.Transactional;
import com.rjconsultores.ventaboletos.dao.CtrlSerieEmbarcadaDAO; import com.rjconsultores.ventaboletos.dao.CtrlSerieEmbarcadaDAO;
import com.rjconsultores.ventaboletos.entidad.CtrlSerieEmbarcada; import com.rjconsultores.ventaboletos.entidad.CtrlSerieEmbarcada;
import com.rjconsultores.ventaboletos.entidad.Curso;
import com.rjconsultores.ventaboletos.entidad.DispositivoEmbarcada; import com.rjconsultores.ventaboletos.entidad.DispositivoEmbarcada;
import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado; import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.exception.SerieEmbarcadaNaoDisponivelException; import com.rjconsultores.ventaboletos.exception.SerieEmbarcadaNaoDisponivelException;
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.vo.embarcada.SerieEmbarcada; import com.rjconsultores.ventaboletos.vo.embarcada.SerieEmbarcada;
@ -219,7 +217,12 @@ public class CtrlSerieEmbarcadaHibernateDAO extends GenericHibernateDAO<CtrlSer
retorno = new SerieEmbarcada(); retorno = new SerieEmbarcada();
retorno.setCtrlSerieEmbarcada(ctrl); retorno.setCtrlSerieEmbarcada(ctrl);
retorno.setSerie(ctrl.getSerie()); retorno.setSerie(ctrl.getSerie());
retorno.setNumero(String.valueOf(Long.valueOf(ctrl.getNumeroCorrente()) + 1));
if (ctrl.getNumeroInicial().equals(ctrl.getNumeroCorrente())) {
retorno.setNumero(String.valueOf(Long.valueOf(ctrl.getNumeroCorrente())));
} else {
retorno.setNumero(String.valueOf(Long.valueOf(ctrl.getNumeroCorrente()) + 1));
}
} else { } else {
throw new SerieEmbarcadaNaoDisponivelException(); throw new SerieEmbarcadaNaoDisponivelException();