ipiranga-inovai-project-lib 1.6__tar.gz → 1.7__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.
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/PKG-INFO +1 -1
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/entities.py +108 -1
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/enums.py +11 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/ipiranga_inovai_project_lib.egg-info/PKG-INFO +1 -1
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/setup.py +1 -1
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/LICENSE +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/README.md +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/Endereco.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFe.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeBoleto.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeCartao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDadosAtivos.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDetalhePagamento.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDocImportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDocImportacaoAdicao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDocRef.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDuplicata.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeEnvioXML.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeEnvolvido.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeExportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeFatura.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeImposto.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeImpostoRetido.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeIntermediadorTransacao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeItem.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeItemDadosCombustivel.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeItemExportacao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeItemOrigemCombustivel.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeObservacao.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeObservacaoItem.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeOrigem.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFePagamento.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeProcReferenciado.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeTransporte.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeVeiculo.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeVolume.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/utils/__init__.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/utils/util.py +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/ipiranga_inovai_project_lib.egg-info/SOURCES.txt +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/ipiranga_inovai_project_lib.egg-info/dependency_links.txt +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/ipiranga_inovai_project_lib.egg-info/top_level.txt +0 -0
- {ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipiranga-inovai-project-lib
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7
|
|
4
4
|
Summary: Projeto criado para importação genérica de entidades
|
|
5
5
|
Home-page: https://gitlab.ipirangacloud.com/clayton.monteiro.ext/ipiranga-inovai-project-lib
|
|
6
6
|
Author: Clayton Sandes Monteiro
|
|
@@ -6,6 +6,109 @@ from sqlalchemy.orm import relationship
|
|
|
6
6
|
Base = declarative_base()
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
class ObiIntegration(Base):
|
|
10
|
+
__tablename__ = 'integracao_obi'
|
|
11
|
+
__table_args__ = {'schema': 'fiscal'}
|
|
12
|
+
|
|
13
|
+
id = Column('cd_seq_integr_obi', Integer, primary_key=True, nullable=False)
|
|
14
|
+
json_content = Column('aq_json', JSON, nullable=False)
|
|
15
|
+
integration_origin_code = Column('cd_unico_integr_obi', Numeric(precision=11, scale=0), nullable=False)
|
|
16
|
+
branch_code = Column('cd_filial', Numeric(precision=6, scale=0), nullable=False)
|
|
17
|
+
movement_employer_number = Column('cd_cnpj_movimentacao', String(14), nullable=False)
|
|
18
|
+
issuance_date = Column('dt_emis', Date, nullable=False)
|
|
19
|
+
movement_date = Column('dt_mov', DateTime, nullable=False)
|
|
20
|
+
created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
|
|
21
|
+
request_id = Column('id_req', String(40), nullable=True)
|
|
22
|
+
origin = Column('nm_sist_orig', String(50), nullable=True)
|
|
23
|
+
type_id = Column('cd_tipo_param_obi', Integer, nullable=False)
|
|
24
|
+
|
|
25
|
+
integration_obi_batch = relationship('IntegrationObiBatch', back_populates='integration_obi')
|
|
26
|
+
kit_integration_obi_status = relationship("KitIntegrationObiStatus", back_populates="integration_obi")
|
|
27
|
+
type = relationship("ParamTypeObiKit", back_populates="integration_obi")
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
return {
|
|
31
|
+
"cd_seq_integr_obi": self.id,
|
|
32
|
+
"aq_json": self.json_content,
|
|
33
|
+
"cd_unico_integr_obi": self.integration_origin_code,
|
|
34
|
+
"cd_filial": self.branch_code,
|
|
35
|
+
"cd_cnpj_movimentacao": self.movement_employer_number,
|
|
36
|
+
"dt_emis": self.issuance_date,
|
|
37
|
+
"dt_mov": self.movement_date,
|
|
38
|
+
"dt_incl": self.created_at,
|
|
39
|
+
"id_req": self.request_id,
|
|
40
|
+
"nm_sist_orig": self.origin,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
def __str__(self):
|
|
44
|
+
return str(self.to_dict())
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class ParamTypeObiKit(Base):
|
|
48
|
+
__tablename__ = 'tipo_param_kit_obi'
|
|
49
|
+
__table_args__ = {'schema': 'fiscal'}
|
|
50
|
+
|
|
51
|
+
type_id = Column('cd_tipo_param_obi', Integer, primary_key=True, nullable=False)
|
|
52
|
+
name = Column('nm_tipo_param_obi', String(50))
|
|
53
|
+
description = Column('ds_tipo_param_obi', String(200))
|
|
54
|
+
created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
|
|
55
|
+
inactivation_date = Column('dt_inat', DateTime, nullable=False)
|
|
56
|
+
|
|
57
|
+
integration_obi = relationship("ObiIntegration", back_populates="type")
|
|
58
|
+
integration_processing = relationship("ParamProcessingKit", back_populates="type")
|
|
59
|
+
|
|
60
|
+
def __init__(self, type_id=None, name=None, description=None):
|
|
61
|
+
super().__init__()
|
|
62
|
+
self.id = type_id
|
|
63
|
+
self.type = name
|
|
64
|
+
self.description = description
|
|
65
|
+
self.created_at = datetime.now()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class IntegrationObiBatch(Base):
|
|
69
|
+
__tablename__ = 'lote_integracao_obi'
|
|
70
|
+
__table_args__ = {'schema': 'fiscal'}
|
|
71
|
+
|
|
72
|
+
integration_batch_id = Column('cd_integr', String(36), ForeignKey('fiscal.lote_integracao.cd_integr'),
|
|
73
|
+
primary_key=True, nullable=False)
|
|
74
|
+
integration_obi_id = Column('cd_seq_integr_obi', Integer, ForeignKey('fiscal.integracao_obi'
|
|
75
|
+
'.cd_seq_integr_obi'),
|
|
76
|
+
primary_key=True, nullable=False)
|
|
77
|
+
created_at = Column('dt_incl', DateTime, nullable=False)
|
|
78
|
+
|
|
79
|
+
integration_obi_batch = relationship('ObiIntegration', back_populates='integration_obi')
|
|
80
|
+
|
|
81
|
+
def __init__(self, integration_batch_id, integration_obi_id):
|
|
82
|
+
super().__init__()
|
|
83
|
+
self.integration_obi_id = integration_obi_id
|
|
84
|
+
self.integration_batch_id = integration_batch_id
|
|
85
|
+
self.created_at = datetime.now()
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class KitIntegrationObiStatus(Base):
|
|
89
|
+
__tablename__ = 'kit_integracao_obi_status'
|
|
90
|
+
__table_args__ = {'schema': 'fiscal'}
|
|
91
|
+
|
|
92
|
+
integration_obi_id = Column('cd_seq_integr_obi', Integer, ForeignKey('fiscal.integracao_obi.cd_seq_integr_obi'),
|
|
93
|
+
primary_key=True, nullable=False)
|
|
94
|
+
kit_id = Column('no_seq_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'),
|
|
95
|
+
primary_key=True, nullable=False)
|
|
96
|
+
integration_status = Column('ds_status_proc', String(20), nullable=False)
|
|
97
|
+
created_at = Column('dt_incl', DateTime, nullable=False)
|
|
98
|
+
|
|
99
|
+
integration_obi = relationship(ObiIntegration, back_populates="kit_integration_obi_status")
|
|
100
|
+
|
|
101
|
+
def __init__(self, integration_obi_id, kit_id, integration_status):
|
|
102
|
+
super().__init__()
|
|
103
|
+
self.integration_obi_id = integration_obi_id
|
|
104
|
+
self.kit_id = kit_id
|
|
105
|
+
self.integration_status = integration_status
|
|
106
|
+
self.created_at = datetime.now()
|
|
107
|
+
|
|
108
|
+
def __str__(self):
|
|
109
|
+
return f'integration_obi_id: {self.document_id}, kit_id: {self.kit_id}, integration_status: {self.integration_status}'
|
|
110
|
+
|
|
111
|
+
|
|
9
112
|
class IntegrationDocument(Base):
|
|
10
113
|
__tablename__ = 'documento_integracao'
|
|
11
114
|
__table_args__ = {'schema': 'fiscal'}
|
|
@@ -157,16 +260,20 @@ class ParamProcessingKit(Base):
|
|
|
157
260
|
kit_id = Column('cd_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'), nullable=False)
|
|
158
261
|
process_code = Column('cd_proc_obi', String(30))
|
|
159
262
|
status = Column('id_status_param', Boolean, nullable=False)
|
|
263
|
+
type_id = Column('cd_tipo_param_obi', Integer, ForeignKey('fiscal.tipo_param_kit_obi.cd_tipo_param_obi'), nullable=False)
|
|
160
264
|
document_type = Column('cd_tipo_doc_integr', String(8))
|
|
161
265
|
created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
|
|
162
266
|
|
|
163
|
-
|
|
267
|
+
type = relationship("ParamTypeObiKit", back_populates="integration_processing")
|
|
268
|
+
|
|
269
|
+
def __init__(self, param_processing_kit_id, kit_id, process_code, status, document_type, type_id=None):
|
|
164
270
|
super().__init__()
|
|
165
271
|
self.param_processing_kit_id = param_processing_kit_id
|
|
166
272
|
self.kit_id = kit_id
|
|
167
273
|
self.process_code = process_code
|
|
168
274
|
self.status = status
|
|
169
275
|
self.document_type = document_type
|
|
276
|
+
self.type_id = type_id
|
|
170
277
|
self.created_at = datetime.now()
|
|
171
278
|
|
|
172
279
|
|
|
@@ -28,6 +28,17 @@ class DocumentType(Enum):
|
|
|
28
28
|
ISS_SERVICE = "SERV_ISS"
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
class IntegrationType(Enum):
|
|
32
|
+
SERVICE = 'SERV'
|
|
33
|
+
PRODUCT = 'PROD'
|
|
34
|
+
ISS_SERVICE = "SERV_ISS"
|
|
35
|
+
STOCK_MOVEMENT = 'MOVIMENTACAO_ESTOQUE'
|
|
36
|
+
FINISHED_PRODUCT_WITHOUT_PACKAGING = 'PRODUTO_ACABADO_SEM_EMBALAGEM'
|
|
37
|
+
FINISHED_PRODUCT_WITH_PACKAGING = 'PRODUTO_ACABADO_COM_EMBALAGEM'
|
|
38
|
+
PRODUCTION_ORDER = 'ORDEM_PRODUCAO'
|
|
39
|
+
CORRECTION_NOTE = 'CORRECAO_APONTAMENTO'
|
|
40
|
+
|
|
41
|
+
|
|
31
42
|
class TaxType:
|
|
32
43
|
PIS = "PIS"
|
|
33
44
|
IPI = "IPI"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipiranga-inovai-project-lib
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7
|
|
4
4
|
Summary: Projeto criado para importação genérica de entidades
|
|
5
5
|
Home-page: https://gitlab.ipirangacloud.com/clayton.monteiro.ext/ipiranga-inovai-project-lib
|
|
6
6
|
Author: Clayton Sandes Monteiro
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ipiranga-inovai-project-lib",
|
|
5
|
-
version="1.
|
|
5
|
+
version="1.7",
|
|
6
6
|
packages=find_packages(),
|
|
7
7
|
description="Projeto criado para importação genérica de entidades",
|
|
8
8
|
long_description=open('README.md').read(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/Endereco.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeBoleto.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeCartao.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDadosAtivos.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDocRef.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeDuplicata.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeEnvioXML.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeEnvolvido.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeExportacao.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeFatura.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeImposto.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeItem.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeObservacao.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeOrigem.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFePagamento.py
RENAMED
|
File without changes
|
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeTransporte.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeVeiculo.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/NFeVolume.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/models/__init__.py
RENAMED
|
File without changes
|
{ipiranga-inovai-project-lib-1.6 → ipiranga-inovai-project-lib-1.7}/inovai/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|