libretificacaotjcore 0.1.18__tar.gz → 0.1.19__tar.gz
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.
Potentially problematic release.
This version of libretificacaotjcore might be problematic. Click here for more details.
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/PKG-INFO +1 -1
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/database/arquivo_repository.py +4 -4
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/database/config_db.py +5 -5
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/database/protocolo_repository.py +11 -11
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/PKG-INFO +1 -1
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/pyproject.toml +1 -1
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/README.md +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/__init__.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/database/__init__.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/database/certificado_repository.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/dtos/solicitacao_dto.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/enums/e_eventos.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/services/__init__.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/services/crypto_pass_service.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/services/file_service.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/services/rabbitmq_consumer.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/services/s3_service.py +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/SOURCES.txt +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/dependency_links.txt +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/requires.txt +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/top_level.txt +0 -0
- {libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libretificacaotjcore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: Biblioteca para centralizar conexao com filas no rabbit e banco de dados no mongodb para os servicos de retificacao da TJ
|
|
5
5
|
Author-email: Jhonatan Azevedo <dev.azevedo@outlook.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/seu-usuario/libretificacaotjcore
|
|
@@ -8,7 +8,7 @@ class ArquivoRepository:
|
|
|
8
8
|
|
|
9
9
|
try:
|
|
10
10
|
arquivo_no_db = await self.__db.arquivos.find_one(
|
|
11
|
-
{"
|
|
11
|
+
{"solicitacaoId": arquivo["solicitacaoId"], "cpf": arquivo["cpf"]}
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
if arquivo_no_db is None:
|
|
@@ -16,7 +16,7 @@ class ArquivoRepository:
|
|
|
16
16
|
return True
|
|
17
17
|
|
|
18
18
|
await self.__db.arquivos.delete_one(
|
|
19
|
-
{"
|
|
19
|
+
{"solicitacaoId": arquivo["solicitacaoId"], "cpf": arquivo["cpf"]}
|
|
20
20
|
)
|
|
21
21
|
await self.__db.arquivos.insert_one(arquivo)
|
|
22
22
|
return True
|
|
@@ -29,7 +29,7 @@ class ArquivoRepository:
|
|
|
29
29
|
if not arquivos:
|
|
30
30
|
return False
|
|
31
31
|
|
|
32
|
-
filtros = [{"
|
|
32
|
+
filtros = [{"solicitacaoId": a["solicitacaoId"], "cpf": a["cpf"]} for a in arquivos]
|
|
33
33
|
await self.__db.arquivos.delete_many({"$or": filtros})
|
|
34
34
|
|
|
35
35
|
await self.__db.arquivos.insert_many(arquivos)
|
|
@@ -43,7 +43,7 @@ class ArquivoRepository:
|
|
|
43
43
|
|
|
44
44
|
async def remover_arquivo(self, solicitacaoId: int) -> bool:
|
|
45
45
|
try:
|
|
46
|
-
await self.__db.arquivos.delete_many({"
|
|
46
|
+
await self.__db.arquivos.delete_many({"solicitacaoId": solicitacaoId})
|
|
47
47
|
return True
|
|
48
48
|
except Exception as e:
|
|
49
49
|
print(f"❌ Erro ao remover o arquivo: {e}")
|
|
@@ -24,18 +24,18 @@ class ConfigDb:
|
|
|
24
24
|
await self.__db.create_collection("arquivos")
|
|
25
25
|
|
|
26
26
|
await self.__db.arquivos.create_index([("cnpj", 1)])
|
|
27
|
-
await self.__db.arquivos.create_index([("
|
|
27
|
+
await self.__db.arquivos.create_index([("solicitacaoId", 1)])
|
|
28
28
|
await self.__db.arquivos.create_index([("id", 1)], unique=True)
|
|
29
|
-
await self.__db.arquivos.create_index([("
|
|
29
|
+
await self.__db.arquivos.create_index([("solicitacaoId", 1), ("cpf", 1)], unique=True)
|
|
30
30
|
self.db_initialized = True
|
|
31
31
|
|
|
32
32
|
if "protocolos" not in (await self.__db.list_collection_names()):
|
|
33
33
|
await self.__db.create_collection("protocolos")
|
|
34
34
|
|
|
35
|
-
await self.__db.
|
|
36
|
-
await self.__db.protocolos.create_index([("
|
|
35
|
+
await self.__db.protocolos.create_index([("cnpj", 1)], unique=True)
|
|
36
|
+
await self.__db.protocolos.create_index([("solicitacaoId", 1)])
|
|
37
37
|
await self.__db.protocolos.create_index([("id", 1)], unique=True)
|
|
38
|
-
await self.__db.protocolos.create_index([("
|
|
38
|
+
await self.__db.protocolos.create_index([("solicitacaoId", 1), ("evento", 1)], unique=True)
|
|
39
39
|
self.db_initialized = True
|
|
40
40
|
|
|
41
41
|
async def get_db(self):
|
|
@@ -7,18 +7,18 @@ class ProtocoloRepository:
|
|
|
7
7
|
async def inserir_protocolo(self, protocolo: dict) -> bool:
|
|
8
8
|
|
|
9
9
|
try:
|
|
10
|
-
protocolo_no_db = await self.__db.
|
|
11
|
-
{"
|
|
10
|
+
protocolo_no_db = await self.__db.protocolos.find_one(
|
|
11
|
+
{"solicitacaoId": protocolo["solicitacaoId"], "evento": protocolo["evento"]}
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
if protocolo_no_db is None:
|
|
15
|
-
await self.__db.
|
|
15
|
+
await self.__db.protocolos.insert_one(protocolo)
|
|
16
16
|
return True
|
|
17
17
|
|
|
18
|
-
await self.__db.
|
|
19
|
-
{"
|
|
18
|
+
await self.__db.protocolos.delete_one(
|
|
19
|
+
{"solicitacaoId": protocolo["solicitacaoId"], "evento": protocolo["evento"]}
|
|
20
20
|
)
|
|
21
|
-
await self.__db.
|
|
21
|
+
await self.__db.protocolos.insert_one(protocolo)
|
|
22
22
|
return True
|
|
23
23
|
except Exception as e:
|
|
24
24
|
print(f"❌ Erro ao inserir o protocolo: {e}")
|
|
@@ -29,10 +29,10 @@ class ProtocoloRepository:
|
|
|
29
29
|
if not protocolos:
|
|
30
30
|
return False
|
|
31
31
|
|
|
32
|
-
filtros = [{"
|
|
33
|
-
await self.__db.
|
|
32
|
+
filtros = [{"solicitacaoId": a["solicitacaoId"], "evento": a["evento"]} for a in protocolos]
|
|
33
|
+
await self.__db.protocolos.delete_many({"$or": filtros})
|
|
34
34
|
|
|
35
|
-
await self.__db.
|
|
35
|
+
await self.__db.protocolos.insert_many(protocolos)
|
|
36
36
|
return True
|
|
37
37
|
except BulkWriteError as bwe:
|
|
38
38
|
print(f"❌ Erro de escrita em lote: {bwe.details}")
|
|
@@ -43,7 +43,7 @@ class ProtocoloRepository:
|
|
|
43
43
|
|
|
44
44
|
async def remover_protocolo(self, solicitacaoId: int) -> bool:
|
|
45
45
|
try:
|
|
46
|
-
await self.__db.
|
|
46
|
+
await self.__db.protocolos.delete_many({"solicitacaoId": solicitacaoId})
|
|
47
47
|
return True
|
|
48
48
|
except Exception as e:
|
|
49
49
|
print(f"❌ Erro ao remover o protocolo: {e}")
|
|
@@ -51,7 +51,7 @@ class ProtocoloRepository:
|
|
|
51
51
|
|
|
52
52
|
async def buscar_por_solicitacao_id(self, solicitacaoId: int) -> list[dict]:
|
|
53
53
|
try:
|
|
54
|
-
return await self.__db.
|
|
54
|
+
return await self.__db.protocolos.find({"solicitacaoId": solicitacaoId}).to_list(length=None)
|
|
55
55
|
except Exception as e:
|
|
56
56
|
print(f"❌ Erro ao buscar protocolo por solicitacaoId: {e}")
|
|
57
57
|
return []
|
{libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libretificacaotjcore
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: Biblioteca para centralizar conexao com filas no rabbit e banco de dados no mongodb para os servicos de retificacao da TJ
|
|
5
5
|
Author-email: Jhonatan Azevedo <dev.azevedo@outlook.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/seu-usuario/libretificacaotjcore
|
|
@@ -11,7 +11,7 @@ keywords = ["tj", "tributo justo", "retificação", "automação", "pydantic", "
|
|
|
11
11
|
name = "libretificacaotjcore"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.12"
|
|
14
|
-
version = "0.1.
|
|
14
|
+
version = "0.1.19"
|
|
15
15
|
|
|
16
16
|
classifiers = [
|
|
17
17
|
"Development Status :: 3 - Alpha",
|
|
File without changes
|
{libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{libretificacaotjcore-0.1.18 → libretificacaotjcore-0.1.19}/libretificacaotjcore/enums/e_eventos.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|