Class: ArquivoEmpregadoHistoricoCadastral

Inherits:
Object
  • Object
show all
Includes:
ArquivoData
Defined in:
lib/odorico/arquivo_empregado_historico_cadastral.rb

Constant Summary collapse

ATRIBUTOS =
{
  id_evento_xml: { key: 'IdEventoXml', type: Types::String },
  nr_recibo_evento_original: { key: 'NrReciboEventoOriginal', type: Types::String },
  data_alteracao: { key: 'ESX_DATAALTERACAO', type: Types::Date },
  grau_instrucao: { key: 'EventoAdmissao_InfoTrabalhador_GrauInstrucao', type: Types::String },
  cpf: { key: 'EventoAdmissao_InfoTrabalhador_Cpf', type: Types::String },
  deficiencia_auditiva: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_DeficienciaAuditiva',
                          type: Types::SNBool.optional },
  deficiencia_fisica: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_DeficienciaFisica',
                        type: Types::SNBool.optional },
  deficiencia_intelectual: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_DeficienciaIntelectual',
                             type: Types::SNBool.optional },
  deficiencia_mental: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_DeficienciaMental',
                        type: Types::SNBool.optional },
  deficiencia_visual: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_DeficienciaVisual',
                        type: Types::SNBool.optional },
  deficiencia_reabilitado_ou_readaptado: { key: 'EventoAdmissao_InfoTrabalhador_Deficiencia_ReabilitadoOuReadaptado',
                                           type: Types::SNBool.optional },
  endereco_br_cep: { key: 'EventoAdmissao_EnderecoResidencialBR_Cep', type: Types::String.optional },
  endereco_br_descricao_logradouro: { key: 'EventoAdmissao_EnderecoResidencialBR_DescricaoLogradouro',
                                      type: Types::String.optional },
  endereco_br_numero_logradouro: { key: 'EventoAdmissao_EnderecoResidencialBR_NumeroLogradouro',
                                   type: Types::String.optional },
  endereco_br_bairro: { key: 'EventoAdmissao_EnderecoResidencialBR_Bairro', type: Types::String.optional },
  endereco_br_codigo_municipio: { key: 'EventoAdmissao_EnderecoResidencialBR_CodigoMunicipio',
                                  type: Types::String.optional },
  descricao_proc_emi: { key: 'DescricaoProcEmi', type: Types::String.optional },
  dependentes: { key: 'EventoAdmissao_Dependente', attributes: {
    nome: { key: 'NomeDependente', type: Types::String },
    data_de_nascimento: { key: 'DataNascimento', type: Types::Date },
    incapacidade: { key: 'IncapacidadeDependente', type: Types::SNBool },
    cpf: { key: 'CPFDependente', type: Types::String.optional },
    tipo: { key: 'TipoDependente', type: Types::String },
    dependente_de_IRRF: { key: 'DependenteIRRF', type: Types::SNBool }
  } }
}.freeze
ATRIBUTOS_IGNORADOS =
%w[
  EventoAdmissao_InfoTrabalhador_Nis
  EventoAdmissao_InfoTrabalhador_Nome
  EventoAdmissao_InfoTrabalhador_Sexo
  EventoAdmissao_InfoTrabalhador_RacaCor
  EventoAdmissao_EnderecoResidencialBR_Uf
  EventoAdmissao_EnderecoResidencialBR_TipoLogradouro
  EventoAdmissao_InfoTrabalhador_Deficiencia_InfoCota
  EventoAdmissao_InfoTrabalhador_Nascimento_DataNascimento
  EventoAdmissao_InfoTrabalhador_Nascimento_PaisNascimento
  EventoAdmissao_InfoTrabalhador_Nascimento_PaisNacionalidade
  EventoAdmissao_InfoTrabalhador_Nascimento_NomeMae
  UrlRetorno
  EventoAdmissao_TipoEventoEnviado
  EventoAdmissao_EnderecoResidencialBR_TipoLogradouro_TEXT
  EventoAdmissao_EnderecoResidencialBR_CodigoMunicipio_TEXT
  EventoAdmissao_EnderecoResidencialBR_Uf_TEXT
  EventoAdmissao_InfoTrabalhador_Documentos_Cnh_CategoriaCnh_TEXT
  EventoAdmissao_InfoTrabalhador_Documentos_Cnh_UfCnh_TEXT
  EventoAdmissao_InfoTrabalhador_Documentos_Ctps_UfCtps_TEXT
  EventoAdmissao_InfoTrabalhador_Documentos_Rne_NumerorRne
  EventoAdmissao_InfoTrabalhador_Documentos_Rne_OrgaoEmissor
  EventoAdmissao_InfoTrabalhador_Documentos_Rne_DataExpedicao
  EventoAdmissao_InfoTrabalhador_EstadoCivil_TEXT
  EventoAdmissao_InfoTrabalhador_GrauInstrucao_TEXT
  EventoAdmissao_InfoTrabalhador_Nascimento_CodigoMunicipio_TEXT
  EventoAdmissao_InfoTrabalhador_Nascimento_PaisNacionalidade_TEXT
  EventoAdmissao_InfoTrabalhador_Nascimento_PaisNascimento_TEXT
  EventoAdmissao_InfoTrabalhador_Nascimento_Uf_TEXT
  EventoAdmissao_InfoTrabalhador_RacaCor_TEXT
  EventoAdmissao_InfoTrabalhador_Sexo_TEXT
  EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_Uf_TEXT
  EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_CodigoMunicipio_TEXT
  EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_TipoLogradouro_TEXT
  EventoAdmissao_InfoTrabalhador_TrabalhadorEstrangeiro_DataChegada
  EventoAdmissao_InfoTrabalhador_TrabalhadorEstrangeiro_CasadoComBrasileiro
  EventoAdmissao_InfoTrabalhador_TrabalhadorEstrangeiro_FilhosBrasileiros
  EventoAdmissao_InfoTrabalhador_TrabalhadorEstrangeiro_ClassificacaoCondicao
  EventoAdmissao_InfoTrabalhador_TrabalhadorEstrangeiro_ClassificacaoCondicao_TEXT
  RequestVerificationToken
  ResideExterior
  SemNumeroLogradouroEnderecoBR
  SemNumeroLogradouroEnderecoEX
  SomenteLeitura
  VerProc
  VisualizarDadosCadastrais
  visualizar
  ESX_CPF
  ESX_DATAADMISSAO
  ESX_DATAALTERACAO
  ESX_MATRICULA
  ESX_SEMVINCULO
  IdContratoReferenciado
  EhAlteracaoCadastral
  EventoAdmissao_InformacoesInicio_CodigoCategoria
  CheckModoCompleto
  EventoAdmissao_DataAlteracaoCadastral
  checkbox_preencher_grupo0
  checkbox_preencher_grupo1
  checkbox_preencher_grupo2
  checkbox_preencher_grupo3
  checkbox_preencher_grupo4
  checkbox_preencher_grupo5
  checkbox_preencher_grupo6
  checkbox_preencher_grupo8
  ESX_CATEGORIA
  DataAlteracao
  DependenteSF
  DataNascimentoFormatada
].freeze
ATRIBUTOS_NAO_SUPORTADOS =
{}.freeze
ATRIBUTOS_DESCARTADOS =
{
  'Informação Complementar de Endereço': %w[
    EventoAdmissao_EnderecoResidencialBR_Complemento
  ],
  Nascimento: %w[
    EventoAdmissao_InfoTrabalhador_Nascimento_CodigoMunicipio
    EventoAdmissao_InfoTrabalhador_Nascimento_Uf
    EventoAdmissao_InfoTrabalhador_Nascimento_NomePai
    autocomplete_EventoAdmissao_InfoTrabalhador_Nascimento_PaisNascimento
    autocomplete_EventoAdmissao_InfoTrabalhador_Nascimento_PaisNacionalidade
  ],
  'Nome Social': %w[
    EventoAdmissao_InfoTrabalhador_NomeSocial
  ],
  'Estado Civil': %w[
    EventoAdmissao_InfoTrabalhador_EstadoCivil
  ],
  CNH: %w[
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_CategoriaCnh
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_DataExpedicao
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_DataPrimeiraHabilitacao
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_DataValidade
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_NumeroCnh
    EventoAdmissao_InfoTrabalhador_Documentos_Cnh_UfCnh
  ],
  CTPS: %w[
    EventoAdmissao_InfoTrabalhador_Documentos_Ctps_NumeroCtps
    EventoAdmissao_InfoTrabalhador_Documentos_Ctps_SerieCtps
    EventoAdmissao_InfoTrabalhador_Documentos_Ctps_UfCtps
  ],
  Identidade: %w[
    EventoAdmissao_InfoTrabalhador_Documentos_Rg_DataExpedicao
    EventoAdmissao_InfoTrabalhador_Documentos_Rg_NumeroRg
    EventoAdmissao_InfoTrabalhador_Documentos_Rg_OrgaoEmissor
  ],
  'Informação do contato do trabalhador': %w[
    EventoAdmissao_Contato_TelefoneAlternativo
    EventoAdmissao_Contato_TelefonePrincipal
    EventoAdmissao_Contato_EmailPrincipal
    EventoAdmissao_InfoTrabalhador_Contato_TelefonePrincipal
  ],
  'Informação de endereço do trabalhador': %w[
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_Cep
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_TipoLogradouro
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_DescricaoLogradouro
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_NumeroLogradouro
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_Bairro
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_Uf
    EventoAdmissao_InfoTrabalhador_InfoEndereco_EnderecoResidencialBR_CodigoMunicipio
  ]
}.freeze

Method Summary

Methods included from ArquivoData

#alertas, #atributos, #erros, #processar