diff --git a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java index ad6943c21..3dc796b77 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java @@ -160,20 +160,22 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { private void integracionTotvs(PuntoVenta puntoVenta) throws IntegracionException { if (ApplicationProperties.getInstance().integracionTotvs()) { - - String nomeEmpresa = puntoVenta.getRazonSocial(); - String nomeFilial = puntoVenta.getNumDoCPuntoVenta(); - + String endpointFornecedor = getEndpointFornecedor(); String endpointCliente = getEndpointCliente(); + Integer xidsvp = puntoVenta.getEmpresa().getEmpresaId(); + String nomeEmpresa = puntoVenta.getRazonSocial(); + String nomeFilial = puntoVenta.getNumDoCPuntoVenta(); + + String cnpjEmpresaProtheus = "25634551000138"; String nome = puntoVenta.getNombpuntoventa(); - String cgc = puntoVenta.getNumDoCPuntoVenta(); + String cgc ="";// puntoVenta.getNumDoCPuntoVenta(); String endereco = puntoVenta.getDireccioncalle() + "," + puntoVenta.getDireccionnumero() == null ? "" : puntoVenta.getDireccionnumero(); String complemen = puntoVenta.getCompl() == null ? "" : puntoVenta.getCompl(); String bairro = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getDesccolonia(); - String codmun = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getCiudadId().toString(); + String codmun = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getCodmunicipio().toString(); String est = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getCveestado(); String codpais = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getPais().getPaisId().toString(); String cep = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCodpostal(); @@ -194,10 +196,10 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { String inscr = puntoVenta.getNumIEPuntoVenta(); String nreduz = puntoVenta.getNombpuntoventa(); String tipo = Tipo.F.name(); - String tpessoa = puntoVenta.getNumDoCPuntoVenta(); + String tpessoa = "";//puntoVenta.getNumDoCPuntoVenta(); String obs = puntoVenta.getComentarios(); - String conta = puntoVenta.getAgenciaId() == null ? null : puntoVenta.getAgenciaId().getNumconta() + "-" + puntoVenta.getAgenciaId().getDigito(); + String conta = "";//puntoVenta.getAgenciaId() == null ? null : puntoVenta.getAgenciaId().getNumconta() + "-" + puntoVenta.getAgenciaId().getDigito(); String cnae = ""; String inscrm = ""; String naturez = ""; @@ -210,21 +212,19 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { try { log.info(" ------------- INICIO INTEGRACION FORNECEDOR TOTVS ------------- "); - - TotvsService.cadastrarFornecedor(endpointFornecedor, nomeEmpresa, nomeFilial, bairro, cep, - cgc, cnae, codmun, codpais, complemen, conta, ddd, email, endereco, est, inscr, - inscrm, naturez, nome, nreduz, simpnac, tel, tipo, tpessoa); + + TotvsService.cadastrarFornecedor(endpointFornecedor, bairro, cep, cgc, cnae, codmun, codpais, complemen, conta, ddd, email, endereco, + est, inscr, inscrm, naturez, nome, nreduz, simpnac, tel, tipo, tpessoa, cnpjEmpresaProtheus,xidsvp); } catch (Exception e) { log.error("", e); respEx = e; } - + try { log.info(" ------------- INICIO INTEGRACION CLIENTE TOTVS ------------- "); - TotvsService.cadastrarCliente(endpointCliente, bairro, cep, cgc, codmun, codpais, complemen, conta, - contrib, ddd, email, nomeEmpresa, endereco, entid, fator, fax, inscr, inscrm, naturez, nome, - nreduz, obs, pais, tpessoa, tel, tipo, est); + TotvsService.cadastrarCliente(endpointCliente, bairro, cep, cgc, codmun, codpais, complemen, conta, contrib, ddd, email, nomeEmpresa, + endereco, entid, fator, fax, inscr, inscrm, naturez, nome, nreduz, obs, pais, tpessoa, tel, tipo, est, xidsvp); } catch (Exception e) { log.error("", e); respEx = e; @@ -253,3 +253,4 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { return constante.getValorconstante(); } } +