fixes #6127
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@42602 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
4d379a075e
commit
b4361d4079
|
@ -160,20 +160,22 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
|
|
||||||
private void integracionTotvs(PuntoVenta puntoVenta) throws IntegracionException {
|
private void integracionTotvs(PuntoVenta puntoVenta) throws IntegracionException {
|
||||||
if (ApplicationProperties.getInstance().integracionTotvs()) {
|
if (ApplicationProperties.getInstance().integracionTotvs()) {
|
||||||
|
|
||||||
String nomeEmpresa = puntoVenta.getRazonSocial();
|
|
||||||
String nomeFilial = puntoVenta.getNumDoCPuntoVenta();
|
|
||||||
|
|
||||||
String endpointFornecedor = getEndpointFornecedor();
|
String endpointFornecedor = getEndpointFornecedor();
|
||||||
String endpointCliente = getEndpointCliente();
|
String endpointCliente = getEndpointCliente();
|
||||||
|
|
||||||
|
Integer xidsvp = puntoVenta.getEmpresa().getEmpresaId();
|
||||||
|
String nomeEmpresa = puntoVenta.getRazonSocial();
|
||||||
|
String nomeFilial = puntoVenta.getNumDoCPuntoVenta();
|
||||||
|
|
||||||
|
String cnpjEmpresaProtheus = "25634551000138";
|
||||||
String nome = puntoVenta.getNombpuntoventa();
|
String nome = puntoVenta.getNombpuntoventa();
|
||||||
String cgc = puntoVenta.getNumDoCPuntoVenta();
|
String cgc ="";// puntoVenta.getNumDoCPuntoVenta();
|
||||||
|
|
||||||
String endereco = puntoVenta.getDireccioncalle() + "," + puntoVenta.getDireccionnumero() == null ? "" : puntoVenta.getDireccionnumero();
|
String endereco = puntoVenta.getDireccioncalle() + "," + puntoVenta.getDireccionnumero() == null ? "" : puntoVenta.getDireccionnumero();
|
||||||
String complemen = puntoVenta.getCompl() == null ? "" : puntoVenta.getCompl();
|
String complemen = puntoVenta.getCompl() == null ? "" : puntoVenta.getCompl();
|
||||||
String bairro = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getDesccolonia();
|
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 est = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getCveestado();
|
||||||
String codpais = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getPais().getPaisId().toString();
|
String codpais = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getPais().getPaisId().toString();
|
||||||
String cep = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCodpostal();
|
String cep = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCodpostal();
|
||||||
|
@ -194,10 +196,10 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
String inscr = puntoVenta.getNumIEPuntoVenta();
|
String inscr = puntoVenta.getNumIEPuntoVenta();
|
||||||
String nreduz = puntoVenta.getNombpuntoventa();
|
String nreduz = puntoVenta.getNombpuntoventa();
|
||||||
String tipo = Tipo.F.name();
|
String tipo = Tipo.F.name();
|
||||||
String tpessoa = puntoVenta.getNumDoCPuntoVenta();
|
String tpessoa = "";//puntoVenta.getNumDoCPuntoVenta();
|
||||||
String obs = puntoVenta.getComentarios();
|
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 cnae = "";
|
||||||
String inscrm = "";
|
String inscrm = "";
|
||||||
String naturez = "";
|
String naturez = "";
|
||||||
|
@ -210,21 +212,19 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.info(" ------------- INICIO INTEGRACION FORNECEDOR TOTVS ------------- ");
|
log.info(" ------------- INICIO INTEGRACION FORNECEDOR TOTVS ------------- ");
|
||||||
|
|
||||||
TotvsService.cadastrarFornecedor(endpointFornecedor, nomeEmpresa, nomeFilial, bairro, cep,
|
TotvsService.cadastrarFornecedor(endpointFornecedor, bairro, cep, cgc, cnae, codmun, codpais, complemen, conta, ddd, email, endereco,
|
||||||
cgc, cnae, codmun, codpais, complemen, conta, ddd, email, endereco, est, inscr,
|
est, inscr, inscrm, naturez, nome, nreduz, simpnac, tel, tipo, tpessoa, cnpjEmpresaProtheus,xidsvp);
|
||||||
inscrm, naturez, nome, nreduz, simpnac, tel, tipo, tpessoa);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
respEx = e;
|
respEx = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.info(" ------------- INICIO INTEGRACION CLIENTE TOTVS ------------- ");
|
log.info(" ------------- INICIO INTEGRACION CLIENTE TOTVS ------------- ");
|
||||||
|
|
||||||
TotvsService.cadastrarCliente(endpointCliente, bairro, cep, cgc, codmun, codpais, complemen, conta,
|
TotvsService.cadastrarCliente(endpointCliente, bairro, cep, cgc, codmun, codpais, complemen, conta, contrib, ddd, email, nomeEmpresa,
|
||||||
contrib, ddd, email, nomeEmpresa, endereco, entid, fator, fax, inscr, inscrm, naturez, nome,
|
endereco, entid, fator, fax, inscr, inscrm, naturez, nome, nreduz, obs, pais, tpessoa, tel, tipo, est, xidsvp);
|
||||||
nreduz, obs, pais, tpessoa, tel, tipo, est);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
respEx = e;
|
respEx = e;
|
||||||
|
@ -253,3 +253,4 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
||||||
return constante.getValorconstante();
|
return constante.getValorconstante();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue