teodoro 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/teodoro +3 -0
- data/lib/teodoro.rb +7 -0
- data/lib/teodoro/arquivo_de_evento.rb +31 -0
- data/lib/teodoro/arquivo_de_evento_de_tabela.rb +86 -0
- data/lib/teodoro/arquivo_de_evento_nao_periodico.rb +58 -0
- data/lib/teodoro/arquivo_de_origem.rb +28 -0
- data/lib/teodoro/arquivo_xml.rb +112 -0
- data/lib/teodoro/cnpj.rb +64 -0
- data/lib/teodoro/console.rb +9 -0
- data/lib/teodoro/empresa.rb +85 -0
- data/lib/teodoro/execucao.rb +62 -0
- data/lib/teodoro/leiaute_2_4_1.rb +21 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1000.rb +163 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1005.rb +83 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1010.rb +61 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1020.rb +68 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1030.rb +59 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1040.rb +49 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1050.rb +68 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s1070.rb +75 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2190.rb +30 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2200.rb +300 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2205.rb +157 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2206.rb +187 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2230.rb +147 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2250.rb +62 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2300.rb +284 -0
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2306.rb +167 -0
- data/lib/teodoro/xml.rb +31 -0
- metadata +71 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'zip'
|
3
|
+
|
4
|
+
require_relative 'console'
|
5
|
+
require_relative 'empresa'
|
6
|
+
|
7
|
+
module Teodoro
|
8
|
+
class Execucao
|
9
|
+
private
|
10
|
+
|
11
|
+
def initialize(origem:, destino:)
|
12
|
+
@origem = origem
|
13
|
+
@destino = destino
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_reader :origem, :destino
|
17
|
+
|
18
|
+
public
|
19
|
+
|
20
|
+
def call
|
21
|
+
executar
|
22
|
+
rescue StandardError => e
|
23
|
+
Console.print e.message, *e.backtrace, color: :red
|
24
|
+
exit
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def executar
|
30
|
+
validar_existencia_do_diretorio_de_origem
|
31
|
+
validar_que_diretorio_de_origem_nao_esta_vazio
|
32
|
+
validar_que_diretorio_de_destino_esta_vazio
|
33
|
+
|
34
|
+
processar_empresas
|
35
|
+
end
|
36
|
+
|
37
|
+
def validar_existencia_do_diretorio_de_origem
|
38
|
+
erro 'Diretório de origem não existe.' unless File.directory?(origem)
|
39
|
+
end
|
40
|
+
|
41
|
+
def validar_que_diretorio_de_origem_nao_esta_vazio
|
42
|
+
erro 'Diretório de origem vazio.' if Dir.empty?(origem)
|
43
|
+
end
|
44
|
+
|
45
|
+
def validar_que_diretorio_de_destino_esta_vazio
|
46
|
+
erro 'Diretório de destino deve estar vazio.' unless Dir.empty?(destino)
|
47
|
+
end
|
48
|
+
|
49
|
+
def erro(erro)
|
50
|
+
puts erro
|
51
|
+
exit
|
52
|
+
end
|
53
|
+
|
54
|
+
def processar_empresas
|
55
|
+
empresas.each(&:processar)
|
56
|
+
end
|
57
|
+
|
58
|
+
def empresas
|
59
|
+
Dir[File.join(origem, '*')].map { |caminho| Empresa.new(caminho: caminho, destino: destino) }
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'leiaute_2_4_1/arquivo_s1000'
|
2
|
+
require_relative 'leiaute_2_4_1/arquivo_s1005'
|
3
|
+
require_relative 'leiaute_2_4_1/arquivo_s1010'
|
4
|
+
require_relative 'leiaute_2_4_1/arquivo_s1020'
|
5
|
+
require_relative 'leiaute_2_4_1/arquivo_s1030'
|
6
|
+
require_relative 'leiaute_2_4_1/arquivo_s1040'
|
7
|
+
require_relative 'leiaute_2_4_1/arquivo_s1050'
|
8
|
+
require_relative 'leiaute_2_4_1/arquivo_s1070'
|
9
|
+
require_relative 'leiaute_2_4_1/arquivo_s2190'
|
10
|
+
require_relative 'leiaute_2_4_1/arquivo_s2200'
|
11
|
+
require_relative 'leiaute_2_4_1/arquivo_s2205'
|
12
|
+
require_relative 'leiaute_2_4_1/arquivo_s2206'
|
13
|
+
require_relative 'leiaute_2_4_1/arquivo_s2230'
|
14
|
+
require_relative 'leiaute_2_4_1/arquivo_s2250'
|
15
|
+
require_relative 'leiaute_2_4_1/arquivo_s2300'
|
16
|
+
require_relative 'leiaute_2_4_1/arquivo_s2306'
|
17
|
+
|
18
|
+
module Teodoro
|
19
|
+
module Leiaute_2_4_1
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
module Teodoro
|
2
|
+
module Leiaute_2_4_1
|
3
|
+
# rubocop:disable Metrics/ClassLength
|
4
|
+
class ArquivoS1000
|
5
|
+
include ArquivoDeEventoDeTabela
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def noh_principal_do_evento
|
10
|
+
'evtInfoEmpregador'
|
11
|
+
end
|
12
|
+
|
13
|
+
def noh_de_informacoes_do_evento
|
14
|
+
'infoEmpregador'
|
15
|
+
end
|
16
|
+
|
17
|
+
def identificacao_do_arquivo_data
|
18
|
+
['EMP', cnpj_cpf]
|
19
|
+
end
|
20
|
+
|
21
|
+
def cnpj_cpf
|
22
|
+
if cnpj?
|
23
|
+
cnpj
|
24
|
+
elsif cpf?
|
25
|
+
cpf
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def cnpj?
|
30
|
+
tipo_de_inscricao == '1'
|
31
|
+
end
|
32
|
+
|
33
|
+
def cpf?
|
34
|
+
tipo_de_inscricao == '2'
|
35
|
+
end
|
36
|
+
|
37
|
+
def tipo_de_inscricao
|
38
|
+
tipo_de_inscricao_do_empregador
|
39
|
+
end
|
40
|
+
|
41
|
+
def cnpj
|
42
|
+
@cnpj ||=
|
43
|
+
case numero_de_inscricao.size
|
44
|
+
when 14
|
45
|
+
numero_de_inscricao
|
46
|
+
when 8
|
47
|
+
cnpj_raiz.cnpj0001
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def cpf
|
52
|
+
numero_de_inscricao
|
53
|
+
end
|
54
|
+
|
55
|
+
def numero_de_inscricao
|
56
|
+
@numero_de_inscricao ||= evento['evtInfoEmpregador/ideEmpregador/nrInsc']
|
57
|
+
end
|
58
|
+
|
59
|
+
def cnpj_raiz
|
60
|
+
CNPJ::Raiz.new(numero_de_inscricao)
|
61
|
+
end
|
62
|
+
|
63
|
+
def noh_de_identificacao_do_periodo
|
64
|
+
'idePeriodo'
|
65
|
+
end
|
66
|
+
|
67
|
+
# rubocop:disable Layout/LineLength, Metrics/MethodLength, Metrics/AbcSize
|
68
|
+
def itens_do_conteudo_do_arquivo_data
|
69
|
+
[
|
70
|
+
['TipoInscricaoEmpregador', tipo_de_inscricao],
|
71
|
+
['FapBdContrib'],
|
72
|
+
['AlteracaoEmPeriodoExistente'],
|
73
|
+
['EventoJaExiste'],
|
74
|
+
['ContinuandoEdicao'],
|
75
|
+
['CpfEmpregador', (cpf if cpf?)],
|
76
|
+
['CnpjEmpregador', (cnpj if cnpj?)],
|
77
|
+
['NomeEmpregador'],
|
78
|
+
['EhRetificacao'],
|
79
|
+
['EhInclusaoNovoPeriodo'],
|
80
|
+
['RetornoAction'],
|
81
|
+
['ehOrgaoPublicoUniao'],
|
82
|
+
['ehOrgaoPublicoEstadualMunicipalDistrital'],
|
83
|
+
['indicadorTelaAlteracao'],
|
84
|
+
['ExibeModoCompleto'],
|
85
|
+
['InicioValidade', inicio_da_validade],
|
86
|
+
['FimValidade', fim_da_validade],
|
87
|
+
['NovaValidade_InicioValidade'], # FIXME: Tales
|
88
|
+
['NovaValidade_FimValidade'], # FIXME: Tales
|
89
|
+
['NomeRazaoSocial', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/nmRazao']],
|
90
|
+
['ClassificacaoTributaria', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/classTrib']],
|
91
|
+
['NaturezaJuridica', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/natJurid']],
|
92
|
+
['IndicativoRegEletronico', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indOptRegEletron']],
|
93
|
+
['IndicativoCooperativa', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indCoop']],
|
94
|
+
['IndicativoConstrutora', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indConstr']],
|
95
|
+
['IndicativoDesoneracaoFolha', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indDesFolha']],
|
96
|
+
['IndicativoEntidadeEducativa', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indEntEd']],
|
97
|
+
['IndicativoEmpresaTrabalhoTemporario', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indEtt']],
|
98
|
+
['NumeroRegistroEmpresaTrabalhoTemporario', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/nrRegEtt']],
|
99
|
+
['DesejaIncluirInformacoesEmpresasIsentas'],
|
100
|
+
['NomeMinisterioOuLei', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/ideMinLei']],
|
101
|
+
['NumeroCertificado', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/nrCertif']],
|
102
|
+
['DataEmissaoCertificado', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/dtEmisCertif']],
|
103
|
+
['DataVencimentoCertificado', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/dtVencCertif']],
|
104
|
+
['NumeroProtocoloRenovacao', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/nrProtRenov']],
|
105
|
+
['DataProtocoloRenovacao', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/dtProtRenov']],
|
106
|
+
['DataPublicacaoDou', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/dtDou']],
|
107
|
+
['NumPaginaDou', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/dadosIsencao/pagDou']],
|
108
|
+
['CpfContato', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/cpfCtt']],
|
109
|
+
['NomeContato', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/nmCtt']],
|
110
|
+
['TelefoneFixo', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/foneFixo']],
|
111
|
+
['TelefoneCelular', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/foneCel']],
|
112
|
+
['Email', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/email']],
|
113
|
+
['NumeroSiafiOP', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/nrSiafi']],
|
114
|
+
['EhEnteFederativoResponsavelOuAutonomo', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEFR/ideEFR']],
|
115
|
+
['CnpjEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEFR/cnpjEFR']],
|
116
|
+
['NomeEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/nmEnte']],
|
117
|
+
['UfEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/uf']],
|
118
|
+
['CodMunicipioEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/codMunic']],
|
119
|
+
['IndRPPSEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/indRPPS']],
|
120
|
+
['SubTetoEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/subteto']],
|
121
|
+
['ValorSubTetoEnte', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte/vrSubteto']],
|
122
|
+
['DesejaIncluirEmpresaSoftware'],
|
123
|
+
['SoftwareHouseTela_CnpjSoftwareHouse'],
|
124
|
+
['SoftwareHouseTela_NomeRazaoSocial'],
|
125
|
+
['SoftwareHouseTela_NomeContato'],
|
126
|
+
['SoftwareHouseTela_Telefone'],
|
127
|
+
['SoftwareHouseTela_Email'],
|
128
|
+
['commandArgument'],
|
129
|
+
['IndicativoAcordoIsencaoMulta', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOrgInternacional/indAcordoIsenMulta']],
|
130
|
+
['IndicativoSituacaoPF', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoComplementares/situacaoPF']],
|
131
|
+
['IndicativoSituacaoPJ', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoComplementares/situacaoPJ']],
|
132
|
+
['IdEventoXml'],
|
133
|
+
['NrReciboEventoOriginal'],
|
134
|
+
['DescricaoProcEmi'],
|
135
|
+
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
136
|
+
['idEdicaoSH'],
|
137
|
+
['descricaoTipoInscricao'],
|
138
|
+
['InformacoesManutencao_Id'],
|
139
|
+
['PerguntaValidacao_1'],
|
140
|
+
['PerguntaValidacao_2'],
|
141
|
+
['InformacoesManutencao_OpcaoPermitida'],
|
142
|
+
['ESX_GRUPO'],
|
143
|
+
['ESX_TABELARUBRICA'],
|
144
|
+
*softwares_house.map.with_index(1) do |software_house, seq|
|
145
|
+
[
|
146
|
+
["ListaSoftHouses_#{seq}_CnpjSoftwareHouse", software_house['cnpjSoftHouse']],
|
147
|
+
["ListaSoftHouses_#{seq}_NomeRazaoSocial", software_house['nmRazao']],
|
148
|
+
["ListaSoftHouses_#{seq}_Telefone", software_house['telefone']],
|
149
|
+
["ListaSoftHouses_#{seq}_NomeContato", software_house['nmCont']],
|
150
|
+
["ListaSoftHouses_#{seq}_Email", software_house['email']]
|
151
|
+
]
|
152
|
+
end.sum([])
|
153
|
+
]
|
154
|
+
end
|
155
|
+
# rubocop:enable Layout/LineLength, Metrics/MethodLength, Metrics/AbcSize
|
156
|
+
|
157
|
+
def softwares_house
|
158
|
+
evento.*('evtInfoEmpregador/infoEmpregador/*/infoCadastro/softwareHouse')
|
159
|
+
end
|
160
|
+
end
|
161
|
+
# rubocop:enable Metrics/ClassLength
|
162
|
+
end
|
163
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module Teodoro
|
2
|
+
module Leiaute_2_4_1
|
3
|
+
class ArquivoS1005
|
4
|
+
include ArquivoDeEventoDeTabela
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def noh_principal_do_evento
|
9
|
+
'evtTabEstab'
|
10
|
+
end
|
11
|
+
|
12
|
+
def noh_de_informacoes_do_evento
|
13
|
+
'infoEstab'
|
14
|
+
end
|
15
|
+
|
16
|
+
def identificacao_do_arquivo_data
|
17
|
+
['EST', numero_de_inscricao]
|
18
|
+
end
|
19
|
+
|
20
|
+
def numero_de_inscricao
|
21
|
+
@numero_de_inscricao ||= evento['evtTabEstab/infoEstab/*/ideEstab/nrInsc']
|
22
|
+
end
|
23
|
+
|
24
|
+
def noh_de_identificacao_do_periodo
|
25
|
+
'ideEstab'
|
26
|
+
end
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength
|
29
|
+
def itens_do_conteudo_do_arquivo_data
|
30
|
+
[
|
31
|
+
['RequestVerificationToken'],
|
32
|
+
['SomenteVisualizacao'],
|
33
|
+
['BloquearCodigo'],
|
34
|
+
['BloquearAntigoPeriodoValidade'],
|
35
|
+
['TipoInscricaoEmpregador', tipo_de_inscricao_do_empregador],
|
36
|
+
['TipoEmpregador'],
|
37
|
+
['ContinuandoEdicao'],
|
38
|
+
['TipoInscricaoEstabelecimento', evento['evtTabEstab/infoEstab/*/ideEstab/tpInsc']],
|
39
|
+
['NumeroInscricaoEstabelecimento', numero_de_inscricao],
|
40
|
+
['NomeEstabelecimento'],
|
41
|
+
['InicioValidade', inicio_da_validade],
|
42
|
+
['FimValidade', fim_da_validade],
|
43
|
+
['TipoCaepf', evento['evtTabEstab/infoEstab/*/dadosEstab/infoCaepf/tpCaepf']],
|
44
|
+
['CnaePreponderanteCodigoDescricaoAutoComplete'],
|
45
|
+
['CnaePreponderante', evento['evtTabEstab/infoEstab/*/dadosEstab/cnaePrep']],
|
46
|
+
['CnaePreponderantePreenchido'],
|
47
|
+
['AliquotaRat', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/aliqRat']],
|
48
|
+
['Fap', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/fap']],
|
49
|
+
['AliquotaRatAjustada', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/aliqRatAjust']],
|
50
|
+
['FapRecuperado'],
|
51
|
+
['AliquotaRatRecuperada'],
|
52
|
+
['DesejaIncluirProcessoAdminJudRat'],
|
53
|
+
['ProcessoAdminJudRat_TipoProcesso', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudRat/tpProc']],
|
54
|
+
['ProcessoAdminJudRat_NumeroProcesso', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudRat/nrProc']],
|
55
|
+
['valorFoiSelecionado'],
|
56
|
+
['NumeroProcessoRatPreenchido'],
|
57
|
+
['ProcessoAdminJudRat_CodigoSuspensao', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudRat/codSusp']],
|
58
|
+
['DesejaIncluirProcessoAdminJudFap'],
|
59
|
+
['ProcessoAdminJudFap_TipoProcesso', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudFap/tpProc']],
|
60
|
+
['ProcessoAdminJudFap_NumeroProcesso', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudFap/nrProc']],
|
61
|
+
['NumeroProcessoFapPreenchido'],
|
62
|
+
['ProcessoAdminJudFap_CodigoSuspensao', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/procAdmJudFap/codSusp']],
|
63
|
+
['TipoRegistroPonto', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/regPt']],
|
64
|
+
['IndicativoContratacaoAprendiz', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoApr/contApr']],
|
65
|
+
['NumeroProcessoJudicialAprendiz', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoApr/nrProcJud']],
|
66
|
+
['ContratoAprendizEntidade', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoApr/contEntEd']],
|
67
|
+
['EntidadeEducativaTela_CnpjEntidadeEducativa'],
|
68
|
+
['EntidadeEducativaTela_RazaoSocial'],
|
69
|
+
['IndicativoContratacaoDeficiencia', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoPCD/contPCD']],
|
70
|
+
['NumeroProcessoJudicialDeficiencia', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoPCD/nrProcJud']],
|
71
|
+
['IndicativoSubstituicaoPatronalObra', evento['evtTabEstab/infoEstab/*/dadosEstab/infoObra/indSubstPatrObra']],
|
72
|
+
['IdEventoXml'],
|
73
|
+
['NrReciboEventoOriginal'],
|
74
|
+
['DescricaoProcEmi'],
|
75
|
+
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
76
|
+
['idEdicaoSH'],
|
77
|
+
['ExibirContribuicaoPatronal']
|
78
|
+
]
|
79
|
+
end
|
80
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Teodoro
|
2
|
+
module Leiaute_2_4_1
|
3
|
+
class ArquivoS1010
|
4
|
+
include ArquivoDeEventoDeTabela
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def noh_principal_do_evento
|
9
|
+
'evtTabRubrica'
|
10
|
+
end
|
11
|
+
|
12
|
+
def noh_de_informacoes_do_evento
|
13
|
+
'infoRubrica'
|
14
|
+
end
|
15
|
+
|
16
|
+
def noh_de_identificacao_do_periodo
|
17
|
+
'ideRubrica'
|
18
|
+
end
|
19
|
+
|
20
|
+
def identificacao_do_arquivo_data
|
21
|
+
['RUB', codigo]
|
22
|
+
end
|
23
|
+
|
24
|
+
def codigo
|
25
|
+
@codigo ||= evento['evtTabRubrica/infoRubrica/*/ideRubrica/codRubr']
|
26
|
+
end
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
29
|
+
def itens_do_conteudo_do_arquivo_data
|
30
|
+
[
|
31
|
+
['RequestVerificationToken'],
|
32
|
+
['SomenteVisualizacao'],
|
33
|
+
['BloquearCodigo'],
|
34
|
+
['BloquearAntigoPeriodoValidade'],
|
35
|
+
['Codigo', codigo],
|
36
|
+
['InicioValidade', inicio_da_validade],
|
37
|
+
['FimValidade', fim_da_validade],
|
38
|
+
['chkIdTabelaRubrica'],
|
39
|
+
['IdTabelaRubrica', evento['evtTabRubrica/infoRubrica/*/ideRubrica/ideTabRubr']],
|
40
|
+
['IdTabelaRubricaText'],
|
41
|
+
['DadosRubrica_Descricao', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/dscRubr']],
|
42
|
+
['DadosRubrica_Natureza', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/natRubr']],
|
43
|
+
['DadosRubrica_TipoRubrica', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/tpRubr']],
|
44
|
+
['DadosRubrica_CodigoIncidenciaPrevidencia', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncCP']],
|
45
|
+
['DadosRubrica_CodigoIncidenciaIR', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncIRRF']],
|
46
|
+
['DadosRubrica_CodigoIncidenciaFGTS', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncFGTS']],
|
47
|
+
['DadosRubrica_CodigoIncidenciaSindical', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncSIND']],
|
48
|
+
['IdEventoXml'],
|
49
|
+
['NrReciboEventoOriginal'],
|
50
|
+
['DescricaoProcEmi'],
|
51
|
+
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
52
|
+
['hd_ProcessoFGTS'],
|
53
|
+
['hd_ProcessoCP'],
|
54
|
+
['hd_ProcessoIR'],
|
55
|
+
['hd_ProcessoSindicato']
|
56
|
+
]
|
57
|
+
end
|
58
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module Teodoro
|
2
|
+
module Leiaute_2_4_1
|
3
|
+
class ArquivoS1020
|
4
|
+
include ArquivoDeEventoDeTabela
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def noh_principal_do_evento
|
9
|
+
'evtTabLotacao'
|
10
|
+
end
|
11
|
+
|
12
|
+
def noh_de_informacoes_do_evento
|
13
|
+
'infoLotacao'
|
14
|
+
end
|
15
|
+
|
16
|
+
def noh_de_identificacao_do_periodo
|
17
|
+
'ideLotacao'
|
18
|
+
end
|
19
|
+
|
20
|
+
def identificacao_do_arquivo_data
|
21
|
+
['LOT', codigo_da_lotacao_tributaria]
|
22
|
+
end
|
23
|
+
|
24
|
+
def codigo_da_lotacao_tributaria
|
25
|
+
@codigo_da_lotacao_tributaria ||= evento['evtTabLotacao/infoLotacao/*/ideLotacao/codLotacao']
|
26
|
+
end
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/MethodLength, Layout/LineLength, Metrics/AbcSize
|
29
|
+
def itens_do_conteudo_do_arquivo_data
|
30
|
+
[
|
31
|
+
['RequestVerificationToken'],
|
32
|
+
['SomenteVisualizacao'],
|
33
|
+
['BloquearCodigo'],
|
34
|
+
['BloquearAntigoPeriodoValidade'],
|
35
|
+
['CodigoConvenioTerceirosHidden'],
|
36
|
+
['IdEvento'],
|
37
|
+
['CodigoLotacao', codigo_da_lotacao_tributaria],
|
38
|
+
['InicioValidade', inicio_da_validade],
|
39
|
+
['FimValidade', fim_da_validade],
|
40
|
+
['TipoLotacao', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/tpLotacao']],
|
41
|
+
['Tipo'],
|
42
|
+
['TipoInscricaoEstab', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/tpInsc']],
|
43
|
+
['NumeroInscricaoEstab', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/nrInsc']],
|
44
|
+
['Fpas', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/fpas']],
|
45
|
+
['CodigoConvenioTerceiros', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/codTercs']],
|
46
|
+
['CodigoTerceirosPreenchido'],
|
47
|
+
['CodigoConvenioTerceirosSuspenso', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/codTercsSusp']],
|
48
|
+
['Acao'],
|
49
|
+
['TelaProcessoJudTerceiro_CodigoTerceiro', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/infoProcJudTerceiros/procJudTerceiro/codTerc']],
|
50
|
+
['TelaProcessoJudTerceiro_NumeroProcessoJudicial', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/infoProcJudTerceiros/procJudTerceiro/nrProcJud']],
|
51
|
+
['valorFoiSelecionado'],
|
52
|
+
['TelaProcessoJudTerceiro_CodigoIndicativoSuspensao', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/fpasLotacao/infoProcJudTerceiros/procJudTerceiro/codSusp']],
|
53
|
+
['TipoInscricaoContratante', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/infoEmprParcial/tpInscContrat']],
|
54
|
+
['NumeroInscricaoContratante', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/infoEmprParcial/nrInscContrat']],
|
55
|
+
['TipoInscricaoProprietario', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/infoEmprParcial/tpInscProp']],
|
56
|
+
['NumeroInscricaoProprietario', evento['evtTabLotacao/infoLotacao/*/dadosLotacao/infoEmprParcial/nrInscProp']],
|
57
|
+
['IdEventoXml'],
|
58
|
+
['NrReciboEventoOriginal'],
|
59
|
+
['DescricaoProcEmi'],
|
60
|
+
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
61
|
+
['idEdicaoProcesso'],
|
62
|
+
['ExibirContribuicaoPatronal']
|
63
|
+
]
|
64
|
+
end
|
65
|
+
# rubocop:enable Metrics/MethodLength, Layout/LineLength, Metrics/AbcSize
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|