leonardo 2017-01-24 20:10:47 +00:00
parent ee3fb05a64
commit 08464c5a9f
1 changed files with 8 additions and 2 deletions

View File

@ -89,7 +89,7 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
return puntoVentaDAO.obtenerID(id); return puntoVentaDAO.obtenerID(id);
} }
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class }) @Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
public PuntoVenta suscribir(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException { public PuntoVenta suscribir(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException {
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
entidad.setFecmodif(Calendar.getInstance().getTime()); entidad.setFecmodif(Calendar.getInstance().getTime());
@ -178,6 +178,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
wslog.debug("Retorno consulta fornecedor ws: " + strFornecedor); wslog.debug("Retorno consulta fornecedor ws: " + strFornecedor);
} catch (RemoteException e) { } catch (RemoteException e) {
wslog.error(e.toString()); wslog.error(e.toString());
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.toString());
return;
} }
if (!strFornecedor.contains("ERRO")){ if (!strFornecedor.contains("ERRO")){
// retornar msg a informação de registro já cadastrado // retornar msg a informação de registro já cadastrado
@ -250,6 +253,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
wslog.debug("Retorno consulta cliente ws: " + cliStr); wslog.debug("Retorno consulta cliente ws: " + cliStr);
} catch (RemoteException e) { } catch (RemoteException e) {
wslog.error(e.toString()); wslog.error(e.toString());
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.toString());
return;
} }
if (!cliStr.contains("ERRO")){ if (!cliStr.contains("ERRO")){
// retornar msg a informação de registro já cadastrado // retornar msg a informação de registro já cadastrado
@ -331,7 +337,7 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
} }
} }
@Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class }) @Transactional(noRollbackFor = { IntegracionException.class, ValidacionCampoException.class})
public PuntoVenta actualizacion(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException { public PuntoVenta actualizacion(PuntoVenta entidad) throws IntegracionException, ValidacionCampoException {
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
entidad.setFecmodif(Calendar.getInstance().getTime()); entidad.setFecmodif(Calendar.getInstance().getTime());