imasei 0.2.3 → 0.2.4
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/imasei/estruturas/retorno_consultar_procedimento.rb +34 -1
- data/lib/imasei/estruturas/retorno_list_unidades.rb +1 -1
- data/lib/imasei/estruturas/retorno_list_usuarios.rb +2 -2
- data/lib/imasei/estruturas/retorno_tipo_procedimento.rb +20 -0
- data/lib/imasei/estruturas/retorno_unidades_procedimento_aberto.rb +42 -0
- data/lib/imasei/servico.rb +8 -2
- data/lib/imasei/version.rb +1 -1
- data/lib/imasei.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3a7d8cf9c8979c67d7a2d6e17e1009b92c173fa
|
4
|
+
data.tar.gz: 592a5b799db571ddaed0a01b7f0eef3408ec100e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42b448677db3b74d9bdfd3089bc47d5dd65d15b607bd76250fe74e9b8e0f0e7d673e6f354fc44ad6067fb9d6c5830d4b881038319281e7bdc9f524108114bb07
|
7
|
+
data.tar.gz: 9c98547415a9899a3d92523e7e8e1fef6fb17f6303762300e4c10e88740e7a409fed0dcc4bac68c84250a419fe98900d44f51795467105ef55c5331fcb4e0341
|
@@ -10,18 +10,51 @@ module Imasei
|
|
10
10
|
has_value :data_autuacao
|
11
11
|
has_value :link_acesso
|
12
12
|
has_value :tipo_procedimento
|
13
|
+
has_collection :retorno_unidades_procedimento_aberto, klass: RetornoUnidadesProcedimentoAberto
|
14
|
+
has_collection :retorno_tipo_procedimento, klass: RetornoTipoProcedimento
|
13
15
|
|
14
16
|
|
15
17
|
def initialize(params)
|
18
|
+
#teste(params)
|
16
19
|
self.id_procedimento = params[:id_procedimento]
|
17
20
|
self.procedimento_formatado = params[:procedimento_formatado]
|
18
21
|
self.especificacao = params[:especificacao]
|
19
22
|
self.data_autuacao = params[:data_autuacao]
|
20
23
|
self.link_acesso = params[:link_acesso]
|
21
|
-
|
24
|
+
if params[:unidades_procedimento_aberto] && params[:unidades_procedimento_aberto][:item]
|
25
|
+
item = params[:unidades_procedimento_aberto][:item]
|
26
|
+
if item.is_a?(Hash)
|
27
|
+
self.retorno_unidades_procedimento_aberto << Imasei::Estruturas::RetornoUnidadesProcedimentoAberto.new(item)
|
28
|
+
elsif item.is_a?(Array)
|
29
|
+
item.each do |retorno_unidades_procedimento_aberto|
|
30
|
+
self.retorno_unidades_procedimento_aberto << Imasei::Estruturas::RetornoUnidadesProcedimentoAberto.new(retorno_unidades_procedimento_aberto)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
#Tipo Procedimento
|
36
|
+
if params[:tipo_procedimento]
|
37
|
+
item = params[:tipo_procedimento]
|
38
|
+
if item.is_a?(Hash)
|
39
|
+
self.retorno_unidades_procedimento_aberto << Imasei::Estruturas::RetornoTipoProcedimento.new(item)
|
40
|
+
elsif item.is_a?(Array)
|
41
|
+
item.each do |retorno_tipo_procedimento|
|
42
|
+
self.retorno_unidades_procedimento_aberto << Imasei::Estruturas::RetornoTipoProcedimento.new(retorno_tipo_procedimento)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
22
48
|
initialize_attributes
|
49
|
+
|
23
50
|
end
|
24
51
|
|
52
|
+
|
53
|
+
def teste(p)
|
54
|
+
#debugger
|
55
|
+
end
|
56
|
+
|
57
|
+
|
25
58
|
end
|
26
59
|
|
27
60
|
end
|
@@ -12,8 +12,8 @@ module Imasei
|
|
12
12
|
if item.is_a?(Hash)
|
13
13
|
self.retorno_list_usuarios << Imasei::Estruturas::RetornoUsuario.new(item)
|
14
14
|
elsif item.is_a?(Array)
|
15
|
-
item.each do |
|
16
|
-
self.retorno_list_usuarios << Imasei::Estruturas::RetornoUsuario.new(
|
15
|
+
item.each do |retorno_lista_usuarios|
|
16
|
+
self.retorno_list_usuarios << Imasei::Estruturas::RetornoUsuario.new(retorno_lista_usuarios)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
initialize_attributes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Imasei
|
2
|
+
|
3
|
+
module Estruturas
|
4
|
+
|
5
|
+
class RetornoTipoProcedimento < ::Valuable
|
6
|
+
|
7
|
+
has_value :id_tipo_procedimento
|
8
|
+
has_value :nome
|
9
|
+
|
10
|
+
def initialize(params)
|
11
|
+
self.id_tipo_procedimento = params[:id_tipo_procedimento]
|
12
|
+
self.nome = params[:nome]
|
13
|
+
|
14
|
+
initialize_attributes
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Imasei
|
2
|
+
|
3
|
+
module Estruturas
|
4
|
+
|
5
|
+
class RetornoUnidadesProcedimentoAberto < ::Valuable
|
6
|
+
|
7
|
+
has_collection :retorno_list_unidades, klass: RetornoUnidade
|
8
|
+
has_collection :retorno_list_usuarios, klass: RetornoUsuario
|
9
|
+
|
10
|
+
def initialize(params)
|
11
|
+
teste(params)
|
12
|
+
self.retorno_list_unidades = []
|
13
|
+
item = params[:unidade]
|
14
|
+
if item.is_a?(Hash)
|
15
|
+
self.retorno_list_unidades << Imasei::Estruturas::RetornoUnidade.new(item)
|
16
|
+
elsif item.is_a?(Array)
|
17
|
+
item.each do |retorno_lista_unidades|
|
18
|
+
self.retorno_list_unidades << Imasei::Estruturas::RetornoUnidade.new(retorno_lista_unidades)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
self.retorno_list_usuarios = []
|
24
|
+
item = params[:usuario_atribuicao]
|
25
|
+
if item.is_a?(Hash)
|
26
|
+
self.retorno_list_usuarios << Imasei::Estruturas::RetornoUsuario.new(item)
|
27
|
+
elsif item.is_a?(Array)
|
28
|
+
item.each do |retorno_lista_usuarios|
|
29
|
+
self.retorno_list_usuarios << Imasei::Estruturas::RetornoUsuario.new(retorno_lista_usuarios)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
initialize_attributes
|
34
|
+
end
|
35
|
+
def teste(usuario)
|
36
|
+
#debugger
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/lib/imasei/servico.rb
CHANGED
@@ -191,7 +191,7 @@ module Imasei
|
|
191
191
|
Imasei::Estruturas::RetornoListUsuarios.new body
|
192
192
|
end
|
193
193
|
|
194
|
-
def self.consultar_procedimento(id_unidade,protocolo_procedimento,sin_retornar_assuntos
|
194
|
+
def self.consultar_procedimento(id_unidade,protocolo_procedimento,sin_retornar_assuntos,sin_retornar_interessados,sin_retornar_observacoes,sin_retornar_andamento_geracao,sin_retornar_andamento_conclusao,sin_retornar_ultimo_andamento,sin_retornar_unidades_procedimento_aberto,sin_retornar_procedimentos_relacionados,sin_retornar_procedimentos_anexados)
|
195
195
|
message = {
|
196
196
|
SiglaSistema: Imasei.configuration.sigla,
|
197
197
|
IdentificacaoServico: Imasei.configuration.identificacao,
|
@@ -201,10 +201,16 @@ module Imasei
|
|
201
201
|
SinRetornarInteressados: sin_retornar_interessados,
|
202
202
|
SinRetornarObservacoes: sin_retornar_observacoes,
|
203
203
|
SinRetornarAndamentoGeracao: sin_retornar_andamento_geracao,
|
204
|
-
SinRetornarAndamentoConclusao: sin_retornar_andamento_conclusao
|
204
|
+
SinRetornarAndamentoConclusao: sin_retornar_andamento_conclusao,
|
205
|
+
SinRetornarUltimoAndamento: sin_retornar_ultimo_andamento,
|
206
|
+
SinRetornarUnidadesProcedimentoAberto: sin_retornar_unidades_procedimento_aberto,
|
207
|
+
SinRetornarProcedimentosRelacionados: sin_retornar_procedimentos_relacionados,
|
208
|
+
SinRetornarProcedimentosAnexados: sin_retornar_procedimentos_anexados
|
209
|
+
|
205
210
|
}
|
206
211
|
response = Imasei::Connection.instance.call :consultar_procedimento, message: message
|
207
212
|
body = response.body[:consultar_procedimento_response][:parametros]
|
213
|
+
|
208
214
|
Imasei::Estruturas::RetornoConsultarProcedimento.new body
|
209
215
|
end
|
210
216
|
|
data/lib/imasei/version.rb
CHANGED
data/lib/imasei.rb
CHANGED
@@ -22,6 +22,8 @@ require 'imasei/estruturas/retorno_conclusao_processo'
|
|
22
22
|
require 'imasei/estruturas/retorno_boolean'
|
23
23
|
require 'imasei/estruturas/retorno_usuario'
|
24
24
|
require 'imasei/estruturas/retorno_list_usuarios'
|
25
|
+
require 'imasei/estruturas/retorno_unidades_procedimento_aberto'
|
26
|
+
require 'imasei/estruturas/retorno_tipo_procedimento'
|
25
27
|
require 'imasei/estruturas/retorno_consultar_procedimento'
|
26
28
|
|
27
29
|
module Imasei
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imasei
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Soares feat Leandro Telles
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,7 +129,9 @@ files:
|
|
129
129
|
- lib/imasei/estruturas/retorno_list_unidades.rb
|
130
130
|
- lib/imasei/estruturas/retorno_list_usuarios.rb
|
131
131
|
- lib/imasei/estruturas/retorno_observacoes.rb
|
132
|
+
- lib/imasei/estruturas/retorno_tipo_procedimento.rb
|
132
133
|
- lib/imasei/estruturas/retorno_unidade.rb
|
134
|
+
- lib/imasei/estruturas/retorno_unidades_procedimento_aberto.rb
|
133
135
|
- lib/imasei/estruturas/retorno_usuario.rb
|
134
136
|
- lib/imasei/printer.rb
|
135
137
|
- lib/imasei/servico.rb
|