fixes bug#24400
dev: Celio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@111996 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2ed1bee257
commit
fa101240c1
|
@ -53,9 +53,14 @@ public class ControleSerieEmbarcadaServiceImpl implements ControleSerieEmbarcada
|
|||
// Caso não haja reaproveitamento de série, devo buscar a próxima série disponível na sequência padrão
|
||||
if (serieembarcada == null) {
|
||||
log.info("BuscarSerieEmbarcada :: Reaproveitamento nao disponivel");
|
||||
Integer serieVlmax, SerieEmbarcada, serieBpe, serie, serieBpeSeq;
|
||||
Integer serieVlmax, SerieEmbarcada, serieBpe, serie, serieBpeSeq;
|
||||
CtrlSerieBPe ctrlSerieBpe = ctrlSerieBPeDAO.buscarPorEmpresaEstado(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getEstadoId());
|
||||
serieBpe = Integer.valueOf(ctrlSerieBpe.getSerie());
|
||||
if( ctrlSerieBpe == null || ctrlSerieBpe.getSerie() == null ) {
|
||||
log.info(String.format("BuscarSerieEmbarcada :: Serie não encontrada para Empresa:%s Estado:%s" , controleSerieEmbarcada.getEmpresa().getEmpresaId(),controleSerieEmbarcada.getEstado()));
|
||||
throw new RuntimeException( String.format("Serie não encontrada para Empresa:%s Estado:%s" , controleSerieEmbarcada.getEmpresa().getEmpresaId(),controleSerieEmbarcada.getEstado()) );
|
||||
}
|
||||
|
||||
serieBpe = Integer.valueOf(ctrlSerieBpe.getSerie());
|
||||
SerieEmbarcada = ctrlSerieBPeDAO.buscarSerieEmb(controleSerieEmbarcada.getEmpresa().getEmpresaId(), controleSerieEmbarcada.getEstado().getEstadoId().toString());
|
||||
serieVlmax = (serieBpe < SerieEmbarcada ? SerieEmbarcada : serieBpe);
|
||||
serie = (serieVlmax == null ? 1 : serieVlmax + 1);
|
||||
|
|
Loading…
Reference in New Issue