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 {
private static Logger log = LoggerFactory.getLogger(PuntoVentaServiceImpl.class);
private static org.jboss.logging.Logger wslog = org.jboss.logging.Logger.getLogger("com.rjconsultores.ws");
@Autowired
private PuntoVentaDAO puntoVentaDAO;
@ -168,9 +169,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String strFornecedor = "";
try{
strFornecedor = iag.getCodigoFornecedorWithIDWS(entidad.getNumPuntoVenta().toString());
log.info("Retorno consulta fornecedor ws: " + strFornecedor);
wslog.debug("Retorno consulta fornecedor ws: " + strFornecedor);
} catch (RemoteException e) {
log.error("", e.toString());
wslog.error(e.toString());
}
if (!strFornecedor.contains("ERRO")){
// retornar msg a informação de registro já cadastrado
@ -214,18 +215,18 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
fornecedor.setIDWS(entidad.getNumPuntoVenta());
try{
String retornoAG = iag.incluiFornecedor(fornecedor);
log.info(retornoAG);
wslog.debug(retornoAG);
} catch (RemoteException e) {
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.getMessage());
}
}
} catch (ServiceException se){
log.error("", se.toString());
wslog.error(se.toString());
} catch (MalformedURLException me){
log.error("", me.toString());
wslog.error(me.toString());
} catch (SQLException me){
log.error("", me.toString());
wslog.error(me.toString());
}
}
}
@ -240,9 +241,9 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String cliStr = "";
try{
cliStr = iag.getClienteWithIDWS(entidad.getNumPuntoVenta().toString());
log.info("Retorno consulta cliente ws: " + cliStr);
wslog.debug("Retorno consulta cliente ws: " + cliStr);
} catch (RemoteException e) {
log.error("", e.toString());
wslog.error(e.toString());
}
if (!cliStr.contains("ERRO")){
// retornar msg a informação de registro já cadastrado
@ -308,18 +309,18 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
cli.getServicosCliente().setCRS_Codigo("");
try{
String retornoAG = iag.incluiCliente(cli);
log.info(retornoAG);
wslog.debug(retornoAG);
} catch (RemoteException e) {
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG(e.getMessage());
}
}
} catch (ServiceException se){
log.error("", se.toString());
wslog.error(se.toString());
} catch (MalformedURLException me){
log.error("", me.toString());
wslog.error(me.toString());
} catch (SQLException me){
log.error("", me.toString());
wslog.error(me.toString());
}
}
}