zei 0.1.6 → 0.1.8
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/README.md +2 -2
- data/lib/sei/estruturas/enviar_processo.rb +17 -0
- data/lib/sei/estruturas/retorno_consultar_bloco.rb +32 -0
- data/lib/sei/servico.rb +32 -0
- data/lib/sei/version.rb +1 -1
- data/lib/zei.rb +2 -0
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65ce644f8a09283dff6e6ee13705b638b8ef3a5a776e9f71b414cd6bbd452901
|
4
|
+
data.tar.gz: fdddccf2db6c262684bef4b3666f1583fd302f056f62a6779099348c235d4b8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb2a93ac568e40d4da039d475d47a9efeea269120346113da67c10c8ec8e04329d783f498a529af46914c9acfb58fc1d1f78d636e2171c4772e79cc0b2c4b795
|
7
|
+
data.tar.gz: 5a5fdcb59e193b6466655d1ac4a2ac6d59a3882f34656dbf955983d9cb306ab4bff5dc98c36fa55f784929798792d678c5b58c0feaa287f1df8664d384ebda15
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Esta gem facilita o acesso ao webservice do SEI!. Ela possui a implementação d
|
|
27
27
|
Adicione esta linha no Gemfile da sua aplicação:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem '
|
30
|
+
gem 'zei'
|
31
31
|
```
|
32
32
|
|
33
33
|
E execute:
|
@@ -36,7 +36,7 @@ E execute:
|
|
36
36
|
|
37
37
|
Ou instale através do seguinte comando:
|
38
38
|
|
39
|
-
$ gem install
|
39
|
+
$ gem install zei
|
40
40
|
|
41
41
|
## Uso
|
42
42
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Sei
|
2
|
+
|
3
|
+
module Estruturas
|
4
|
+
|
5
|
+
class RetornoConsultarBloco < ::Valuable
|
6
|
+
|
7
|
+
has_value :id_bloco
|
8
|
+
has_value :unidade
|
9
|
+
has_value :usuario
|
10
|
+
has_value :descricao
|
11
|
+
has_value :tipo
|
12
|
+
has_value :estado
|
13
|
+
has_value :unidades_disponibilizacao
|
14
|
+
has_value :protocolos
|
15
|
+
|
16
|
+
def initialize(params)
|
17
|
+
self.id_bloco = params[:id_bloco]
|
18
|
+
self.unidade = params[:unidade]
|
19
|
+
self.usuario = params[:usuario]
|
20
|
+
self.descricao = params[:descricao]
|
21
|
+
self.tipo = params[:tipo]
|
22
|
+
self.estado = params[:estado]
|
23
|
+
self.unidades_disponibilizacao = params[:unidades_disponibilizacao]
|
24
|
+
self.protocolos = params[:protocolos]
|
25
|
+
initialize_attributes
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/lib/sei/servico.rb
CHANGED
@@ -242,6 +242,38 @@ module Sei
|
|
242
242
|
Sei::Estruturas::RetornoConsultarDocumento.new body
|
243
243
|
end
|
244
244
|
|
245
|
+
def self.consultar_bloco(id_unidade, id_bloco, sin_retornar_protocolos = 'S')
|
246
|
+
message = {
|
247
|
+
SiglaSistema: Sei.configuration.sigla,
|
248
|
+
IdentificacaoServico: Sei.configuration.identificacao,
|
249
|
+
IdUnidade: id_unidade,
|
250
|
+
IdBloco: id_bloco,
|
251
|
+
SinRetornarProtocolos: sin_retornar_protocolos
|
252
|
+
}
|
253
|
+
response = Sei::Connection.instance.call :consultar_bloco, message: message
|
254
|
+
body = response.body[:consultar_bloco_response][:parametros]
|
255
|
+
Sei::Estruturas::RetornoConsultarBloco.new body
|
256
|
+
end
|
257
|
+
|
258
|
+
def self.enviar_processo(id_unidade, procedimento_formatado, unidades_destino = [], data_retorno_programado = nil, dias_retorno_programado = nil, sin_dias_uteis_retorno_programado = 'N')
|
259
|
+
message = {
|
260
|
+
SiglaSistema: Sei.configuration.sigla,
|
261
|
+
IdentificacaoServico: Sei.configuration.identificacao,
|
262
|
+
IdUnidade: id_unidade,
|
263
|
+
ProtocoloProcedimento: procedimento_formatado,
|
264
|
+
UnidadesDestino: unidades_destino,
|
265
|
+
SinManterAbertoUnidade: 'N',
|
266
|
+
SinRemoverAnotacao: 'N',
|
267
|
+
SinEnviarEmailNotificacao: 'N',
|
268
|
+
DataRetornoProgramado: data_retorno_programado,
|
269
|
+
DiasRetornoProgramado: dias_retorno_programado,
|
270
|
+
SinDiasUteisRetornoProgramado: sin_dias_uteis_retorno_programado
|
271
|
+
}
|
272
|
+
response = Sei::Connection.instance.call :enviar_processo, message: message
|
273
|
+
body = response.body[:enviar_processo_response][:parametros]
|
274
|
+
Sei::Estruturas::EnviarProcesso.new body
|
275
|
+
end
|
276
|
+
|
245
277
|
end
|
246
278
|
|
247
279
|
end
|
data/lib/sei/version.rb
CHANGED
data/lib/zei.rb
CHANGED
@@ -24,6 +24,8 @@ require 'sei/estruturas/retorno_usuario'
|
|
24
24
|
require 'sei/estruturas/retorno_list_usuarios'
|
25
25
|
require 'sei/estruturas/retorno_consultar_procedimento'
|
26
26
|
require 'sei/estruturas/retorno_consultar_documento'
|
27
|
+
require 'sei/estruturas/retorno_consultar_bloco'
|
28
|
+
require 'sei/estruturas/enviar_processo'
|
27
29
|
|
28
30
|
module Sei
|
29
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zei
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -113,9 +113,11 @@ files:
|
|
113
113
|
- lib/sei/connection.rb
|
114
114
|
- lib/sei/estruturas/documento.rb
|
115
115
|
- lib/sei/estruturas/documento_bloco.rb
|
116
|
+
- lib/sei/estruturas/enviar_processo.rb
|
116
117
|
- lib/sei/estruturas/procedimento.rb
|
117
118
|
- lib/sei/estruturas/retorno_boolean.rb
|
118
119
|
- lib/sei/estruturas/retorno_conclusao_processo.rb
|
120
|
+
- lib/sei/estruturas/retorno_consultar_bloco.rb
|
119
121
|
- lib/sei/estruturas/retorno_consultar_documento.rb
|
120
122
|
- lib/sei/estruturas/retorno_consultar_procedimento.rb
|
121
123
|
- lib/sei/estruturas/retorno_geracao_bloco.rb
|
@@ -132,12 +134,12 @@ files:
|
|
132
134
|
- lib/sei/version.rb
|
133
135
|
- lib/zei.rb
|
134
136
|
- zei.gemspec
|
135
|
-
homepage:
|
137
|
+
homepage:
|
136
138
|
licenses:
|
137
139
|
- MIT
|
138
140
|
metadata:
|
139
141
|
allowed_push_host: https://rubygems.org
|
140
|
-
post_install_message:
|
142
|
+
post_install_message:
|
141
143
|
rdoc_options: []
|
142
144
|
require_paths:
|
143
145
|
- lib
|
@@ -152,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
154
|
- !ruby/object:Gem::Version
|
153
155
|
version: '0'
|
154
156
|
requirements: []
|
155
|
-
rubygems_version: 3.
|
156
|
-
signing_key:
|
157
|
+
rubygems_version: 3.4.8
|
158
|
+
signing_key:
|
157
159
|
specification_version: 4
|
158
160
|
summary: Integração com a API do SEI.
|
159
161
|
test_files: []
|