Commit inicial
This commit is contained in:
commit
5385af660d
10 changed files with 173 additions and 0 deletions
17
app/v1/modules/veiculo/services.py
Normal file
17
app/v1/modules/veiculo/services.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from sqlalchemy.pool import PoolProxiedConnection
|
||||
|
||||
|
||||
class CancelamentoProposta:
|
||||
def __init__(self, conexao: PoolProxiedConnection) -> None:
|
||||
self.conexao = conexao
|
||||
|
||||
def cancelar_no_banco(self, id_processo: str) -> bool:
|
||||
cursor = self.conexao.cursor()
|
||||
cursor.execute("""
|
||||
UPDATE HOLMES_FAT_ESTOQUE
|
||||
SET STATUS = 'CANCELADO', DTA_ALTERACAO_STATUS = GETDATE()
|
||||
WHERE ID_PROCESSO = ?
|
||||
""", id_processo)
|
||||
|
||||
self.conexao.commit()
|
||||
return cursor.rowcount > 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue