teodoro 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/teodoro.rb +5 -11
- data/lib/teodoro/arquivo_de_evento.rb +22 -8
- data/lib/teodoro/{arquivo_de_evento_exceto_de_exclusao.rb → arquivo_de_evento_criador_de_arquivo_data.rb} +2 -8
- data/lib/teodoro/arquivo_de_evento_de_tabela.rb +2 -12
- data/lib/teodoro/arquivo_de_evento_nao_periodico.rb +9 -42
- data/lib/teodoro/arquivo_de_evento_processador_de_arquivo_data.rb +30 -0
- data/lib/teodoro/arquivo_de_evento_retificavel.rb +23 -0
- data/lib/teodoro/arquivo_de_origem.rb +1 -1
- data/lib/teodoro/arquivo_xml.rb +44 -73
- data/lib/teodoro/console.rb +2 -6
- data/lib/teodoro/empresa.rb +108 -14
- data/lib/teodoro/leiaute.rb +24 -0
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1000.rb +7 -9
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1005.rb +4 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1010.rb +3 -5
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1020.rb +4 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1030.rb +4 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1040.rb +2 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1050.rb +4 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s1070.rb +2 -4
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2190.rb +2 -2
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2200.rb +138 -22
- data/lib/teodoro/leiaute/arquivo_s2205.rb +264 -0
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2206.rb +18 -7
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2230.rb +56 -12
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2250.rb +25 -9
- data/lib/teodoro/leiaute/arquivo_s2299.rb +313 -0
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2300.rb +31 -5
- data/lib/teodoro/{leiaute_2_4_1 → leiaute}/arquivo_s2306.rb +27 -7
- data/lib/teodoro/leiaute/arquivo_s2399.rb +306 -0
- data/lib/teodoro/leiaute/arquivo_s3000.rb +33 -0
- data/lib/teodoro/obj.rb +5 -0
- metadata +26 -21
- data/lib/teodoro/leiaute_2_4_1.rb +0 -22
- data/lib/teodoro/leiaute_2_4_1/arquivo_s2205.rb +0 -157
- data/lib/teodoro/leiaute_2_4_1/arquivo_s3000.rb +0 -45
data/lib/teodoro/console.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
module Console
|
2
|
-
|
3
|
-
|
4
|
-
color_codes = { green: 32, red: 31 }
|
5
|
-
strings = strings.map { |string| "\e[#{color_codes[color]}m#{string}\e[0m" } if color
|
6
|
-
puts strings
|
7
|
-
end
|
2
|
+
def self.print(string = nil)
|
3
|
+
Kernel.print "\r\e[2K#{string}"
|
8
4
|
end
|
9
5
|
end
|
data/lib/teodoro/empresa.rb
CHANGED
@@ -20,6 +20,7 @@ module Teodoro
|
|
20
20
|
criar_diretorio_dos_arquivos_xml
|
21
21
|
descompactar_arquivos_de_origem
|
22
22
|
criar_diretorio_dos_arquivos_data
|
23
|
+
ordenar_arquivos_xml
|
23
24
|
processar_arquivos_xml
|
24
25
|
limpar_linha_de_feedback
|
25
26
|
end
|
@@ -27,7 +28,7 @@ module Teodoro
|
|
27
28
|
private
|
28
29
|
|
29
30
|
def dar_feedback_para_o_usuario
|
30
|
-
|
31
|
+
puts "\e[32m#{nome_do_diretorio}\e[0m" # green
|
31
32
|
end
|
32
33
|
|
33
34
|
def nome_do_diretorio
|
@@ -63,30 +64,123 @@ module Teodoro
|
|
63
64
|
@destino_dos_arquivos_data ||= File.join(destino, 'data')
|
64
65
|
end
|
65
66
|
|
67
|
+
def ordenar_arquivos_xml
|
68
|
+
Console.print 'ordenando os arquivos XML...'
|
69
|
+
arquivos_xml.sort_by! { [_1.momento_de_processamento_pelo_e_social, _1.nome] }
|
70
|
+
end
|
71
|
+
|
66
72
|
def processar_arquivos_xml
|
67
73
|
# otimizacao do gerenciamento de memoria
|
68
74
|
arquivos_xml.shift.processar while arquivos_xml.any?
|
69
75
|
end
|
70
76
|
|
71
77
|
def arquivos_xml
|
72
|
-
@arquivos_xml ||=
|
73
|
-
|
74
|
-
|
75
|
-
ArquivoXML.new(
|
76
|
-
caminho: caminho,
|
77
|
-
destino_dos_arquivos_data: destino_dos_arquivos_data,
|
78
|
-
de_recibo_para_nome_do_arquivo_data: de_recibo_para_nome_do_arquivo_data
|
79
|
-
)
|
80
|
-
end
|
81
|
-
.sort_by { [_1.momento_de_processamento_pelo_e_social, _1.nome] }
|
78
|
+
@arquivos_xml ||= Dir[File.join(destino_dos_arquivos_xml, '*.xml')]
|
79
|
+
.map { |caminho| ArquivoXML.new(empresa: empresa, caminho: caminho) }
|
80
|
+
.select(&:processavel?)
|
82
81
|
end
|
83
82
|
|
84
|
-
def
|
85
|
-
@
|
83
|
+
def empresa
|
84
|
+
@empresa ||= Obj.new(
|
85
|
+
destino_dos_arquivos_data: destino_dos_arquivos_data,
|
86
|
+
arquivos_data: ArquivosData.new(destino_dos_arquivos_data),
|
87
|
+
contratos_de_emprego: ContratosDeEmprego.new,
|
88
|
+
contratos_de_trabalho_sem_vinculo: ContratosDeTrabalhoSemVinculo.new
|
89
|
+
)
|
86
90
|
end
|
87
91
|
|
88
92
|
def limpar_linha_de_feedback
|
89
|
-
print
|
93
|
+
Console.print
|
94
|
+
end
|
95
|
+
|
96
|
+
class ArquivosData
|
97
|
+
private
|
98
|
+
|
99
|
+
def initialize(destino_dos_arquivos_data)
|
100
|
+
@destino_dos_arquivos_data = destino_dos_arquivos_data
|
101
|
+
end
|
102
|
+
|
103
|
+
attr_reader :destino_dos_arquivos_data
|
104
|
+
|
105
|
+
public
|
106
|
+
|
107
|
+
def registrar(recibo:, nome:)
|
108
|
+
(nomes_por_recibo[recibo] ||= []) << nome
|
109
|
+
end
|
110
|
+
|
111
|
+
def excluir(recibo)
|
112
|
+
(nomes_por_recibo.delete(recibo) || [])
|
113
|
+
.map { |nome| File.join(destino_dos_arquivos_data, "#{nome}.data") }
|
114
|
+
.each { File.delete(_1) }
|
115
|
+
end
|
116
|
+
|
117
|
+
private
|
118
|
+
|
119
|
+
def nomes_por_recibo
|
120
|
+
@nomes_por_recibo ||= {}
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class ContratosDeEmprego
|
125
|
+
def <<(contrato)
|
126
|
+
contratos_por_matricula[contrato.matricula] = contrato
|
127
|
+
end
|
128
|
+
|
129
|
+
def [](matricula)
|
130
|
+
contratos_por_matricula[matricula]
|
131
|
+
end
|
132
|
+
|
133
|
+
def *(cpf_do_trabalhador:, data:)
|
134
|
+
contratos
|
135
|
+
.select { _1.cpf_do_trabalhador == cpf_do_trabalhador }
|
136
|
+
.select { _1.data_de_admissao <= data } # data de rescisao
|
137
|
+
.sort_by(&:data_de_admissao)
|
138
|
+
end
|
139
|
+
|
140
|
+
def remover(recibo)
|
141
|
+
contratos_por_matricula.delete_if { _2.recibo == recibo }
|
142
|
+
end
|
143
|
+
|
144
|
+
private
|
145
|
+
|
146
|
+
def contratos_por_matricula
|
147
|
+
@contratos_por_matricula ||= {}
|
148
|
+
end
|
149
|
+
|
150
|
+
def contratos
|
151
|
+
contratos_por_matricula.values
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
class ContratosDeTrabalhoSemVinculo
|
156
|
+
def <<(contrato)
|
157
|
+
contratos << contrato
|
158
|
+
end
|
159
|
+
|
160
|
+
def [](cpf_do_trabalhador:, categoria_do_trabalhador:, data:)
|
161
|
+
contratos
|
162
|
+
.select { _1.cpf_do_trabalhador == cpf_do_trabalhador }
|
163
|
+
.select { _1.categoria_do_trabalhador == categoria_do_trabalhador}
|
164
|
+
.select { _1.data_de_inicio <= data }
|
165
|
+
.max_by(&:data_de_inicio)
|
166
|
+
end
|
167
|
+
|
168
|
+
def *(cpf_do_trabalhador:, data:)
|
169
|
+
contratos
|
170
|
+
.select { _1.cpf_do_trabalhador == cpf_do_trabalhador }
|
171
|
+
.select { _1.data_de_inicio <= data } # FIXME: Tales data de termino
|
172
|
+
.sort_by(&:data_de_inicio)
|
173
|
+
end
|
174
|
+
|
175
|
+
def remover(recibo)
|
176
|
+
contratos.delete_if { _1.recibo == recibo }
|
177
|
+
end
|
178
|
+
|
179
|
+
private
|
180
|
+
|
181
|
+
def contratos
|
182
|
+
@contratos ||= []
|
183
|
+
end
|
90
184
|
end
|
91
185
|
end
|
92
186
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'leiaute/arquivo_s1000'
|
2
|
+
require_relative 'leiaute/arquivo_s1005'
|
3
|
+
require_relative 'leiaute/arquivo_s1010'
|
4
|
+
require_relative 'leiaute/arquivo_s1020'
|
5
|
+
require_relative 'leiaute/arquivo_s1030'
|
6
|
+
require_relative 'leiaute/arquivo_s1040'
|
7
|
+
require_relative 'leiaute/arquivo_s1050'
|
8
|
+
require_relative 'leiaute/arquivo_s1070'
|
9
|
+
require_relative 'leiaute/arquivo_s2190'
|
10
|
+
require_relative 'leiaute/arquivo_s2200'
|
11
|
+
require_relative 'leiaute/arquivo_s2205'
|
12
|
+
require_relative 'leiaute/arquivo_s2206'
|
13
|
+
require_relative 'leiaute/arquivo_s2230'
|
14
|
+
require_relative 'leiaute/arquivo_s2250'
|
15
|
+
require_relative 'leiaute/arquivo_s2299'
|
16
|
+
require_relative 'leiaute/arquivo_s2300'
|
17
|
+
require_relative 'leiaute/arquivo_s2306'
|
18
|
+
require_relative 'leiaute/arquivo_s2399'
|
19
|
+
require_relative 'leiaute/arquivo_s3000'
|
20
|
+
|
21
|
+
module Teodoro
|
22
|
+
module Leiaute
|
23
|
+
end
|
24
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
3
|
-
# rubocop:disable Metrics/ClassLength
|
4
|
-
class ArquivoS1000
|
2
|
+
module Leiaute
|
3
|
+
class ArquivoS1000 # rubocop:disable Metrics/ClassLength
|
5
4
|
include ArquivoDeEventoDeTabela
|
6
5
|
|
7
6
|
private
|
@@ -64,9 +63,9 @@ module Teodoro
|
|
64
63
|
'idePeriodo'
|
65
64
|
end
|
66
65
|
|
67
|
-
# rubocop:disable
|
68
|
-
def itens_do_conteudo_do_arquivo_data
|
66
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
69
67
|
[
|
68
|
+
# rubocop:disable Layout/LineLength
|
70
69
|
['TipoInscricaoEmpregador', tipo_de_inscricao],
|
71
70
|
['FapBdContrib'],
|
72
71
|
['AlteracaoEmPeriodoExistente'],
|
@@ -84,8 +83,8 @@ module Teodoro
|
|
84
83
|
['ExibeModoCompleto'],
|
85
84
|
['InicioValidade', inicio_da_validade],
|
86
85
|
['FimValidade', fim_da_validade],
|
87
|
-
['NovaValidade_InicioValidade'],
|
88
|
-
['NovaValidade_FimValidade'],
|
86
|
+
['NovaValidade_InicioValidade'],
|
87
|
+
['NovaValidade_FimValidade'],
|
89
88
|
['NomeRazaoSocial', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/nmRazao']],
|
90
89
|
['ClassificacaoTributaria', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/classTrib']],
|
91
90
|
['NaturezaJuridica', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/natJurid']],
|
@@ -150,14 +149,13 @@ module Teodoro
|
|
150
149
|
["ListaSoftHouses_#{seq}_Email", software_house['email']]
|
151
150
|
]
|
152
151
|
end.sum([])
|
152
|
+
# rubocop:enable Layout/LineLength
|
153
153
|
]
|
154
154
|
end
|
155
|
-
# rubocop:enable Layout/LineLength, Metrics/MethodLength, Metrics/AbcSize
|
156
155
|
|
157
156
|
def softwares_house
|
158
157
|
evento.*('evtInfoEmpregador/infoEmpregador/*/infoCadastro/softwareHouse')
|
159
158
|
end
|
160
159
|
end
|
161
|
-
# rubocop:enable Metrics/ClassLength
|
162
160
|
end
|
163
161
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1005
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -25,9 +25,9 @@ module Teodoro
|
|
25
25
|
'ideEstab'
|
26
26
|
end
|
27
27
|
|
28
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
29
|
-
def itens_do_conteudo_do_arquivo_data
|
28
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
30
29
|
[
|
30
|
+
# rubocop:disable Layout/LineLength
|
31
31
|
['RequestVerificationToken'],
|
32
32
|
['SomenteVisualizacao'],
|
33
33
|
['BloquearCodigo'],
|
@@ -75,9 +75,9 @@ module Teodoro
|
|
75
75
|
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
76
76
|
['idEdicaoSH'],
|
77
77
|
['ExibirContribuicaoPatronal']
|
78
|
+
# rubocop:enable Layout/LineLength
|
78
79
|
]
|
79
80
|
end
|
80
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1010
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -18,7 +18,7 @@ module Teodoro
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def identificacao_do_arquivo_data
|
21
|
-
['RUB', "#{identificador_da_tabela_de_rubricas}
|
21
|
+
['RUB', "#{identificador_da_tabela_de_rubricas}#{codigo}"]
|
22
22
|
end
|
23
23
|
|
24
24
|
def identificador_da_tabela_de_rubricas
|
@@ -29,8 +29,7 @@ module Teodoro
|
|
29
29
|
@codigo ||= evento['evtTabRubrica/infoRubrica/*/ideRubrica/codRubr']
|
30
30
|
end
|
31
31
|
|
32
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
33
|
-
def itens_do_conteudo_do_arquivo_data
|
32
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
34
33
|
[
|
35
34
|
['RequestVerificationToken'],
|
36
35
|
['SomenteVisualizacao'],
|
@@ -59,7 +58,6 @@ module Teodoro
|
|
59
58
|
['hd_ProcessoSindicato']
|
60
59
|
]
|
61
60
|
end
|
62
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
63
61
|
end
|
64
62
|
end
|
65
63
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1020
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -25,9 +25,9 @@ module Teodoro
|
|
25
25
|
@codigo_da_lotacao_tributaria ||= evento['evtTabLotacao/infoLotacao/*/ideLotacao/codLotacao']
|
26
26
|
end
|
27
27
|
|
28
|
-
# rubocop:disable Metrics/MethodLength,
|
29
|
-
def itens_do_conteudo_do_arquivo_data
|
28
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
30
29
|
[
|
30
|
+
# rubocop:disable Layout/LineLength
|
31
31
|
['RequestVerificationToken'],
|
32
32
|
['SomenteVisualizacao'],
|
33
33
|
['BloquearCodigo'],
|
@@ -60,9 +60,9 @@ module Teodoro
|
|
60
60
|
['VerProc', versao_do_aplicativo_de_processamento_do_evento],
|
61
61
|
['idEdicaoProcesso'],
|
62
62
|
['ExibirContribuicaoPatronal']
|
63
|
+
# rubocop:enable Layout/LineLength
|
63
64
|
]
|
64
65
|
end
|
65
|
-
# rubocop:enable Metrics/MethodLength, Layout/LineLength, Metrics/AbcSize
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1030
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -25,9 +25,9 @@ module Teodoro
|
|
25
25
|
@codigo_do_cargo ||= evento['evtTabCargo/infoCargo/*/ideCargo/codCargo']
|
26
26
|
end
|
27
27
|
|
28
|
-
# rubocop:disable Metrics/MethodLength,
|
29
|
-
def itens_do_conteudo_do_arquivo_data
|
28
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
30
29
|
[
|
30
|
+
# rubocop:disable Layout/LineLength
|
31
31
|
['RequestVerificationToken'],
|
32
32
|
['SomenteVisualizacao'],
|
33
33
|
['BloquearCodigo'],
|
@@ -51,9 +51,9 @@ module Teodoro
|
|
51
51
|
['NrReciboEventoOriginal'],
|
52
52
|
['DescricaoProcEmi'],
|
53
53
|
['VerProc', versao_do_aplicativo_de_processamento_do_evento]
|
54
|
+
# rubocop:enable Layout/LineLength
|
54
55
|
]
|
55
56
|
end
|
56
|
-
# rubocop:enable Metrics/MethodLength, Layout/LineLength, Metrics/AbcSize
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1040
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -23,8 +23,7 @@ module Teodoro
|
|
23
23
|
@codigo_da_funcao ||= evento['evtTabFuncao/infoFuncao/*/ideFuncao/codFuncao']
|
24
24
|
end
|
25
25
|
|
26
|
-
# rubocop:disable Metrics/MethodLength
|
27
|
-
def itens_do_conteudo_do_arquivo_data
|
26
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength
|
28
27
|
[
|
29
28
|
['RequestVerificationToken'],
|
30
29
|
['SomenteVisualizacao'],
|
@@ -43,7 +42,6 @@ module Teodoro
|
|
43
42
|
['VerProc', versao_do_aplicativo_de_processamento_do_evento]
|
44
43
|
]
|
45
44
|
end
|
46
|
-
# rubocop:enable Metrics/MethodLength
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1050
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -25,9 +25,9 @@ module Teodoro
|
|
25
25
|
@codigo_do_horario ||= evento['evtTabHorTur/infoHorContratual/*/ideHorContratual/codHorContrat']
|
26
26
|
end
|
27
27
|
|
28
|
-
# rubocop:disable Metrics/MethodLength,
|
29
|
-
def itens_do_conteudo_do_arquivo_data
|
28
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
30
29
|
[
|
30
|
+
# rubocop:disable Layout/LineLength
|
31
31
|
['RequestVerificationToken'],
|
32
32
|
['SomenteVisualizacao'],
|
33
33
|
['BloquearCodigo'],
|
@@ -60,9 +60,9 @@ module Teodoro
|
|
60
60
|
["DadosHorario_ListaHorarioIntervalo_#{seq}_DuracaoIntervalo", intervalo['durInterv']]
|
61
61
|
]
|
62
62
|
end.sum([])
|
63
|
+
# rubocop:enable Layout/LineLength
|
63
64
|
]
|
64
65
|
end
|
65
|
-
# rubocop:enable Metrics/MethodLength, Layout/LineLength, Metrics/AbcSize
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS1070
|
4
4
|
include ArquivoDeEventoDeTabela
|
5
5
|
|
@@ -25,8 +25,7 @@ module Teodoro
|
|
25
25
|
@numero_do_processo ||= evento['evtTabProcesso/infoProcesso/*/ideProcesso/nrProc']
|
26
26
|
end
|
27
27
|
|
28
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
29
|
-
def itens_do_conteudo_do_arquivo_data
|
28
|
+
def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
30
29
|
[
|
31
30
|
['RequestVerificationToken'],
|
32
31
|
['SomenteVisualizacao'],
|
@@ -69,7 +68,6 @@ module Teodoro
|
|
69
68
|
end.sum([])
|
70
69
|
]
|
71
70
|
end
|
72
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
73
71
|
end
|
74
72
|
end
|
75
73
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Teodoro
|
2
|
-
module
|
2
|
+
module Leiaute
|
3
3
|
class ArquivoS2190
|
4
4
|
include ArquivoDeEventoNaoPeriodico
|
5
5
|
|
@@ -8,7 +8,7 @@ module Teodoro
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def nome_do_arquivo_data
|
11
|
-
"PRE[#{cpf_do_trabalhador}]"
|
11
|
+
@nome_do_arquivo_data ||= "PRE[#{cpf_do_trabalhador}]"
|
12
12
|
end
|
13
13
|
|
14
14
|
def cpf_do_trabalhador
|