sticutils 0.3.8 → 0.4.2

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: d1c5769d5b66eb3ea6b6e6d9c611f30206297761a592bad78540831db2ea19f3
4
- data.tar.gz: 330c9ccb0109dfa93bba6cb9c86c4a64f72a1c45732b909d9e97e701f8ef9d44
3
+ metadata.gz: ad5fefab023dccbe4f729aab147786ab3e3c64453b0c03c4045de5f19e4191d6
4
+ data.tar.gz: 2960b77f91eeaaec95eb3b1cdc1059733578e5980af163dada979aae11d84656
5
5
  SHA512:
6
- metadata.gz: bac3486aff85bac718b6327af3047106b54587656d76517ee2159592c64d2eb486b1ed59bec4e8f2100a22ee49eeb55d04c04ef75390e772cee7551df2ab7670
7
- data.tar.gz: f2a1058cff6d7c6318864b4f2b165f524801c91934cfc34f2b383a28aeb0ee188beb10972cf8534d26c9f6fc094558f0380631adc77a177d28c845590ba8d5f1
6
+ metadata.gz: c65e244da066773f3d03dfbbd37b5712417c3fc82c785b01db8fa39313329f2a052026043c7325b4ecb2bb2454adcde62502823ad15a9502efed9ac5b62c1268
7
+ data.tar.gz: 9a0a29ad606207c1a0fd81cc6ea7c349112bc0aa9960cf1d91dd0d7a4308acbfd2af17e977e64a3b5f6344efa847d862b172a60fb17a4e85f0b44cda1edfb96a
@@ -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
@@ -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 :global_cidade, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
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
- has_many :tjpi_previnculados, :class_name => 'TjpiPrevinculado'
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,8 +9,12 @@ 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
17
+ has_many :tjpi_vinculos, :class_name => 'TjpiVinculo', foreign_key: :cadastro_id
14
18
 
15
19
  has_many :tjpi_previnculado_declaracoes, class_name: 'TjpiPrevinculadoDeclaracao', foreign_key: :preVinculado_id
16
20
  belongs_to :tjpi_previnculadointervencao_ultima, class_name: 'TjpiPrevinculadointervencao', foreign_key: :intervencao_id
@@ -13,29 +13,31 @@ class Intranet::TjpiVinculo < Intranet::IntranetRecord
13
13
  has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
14
14
  belongs_to :tjpi_cargo, :class_name => 'TjpiCargo', :foreign_key => :cargo_id
15
15
  belongs_to :tjpi_terceirizacao_contrato, :class_name => 'TjpiTerceirizacaoContrato', :foreign_key => :contratoTerceirizacao_id
16
- belongs_to :tjpi_areaestagio, :class_name => 'TjpiAreaestagio', :foreign_key => :areaEstagio_id
17
16
  belongs_to :tjpi_categoriavinculoconfig, :class_name => 'TjpiCategoriavinculoconfig', :foreign_key => :categoria
18
17
  belongs_to :global_estado, :class_name => 'GlobalEstado', :foreign_key => :seccionalOAB_sigla
19
18
  belongs_to :tjpi_terceirizacao_postodetrabalho, :class_name => 'TjpiTerceirizacaoPostodetrabalho', :foreign_key => :postoDeTrabalho_id
20
19
  belongs_to :tjpi_contratocargotemporario, :class_name => 'TjpiContratocargotemporario', :foreign_key => :contrato_id
21
- belongs_to :global_orgao_instituicao, :class_name => 'GlobalOrgao', :foreign_key => :instituicaoDeEnsino_id
22
20
  belongs_to :tjpi_nivelreferencium, :class_name => 'TjpiNivelreferencium', :foreign_key => :nivelReferenciaAtual_id
23
21
  belongs_to :tjpi_vinculo, :class_name => 'TjpiVinculo', :foreign_key => :vinculoOrigem_id
24
22
  belongs_to :tjpi_vinculado, :class_name => 'TjpiVinculado', :foreign_key => :vinculado_id
25
23
  has_one :tjpi_vinculado_principal, :class_name => 'TjpiVinculado', :foreign_key => :vinculoPrincipal_id
26
24
  belongs_to :global_orgao_atual, :class_name => 'GlobalOrgao', :foreign_key => :lotacaoAtual_id
27
25
  belongs_to :global_orgao_origem, :class_name => 'GlobalOrgao', :foreign_key => :orgaoOrigem_id
28
- belongs_to :global_cidade, :class_name => 'GlobalCidade', :foreign_key => :vagaOrigem_id
29
26
  has_many :tjpi_vinculo_documentos, :class_name => 'TjpiVinculoDocumento', :foreign_key => :vinculo_id
30
27
  belongs_to :global_unidadeorganizacional, :class_name => 'GlobalUnidadeorganizacional', :foreign_key => :lotacaoAtual_id
31
28
  belongs_to :orgao_origem_cargo, :class_name => 'GlobalOrgao', :foreign_key => :origemCargo_id
32
29
  belongs_to :instituidor, class_name: 'GlobalPrepessoafisica', foreign_key: :instituidor_id
33
30
  belongs_to :procurador, class_name: 'GlobalPrepessoafisica', foreign_key: :procurador_id
34
31
  belongs_to :conta_bancaria, class_name: 'GlobalContabancaria', foreign_key: :contaBancaria_id
35
-
32
+
36
33
  has_many :tjpi_previnculados, class_name: 'TjpiPrevinculado', foreign_key: :vinculoPrincipal_id
37
34
  belongs_to :tjpi_previnculado, class_name: 'TjpiPrevinculado', foreign_key: :cadastro_id
38
35
 
39
36
  has_many :tjpi_contrachequeagrupados, class_name: "TjpiContrachequeagrupado", foreign_key: :matricula, primary_key: :matricula
40
37
  has_many :tjpi_contrachequelegados, class_name: "TjpiContrachequelegado", foreign_key: :matricula, primary_key: :matricula
38
+
39
+ # estagio
40
+ belongs_to :area_estagio, :class_name => 'TjpiAreaestagio', :foreign_key => :areaEstagio_id
41
+ belongs_to :instituicao_ensino, :class_name => 'GlobalOrgao', :foreign_key => :instituicaoDeEnsino_id
42
+ belongs_to :vaga_origem, :class_name => 'GlobalCidade', :foreign_key => :vagaOrigem_id
41
43
  end
@@ -1,3 +1,4 @@
1
1
  module Sticutils
2
- VERSION = "0.3.8"
2
+ VERSION = "0.4.2"
3
+ # VERSION = "1.4.1"
3
4
  end
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.3.8
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2022-01-31 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.0.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