leonardo 2016-12-30 15:24:15 +00:00
parent 805c691fbc
commit 4c68cc8a7e
1 changed files with 4 additions and 2 deletions

View File

@ -166,10 +166,11 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String strFornecedor = "";
try{
strFornecedor = iag.getCodigoFornecedorWithIDWS(entidad.getPuntoventaId().toString());
log.debug("Retorno consulta fornecedor ws: " + strFornecedor);
} catch (RemoteException e) {
log.error("", e.toString());
}
if (!strFornecedor.isEmpty()){
if (!strFornecedor.contains("ERRO")){
// retornar msg a informação de registro já cadastrado
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG("Fornecedor já cadastrado");
@ -237,10 +238,11 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
String cliStr = "";
try{
cliStr = iag.getClienteWithIDWS(entidad.getPuntoventaId().toString());
log.debug("Retorno consulta cliente ws: " + cliStr);
} catch (RemoteException e) {
log.error("", e.toString());
}
if (!cliStr.isEmpty()){
if (!cliStr.contains("ERRO")){
// retornar msg a informação de registro já cadastrado
entidad.setIndIntegradoAG(false);
entidad.setMotivoNaoIntegradoAG("Cliente já cadastrado");