From 9b9d94696151a0bb1139ed78085e5f72fa2f61c6 Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 11 Nov 2014 17:05:16 +0000 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20NullPointerException=20cad?= =?UTF-8?q?astro=20de=20esta=C3=A7=C3=A3o=20(=20fixes=20bug=20#5793=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@39466 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../service/impl/EstacionServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java index d36f6a321..644ed3d1e 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java @@ -82,6 +82,12 @@ public class EstacionServiceImpl implements EstacionService { estacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); estacion.setFecmodif(Calendar.getInstance().getTime()); estacion.setActivo(Boolean.TRUE); + + if (estacion.getEstacionId() == null) { + estacion = estacionDAO.suscribir(estacion); + } else { + estacion = estacionDAO.actualizacion(estacion); + } String errorNoChequeFolio = null; for (EstacionImpresora ei : estacion.getLsEstacionImpresora()) { @@ -92,12 +98,6 @@ public class EstacionServiceImpl implements EstacionService { errorNoChequeFolio = autorizaFolioService.noChequeFolioPreimpresos(ei, true); } - if (estacion.getEstacionId() == null) { - estacion = estacionDAO.suscribir(estacion); - } else { - estacion = estacionDAO.actualizacion(estacion); - } - if (StringUtils.isNotBlank(errorNoChequeFolio)) { throw new BusinessException(errorNoChequeFolio); }