leonardo 2017-01-11 18:12:33 +00:00
parent 07e5206869
commit 1727ba6b53
1 changed files with 13 additions and 12 deletions

View File

@ -66,6 +66,7 @@ import AGIntf.TServicosCliente;
public class PuntoVentaServiceImpl implements PuntoVentaService { public class PuntoVentaServiceImpl implements PuntoVentaService {
private static Logger log = LoggerFactory.getLogger(PuntoVentaServiceImpl.class); private static Logger log = LoggerFactory.getLogger(PuntoVentaServiceImpl.class);
private static org.jboss.logging.Logger wslog = org.jboss.logging.Logger.getLogger("com.rjconsultores.ws");
@Autowired @Autowired
private PuntoVentaDAO puntoVentaDAO; private PuntoVentaDAO puntoVentaDAO;
@ -168,9 +169,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String strFornecedor = ""; String strFornecedor = "";
try{ try{
strFornecedor = iag.getCodigoFornecedorWithIDWS(entidad.getNumPuntoVenta().toString()); strFornecedor = iag.getCodigoFornecedorWithIDWS(entidad.getNumPuntoVenta().toString());
log.info("Retorno consulta fornecedor ws: " + strFornecedor); wslog.debug("Retorno consulta fornecedor ws: " + strFornecedor);
} catch (RemoteException e) { } catch (RemoteException e) {
log.error("", e.toString()); wslog.error(e.toString());
} }
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
@ -214,18 +215,18 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
fornecedor.setIDWS(entidad.getNumPuntoVenta()); fornecedor.setIDWS(entidad.getNumPuntoVenta());
try{ try{
String retornoAG = iag.incluiFornecedor(fornecedor); String retornoAG = iag.incluiFornecedor(fornecedor);
log.info(retornoAG); wslog.debug(retornoAG);
} catch (RemoteException e) { } catch (RemoteException e) {
entidad.setIndIntegradoAG(false); entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.getMessage()); entidad.setMotivoNaoIntegradoAG(e.getMessage());
} }
} }
} catch (ServiceException se){ } catch (ServiceException se){
log.error("", se.toString()); wslog.error(se.toString());
} catch (MalformedURLException me){ } catch (MalformedURLException me){
log.error("", me.toString()); wslog.error(me.toString());
} catch (SQLException me){ } catch (SQLException me){
log.error("", me.toString()); wslog.error(me.toString());
} }
} }
} }
@ -240,9 +241,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String cliStr = ""; String cliStr = "";
try{ try{
cliStr = iag.getClienteWithIDWS(entidad.getNumPuntoVenta().toString()); cliStr = iag.getClienteWithIDWS(entidad.getNumPuntoVenta().toString());
log.info("Retorno consulta cliente ws: " + cliStr); wslog.debug("Retorno consulta cliente ws: " + cliStr);
} catch (RemoteException e) { } catch (RemoteException e) {
log.error("", e.toString()); wslog.error(e.toString());
} }
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
@ -308,18 +309,18 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
cli.getServicosCliente().setCRS_Codigo(""); cli.getServicosCliente().setCRS_Codigo("");
try{ try{
String retornoAG = iag.incluiCliente(cli); String retornoAG = iag.incluiCliente(cli);
log.info(retornoAG); wslog.debug(retornoAG);
} catch (RemoteException e) { } catch (RemoteException e) {
entidad.setIndIntegradoAG(false); entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.getMessage()); entidad.setMotivoNaoIntegradoAG(e.getMessage());
} }
} }
} catch (ServiceException se){ } catch (ServiceException se){
log.error("", se.toString()); wslog.error(se.toString());
} catch (MalformedURLException me){ } catch (MalformedURLException me){
log.error("", me.toString()); wslog.error(me.toString());
} catch (SQLException me){ } catch (SQLException me){
log.error("", me.toString()); wslog.error(me.toString());
} }
} }
} }