sticutils 0.3.7 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/gestorh/folha_agrupada.rb +3 -3
- data/app/models/gestorh/funcionario.rb +1 -0
- data/app/models/gestorh/vinculo.rb +2 -0
- data/app/models/intranet/global_orgao.rb +2 -0
- data/app/models/intranet/global_prepessoafisica.rb +9 -4
- data/app/models/intranet/tjpi_previnculado.rb +9 -2
- data/lib/sticutils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c30f23a34f71a55823bc0190e50c2084bc0da113cbf74d11355e0994524b124
|
4
|
+
data.tar.gz: 264d43e4e3592c0c18aa50eb2e26dbf46f9ec0fb89369082bd80d3ba670552ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 628549bab03ca620c384ceddd9f640d225500da719acae8de046ef6c20d6214570c4302fc25e9c6290102a9ea4999b5cd100976ca527d4f4eecc14d92f9a6fe2
|
7
|
+
data.tar.gz: 6b77428d6ab2244fe5a4729e42dbc9a21bd18421ccf73595bee68f934de64c3d184f150bb3bbdf29f4158085b98ff4ae21e57597790d7f8cda93450816dea29c
|
@@ -75,14 +75,14 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
|
|
75
75
|
# diarias
|
76
76
|
def diarias
|
77
77
|
if Object.const_defined?('DailyRate')
|
78
|
-
DailyRate.where(cpf: numeric_cpf, date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
78
|
+
DailyRate.where(cpf: [cpf, numeric_cpf], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
79
79
|
.sum(:pago)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
83
|
def diarias_positivas
|
84
84
|
if Object.const_defined?('DailyRate')
|
85
|
-
DailyRate.where(cpf: numeric_cpf,
|
85
|
+
DailyRate.where(cpf: [cpf, numeric_cpf],
|
86
86
|
pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
87
87
|
.sum(:pago)
|
88
88
|
end
|
@@ -90,7 +90,7 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
|
|
90
90
|
|
91
91
|
def diarias_negativas
|
92
92
|
if Object.const_defined?('DailyRate')
|
93
|
-
DailyRate.where(cpf: numeric_cpf,
|
93
|
+
DailyRate.where(cpf: [cpf, numeric_cpf],
|
94
94
|
pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
95
95
|
.sum(:pago)
|
96
96
|
end
|
@@ -4,4 +4,5 @@ class Gestorh::Funcionario < Gestorh::GestorhRecord
|
|
4
4
|
has_many :movimento_acumulados, foreign_key: :mv_matricula, primary_key: :fn_matricula
|
5
5
|
has_many :folhas, through: :movimento_acumulados
|
6
6
|
has_many :ferias, foreign_key: :fe_matricula, primary_key: :fn_matricula, class_name: 'Gestorh::Ferias'
|
7
|
+
belongs_to :vinculo, foreign_key: :fn_vinculo
|
7
8
|
end
|
@@ -35,4 +35,6 @@ class Intranet::GlobalOrgao < Intranet::IntranetRecord
|
|
35
35
|
has_many :tjpi_vinculos_ensino, :class_name => 'TjpiVinculo', foreign_key: :instituicaoDeEnsino_id
|
36
36
|
has_many :tjpi_vinculos_atuais, :class_name => 'TjpiVinculo', foreign_key: :lotacaoAtual_id
|
37
37
|
has_many :tjpi_vinculos_origem, :class_name => 'TjpiVinculo', foreign_key: :orgaoOrigem_id
|
38
|
+
|
39
|
+
has_many :global_contatos, through: :global_orgao_contatos
|
38
40
|
end
|
@@ -3,10 +3,15 @@ class Intranet::GlobalPrepessoafisica < Intranet::IntranetRecord
|
|
3
3
|
|
4
4
|
belongs_to :cidade_nascimento, :class_name => 'GlobalCidade', :foreign_key => :nascimentoCidade_id
|
5
5
|
belongs_to :global_endereco, :class_name => 'GlobalEndereco', :foreign_key => :endereco_id
|
6
|
-
belongs_to :
|
6
|
+
belongs_to :cidade_titulo, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
|
7
7
|
belongs_to :global_estado, :class_name => 'GlobalEstado', :foreign_key => :rgOrgaoExpedidorUF_sigla
|
8
|
-
has_many :global_prepessoafisica_contasbancarias, :class_name => 'GlobalPrepessoafisicaContasbancaria'
|
9
|
-
has_many :global_prepessoafisica_contatos, :class_name => 'GlobalPrepessoafisicaContato'
|
10
8
|
has_many :tjpi_predependentes, :class_name => 'TjpiPredependente', foreign_key: :prePessoaFisica_id
|
11
|
-
|
9
|
+
|
10
|
+
has_many :global_prepessoafisica_contasbancarias, class_name: 'GlobalPrepessoafisicaContasbancaria'
|
11
|
+
has_many :global_prepessoafisica_contatos, class_name: 'GlobalPrepessoafisicaContato', foreign_key: :pessoaFisica_id
|
12
|
+
has_many :global_contatos, through: :global_prepessoafisica_contatos
|
13
|
+
|
14
|
+
has_one :tjpi_previnculados, :class_name => 'TjpiPrevinculado', foreign_key: :prePessoaFisica_id
|
15
|
+
has_one :tjpi_vinculado, :class_name => 'TjpiPrevinculado', foreign_key: :prePessoaFisica_id
|
16
|
+
has_many :tjpi_vinculos, through: :tjpi_vinculado, source: :tjpi_vinculo_principal
|
12
17
|
end
|
@@ -9,11 +9,18 @@ class Intranet::TjpiPrevinculado < Intranet::IntranetRecord
|
|
9
9
|
has_many :tjpi_previnculado_manifestacoes, :class_name => 'TjpiPrevinculadoManifestaco'
|
10
10
|
has_many :tjpi_previnculadopendencia, :class_name => 'TjpiPrevinculadopendencium'
|
11
11
|
has_many :tjpi_previnculadopendencia, :class_name => 'TjpiPrevinculadopendencium'
|
12
|
-
has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
|
13
|
-
has_many :tjpi_vinculos, :class_name => 'TjpiVinculo'
|
12
|
+
# has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
|
13
|
+
# has_many :tjpi_vinculos, :class_name => 'TjpiVinculo'
|
14
|
+
|
15
|
+
belongs_to :tjpi_vinculo_principal, :class_name => 'TjpiVinculo', foreign_key: :vinculoPrincipal_id
|
16
|
+
belongs_to :tjpi_vinculo, :class_name => 'TjpiVinculo', foreign_key: :vinculoPrincipal_id
|
14
17
|
|
15
18
|
has_many :tjpi_previnculado_declaracoes, class_name: 'TjpiPrevinculadoDeclaracao', foreign_key: :preVinculado_id
|
16
19
|
belongs_to :tjpi_previnculadointervencao_ultima, class_name: 'TjpiPrevinculadointervencao', foreign_key: :intervencao_id
|
17
20
|
belongs_to :tjpi_previnculadointervencao_anterior, class_name: 'TjpiPrevinculadointervencao', foreign_key: :anterior_id
|
18
21
|
has_many :tjpi_previnculadointervencoes, class_name: 'TjpiPrevinculadointervencao', foreign_key: :preVinculado_id
|
22
|
+
|
23
|
+
def tjpi_vinculos
|
24
|
+
[self.tjpi_vinculo_principal]
|
25
|
+
end
|
19
26
|
end
|
data/lib/sticutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sticutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
266
|
- !ruby/object:Gem::Version
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
269
|
+
rubygems_version: 3.1.6
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: Utilidades para aplicações rails da STIC
|