teodoro 0.68.0 → 0.69.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90abefec5754574ab4c39762b2e8b280a214c179de2eea6a6aaa4a8d5bf087f2
|
4
|
+
data.tar.gz: 9173afd727af5cedd0d557ec3e5b75e1a2e462958608173bd63d9b9feef16b99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 577c0467184f14d9fe1c663a1d1ceaf90365331a09b0e1865a32a36dd7ef8fac3e1db44d3578ce7875c8ff409aeed1c29be6480d75838a4b93b1b0b752f9aefb
|
7
|
+
data.tar.gz: 51417a0fb0b1ab61c20cb08f573651a355d4ab72c29505b02b9305fd0a547c4e521878fb3eb1f85422ac6798c452358765c4dbfc66a0b2024d6edc69bfeda876
|
data/lib/teodoro/arquivo_xml.rb
CHANGED
@@ -20,6 +20,7 @@ require_relative 'leiaute/arquivo_s2205'
|
|
20
20
|
require_relative 'leiaute/arquivo_s2206'
|
21
21
|
require_relative 'leiaute/arquivo_s2210'
|
22
22
|
require_relative 'leiaute/arquivo_s2220'
|
23
|
+
require_relative 'leiaute/arquivo_s2221'
|
23
24
|
require_relative 'leiaute/arquivo_s2230'
|
24
25
|
require_relative 'leiaute/arquivo_s2240'
|
25
26
|
require_relative 'leiaute/arquivo_s2250'
|
@@ -53,6 +54,7 @@ module Teodoro
|
|
53
54
|
S2206
|
54
55
|
S2210
|
55
56
|
S2220
|
57
|
+
S2221
|
56
58
|
S2230
|
57
59
|
S2240
|
58
60
|
S2250
|
@@ -74,6 +76,7 @@ module Teodoro
|
|
74
76
|
S2206
|
75
77
|
S2210
|
76
78
|
S2220
|
79
|
+
S2221
|
77
80
|
S2230
|
78
81
|
S2240
|
79
82
|
S2250
|
@@ -23,7 +23,8 @@ module Teodoro
|
|
23
23
|
.select do |contrato|
|
24
24
|
contrato.trabalhador.cpf == cpf_do_trabalhador &&
|
25
25
|
contrato.categoria_do_trabalhador == categoria_do_trabalhador &&
|
26
|
-
contrato.ativo?(data)
|
26
|
+
contrato.ativo?(data) &&
|
27
|
+
contrato.matricula_do_trabalhador.nil?
|
27
28
|
end
|
28
29
|
.max_by(&:data_de_inicio)
|
29
30
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Teodoro
|
2
|
+
module Leiaute
|
3
|
+
class ArquivoS2221
|
4
|
+
include ArquivoDeEventoNaoPeriodicoNaoCancelavel
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def dados_dos_arquivos_data
|
9
|
+
[
|
10
|
+
Obj.new(
|
11
|
+
operacao: :inclusao,
|
12
|
+
nome: "TOX[#{cpf_do_trabalhador}][#{matricula}][#{data_do_exame.delete('-')}]",
|
13
|
+
itens_do_conteudo: itens_do_conteudo
|
14
|
+
)
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
def itens_do_conteudo # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
19
|
+
[
|
20
|
+
['Id', id_do_evento],
|
21
|
+
['procEmi', processo_de_emissao_do_evento],
|
22
|
+
['verProc', versao_do_processo_de_emissao_do_evento],
|
23
|
+
['ideEmpregador/tpInsc', tipo_de_inscricao_do_empregador],
|
24
|
+
['ideEmpregador/nrInsc', numero_de_inscricao_do_empregador],
|
25
|
+
['ideVinculo/cpfTrab', cpf_do_trabalhador],
|
26
|
+
['ideVinculo/matricula', matricula],
|
27
|
+
['dtExame', data_do_exame],
|
28
|
+
['cnpjLab', evento['toxicologico/cnpjLab']],
|
29
|
+
['codSeqExame', evento['toxicologico/codSeqExame']],
|
30
|
+
['nmMed', evento['toxicologico/nmMed']],
|
31
|
+
['nrCRM', evento['toxicologico/nrCRM']],
|
32
|
+
['ufCRM', evento['toxicologico/ufCRM']],
|
33
|
+
['nrRecibo', numero_do_recibo]
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
def cpf_do_trabalhador
|
38
|
+
@cpf_do_trabalhador ||= evento['ideVinculo/cpfTrab']
|
39
|
+
end
|
40
|
+
|
41
|
+
def matricula
|
42
|
+
@matricula ||= evento['ideVinculo/matricula']
|
43
|
+
end
|
44
|
+
|
45
|
+
def data_do_exame
|
46
|
+
@data_do_exame ||= evento['toxicologico/dtExame']
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/lib/teodoro/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teodoro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.69.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fortes Tecnologia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/teodoro/leiaute/arquivo_s2206.rb
|
116
116
|
- lib/teodoro/leiaute/arquivo_s2210.rb
|
117
117
|
- lib/teodoro/leiaute/arquivo_s2220.rb
|
118
|
+
- lib/teodoro/leiaute/arquivo_s2221.rb
|
118
119
|
- lib/teodoro/leiaute/arquivo_s2230.rb
|
119
120
|
- lib/teodoro/leiaute/arquivo_s2240.rb
|
120
121
|
- lib/teodoro/leiaute/arquivo_s2250.rb
|