worker-automate-hub 0.5.594__py3-none-any.whl → 0.5.597__py3-none-any.whl
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.
- worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +18 -22
- worker_automate_hub/utils/util.py +1 -1
- {worker_automate_hub-0.5.594.dist-info → worker_automate_hub-0.5.597.dist-info}/METADATA +2 -1
- {worker_automate_hub-0.5.594.dist-info → worker_automate_hub-0.5.597.dist-info}/RECORD +6 -6
- {worker_automate_hub-0.5.594.dist-info → worker_automate_hub-0.5.597.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.594.dist-info → worker_automate_hub-0.5.597.dist-info}/entry_points.txt +0 -0
@@ -384,17 +384,30 @@ async def integracao_contabil_generica(
|
|
384
384
|
)
|
385
385
|
|
386
386
|
botao_integrar.click_input()
|
387
|
-
|
387
|
+
assets_int_cont = "assets\\integracao_contabil\\"
|
388
|
+
err_dict = {
|
389
|
+
assets_int_cont + "erro_duplicidade.png": "Erro de Duplicidade localizado enquanto finalizava a integração.",
|
390
|
+
assets_int_cont + "conta_indefinida_error.png": "Conta contábil indefinida no sistema.",
|
391
|
+
assets_int_cont + "lote_sem_complemento_error.png": "Lote encontrado sem complemento obrigatório.",
|
392
|
+
}
|
388
393
|
# Aguardar finalizar
|
389
394
|
while True:
|
390
395
|
try:
|
396
|
+
for img_path, mensagem in err_dict.items():
|
397
|
+
err = pyautogui.locateOnScreen(img_path, confidence=0.86)
|
398
|
+
if err:
|
399
|
+
console.print(f"[red]Erro encontrado:[/red] {mensagem}")
|
400
|
+
return RpaRetornoProcessoDTO(
|
401
|
+
sucesso=False,
|
402
|
+
retorno=mensagem,
|
403
|
+
status=RpaHistoricoStatusEnum.Falha,
|
404
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
405
|
+
)
|
391
406
|
# Conecta à janela do tipo MsgBox
|
392
|
-
|
407
|
+
await worker_sleep(1)
|
393
408
|
app = Application(backend="win32").connect(class_name="TMsgBox")
|
394
409
|
msgbox = app.window(class_name="TMsgBox", title_re="Inform.*")
|
395
|
-
|
396
410
|
msgbox.set_focus()
|
397
|
-
|
398
411
|
# Procura pelo botão com texto '&Ok'
|
399
412
|
botao_ok = msgbox.child_window(class_name="TBitBtn", title="&Ok")
|
400
413
|
if botao_ok.exists() and botao_ok.is_visible():
|
@@ -402,24 +415,7 @@ async def integracao_contabil_generica(
|
|
402
415
|
console.print("Botão '&Ok' clicado com sucesso.")
|
403
416
|
break
|
404
417
|
except ElementNotFoundError:
|
405
|
-
console.print("Janela MsgBox não encontrada ainda.
|
406
|
-
try:
|
407
|
-
duplicidade_err_img = "assets\\integracao_contabil\\erro_duplicidade.png"
|
408
|
-
duplicidade_err = pyautogui.locateOnScreen(
|
409
|
-
duplicidade_err_img, confidence=0.86
|
410
|
-
)
|
411
|
-
console.print("Verificando imagem...")
|
412
|
-
if duplicidade_err:
|
413
|
-
console.print("Erro de Duplicidade localizado.")
|
414
|
-
return RpaRetornoProcessoDTO(
|
415
|
-
sucesso=False,
|
416
|
-
retorno=f"Erro de Duplicidade localizado enquanto finalizava a integração.",
|
417
|
-
status=RpaHistoricoStatusEnum.Falha,
|
418
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
419
|
-
)
|
420
|
-
console.print("Erro de Duplicidade não localizado.")
|
421
|
-
except Exception as err:
|
422
|
-
print(f"Sem erro de Duplicidade.\nDetalhe: {err}")
|
418
|
+
console.print("Janela MsgBox não encontrada ainda.")
|
423
419
|
except Exception as e:
|
424
420
|
print(f"Erro ao tentar clicar no botão: {e}")
|
425
421
|
|
@@ -3278,7 +3278,7 @@ async def check_nota_importada(xml_nota: str) -> RpaRetornoProcessoDTO:
|
|
3278
3278
|
from worker_automate_hub.api.client import get_status_nf_emsys
|
3279
3279
|
|
3280
3280
|
try:
|
3281
|
-
max_attempts =
|
3281
|
+
max_attempts = 100
|
3282
3282
|
i = 0
|
3283
3283
|
|
3284
3284
|
while i < max_attempts:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: worker-automate-hub
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.597
|
4
4
|
Summary: Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta.
|
5
5
|
Author: Joel Paim
|
6
6
|
Requires-Python: >=3.12,<4.0
|
@@ -53,6 +53,7 @@ Requires-Dist: webdriver-manager (>=4.0.2,<5.0.0)
|
|
53
53
|
Requires-Dist: win10toast (>=0.9,<0.10)
|
54
54
|
Requires-Dist: xhtml2pdf (>=0.2.16,<0.3.0)
|
55
55
|
Requires-Dist: xlib (>=0.21,<0.22)
|
56
|
+
Requires-Dist: xlrd (>=2.0.1,<3.0.0)
|
56
57
|
Description-Content-Type: text/markdown
|
57
58
|
|
58
59
|
# Worker Automate Hub
|
@@ -74,7 +74,7 @@ worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py,sha256=XCbIZG1y7
|
|
74
74
|
worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py,sha256=6BtgiHZ8gLiKpOHwF3Tba4oVFZDUbUUwaHw7WK_5V2I,11879
|
75
75
|
worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py,sha256=QzK2aG5d9pmFbb8cTaNm3LWf5NMkmCvBkgo70gcLu0c,14781
|
76
76
|
worker_automate_hub/tasks/jobs/integracao_contabil.py,sha256=psoIU0tjtTJq2W8aGXjXrfkAOYlIpUtHZyNolI7dp-0,16263
|
77
|
-
worker_automate_hub/tasks/jobs/integracao_contabil_generica.py,sha256=
|
77
|
+
worker_automate_hub/tasks/jobs/integracao_contabil_generica.py,sha256=mQo6d_X5gC5t5gnt4lyQPN7J30u8e4f81dWRjzH5Mk8,18060
|
78
78
|
worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py,sha256=9BePVw8AP42mRKRiWqZHxIah9rGOqoBXs_Vo-OQBioM,35679
|
79
79
|
worker_automate_hub/tasks/jobs/login_emsys.py,sha256=dO9S027qRTtjOfytF6IWO-m6hDld8kZqOVAsn91l1YA,5684
|
80
80
|
worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py,sha256=_6CFh79eaW9KdPGR6FMV01ASPjJzNzzBK1MvC_uiSOo,5625
|
@@ -90,10 +90,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
|
|
90
90
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
91
91
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
92
92
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
93
|
-
worker_automate_hub/utils/util.py,sha256=
|
93
|
+
worker_automate_hub/utils/util.py,sha256=_pgZOFWgXoov6WPbqyRTDVXJCRFfucYB3gb9swzU7bo,198281
|
94
94
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=wmnpuOesmPSryZszmapa37b9YNC0E2MkeDYnbwr-0rU,33315
|
95
95
|
worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
|
96
|
-
worker_automate_hub-0.5.
|
97
|
-
worker_automate_hub-0.5.
|
98
|
-
worker_automate_hub-0.5.
|
99
|
-
worker_automate_hub-0.5.
|
96
|
+
worker_automate_hub-0.5.597.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
97
|
+
worker_automate_hub-0.5.597.dist-info/METADATA,sha256=2R226wpP1kYkEa-f5W2qnAMywyFQ8ei7TDTg-fGV394,3049
|
98
|
+
worker_automate_hub-0.5.597.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
99
|
+
worker_automate_hub-0.5.597.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.594.dist-info → worker_automate_hub-0.5.597.dist-info}/entry_points.txt
RENAMED
File without changes
|