worker-automate-hub 0.5.706__py3-none-any.whl → 0.5.707__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/devolucao_prazo_a_faturar.py +1 -0
- worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +44 -34
- worker_automate_hub/utils/util.py +1 -1
- {worker_automate_hub-0.5.706.dist-info → worker_automate_hub-0.5.707.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.706.dist-info → worker_automate_hub-0.5.707.dist-info}/RECORD +7 -7
- {worker_automate_hub-0.5.706.dist-info → worker_automate_hub-0.5.707.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.706.dist-info → worker_automate_hub-0.5.707.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
import asyncio
|
2
|
+
import sys
|
3
|
+
import os
|
4
|
+
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
|
5
|
+
|
4
6
|
from worker_automate_hub.api.client import get_config_by_name
|
5
7
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import RpaHistoricoStatusEnum, RpaRetornoProcessoDTO, RpaTagDTO, RpaTagEnum
|
6
8
|
from worker_automate_hub.models.dto.rpa_processo_entrada_dto import RpaProcessoEntradaDTO
|
@@ -51,7 +53,7 @@ async def geracao_aprovacao_pedidos_processo(task: RpaProcessoEntradaDTO) -> Rpa
|
|
51
53
|
|
52
54
|
if task.uuidProcesso == "c8527e90-c65b-4d68-b4cf-25008b678957":
|
53
55
|
empresa = "34"
|
54
|
-
periodo = "
|
56
|
+
periodo = "1"
|
55
57
|
elif task.uuidProcesso == "260380b7-a3e5-4c23-ab69-b428ee552830":
|
56
58
|
empresa = "171"
|
57
59
|
periodo = "1"
|
@@ -134,18 +136,20 @@ async def geracao_aprovacao_pedidos_processo(task: RpaProcessoEntradaDTO) -> Rpa
|
|
134
136
|
await worker_sleep(5)
|
135
137
|
|
136
138
|
console.print("Selecionando todas as filiais...")
|
137
|
-
pyautogui.click(x=
|
138
|
-
await worker_sleep(2)
|
139
|
-
|
140
|
-
##### Janela Seleção de Empresa #####
|
141
|
-
|
142
|
-
console.print("Clicando em ok para confirmar...")
|
143
|
-
app = Application(backend="win32").connect(
|
144
|
-
class_name="TFrmSelecionaEmpresas", found_index=0)
|
145
|
-
main_window = app["TFrmSelecionaEmpresas"]
|
146
|
-
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
139
|
+
pyautogui.click(x=720, y=620)
|
147
140
|
await worker_sleep(5)
|
148
141
|
|
142
|
+
|
143
|
+
##### Janela Seleção de Empresa #####
|
144
|
+
try:
|
145
|
+
console.print("Clicando em ok para confirmar...")
|
146
|
+
app = Application(backend="win32").connect(
|
147
|
+
class_name="TFrmSelecionaEmpresas", found_index=0)
|
148
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
149
|
+
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
150
|
+
await worker_sleep(5)
|
151
|
+
except:
|
152
|
+
pass
|
149
153
|
# tela de aguarde
|
150
154
|
try:
|
151
155
|
console.print("Aguardando janela de aguarde finalizar...")
|
@@ -179,18 +183,21 @@ async def geracao_aprovacao_pedidos_processo(task: RpaProcessoEntradaDTO) -> Rpa
|
|
179
183
|
await worker_sleep(30)
|
180
184
|
|
181
185
|
console.print("Clicando em aprovar...")
|
182
|
-
pyautogui.click(x=
|
183
|
-
|
184
|
-
await worker_sleep(
|
185
|
-
|
186
|
-
##### Janela Motivo da Aprovação da Negociação de Compra #####
|
187
|
-
|
188
|
-
console.print("clicando em OK em Motivo da aprovação da Negociação de Compra...")
|
189
|
-
app = Application(backend="win32").connect(
|
190
|
-
class_name="TFrmInputBoxText", found_index=0)
|
191
|
-
main_window = app["TFrmInputBoxText"]
|
192
|
-
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
186
|
+
pyautogui.click(x=1120, y=753)
|
187
|
+
|
188
|
+
await worker_sleep(5)
|
193
189
|
|
190
|
+
try:
|
191
|
+
##### Janela Motivo da Aprovação da Negociação de Compra #####
|
192
|
+
|
193
|
+
console.print("clicando em OK em Motivo da aprovação da Negociação de Compra...")
|
194
|
+
app = Application(backend="win32").connect(
|
195
|
+
class_name="TFrmInputBoxText", found_index=0)
|
196
|
+
main_window = app["TFrmInputBoxText"]
|
197
|
+
main_window.set_focus()
|
198
|
+
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
199
|
+
except:
|
200
|
+
pass
|
194
201
|
await worker_sleep(20)
|
195
202
|
|
196
203
|
##### Janela Information #####
|
@@ -357,12 +364,17 @@ async def geracao_aprovacao_pedidos_processo(task: RpaProcessoEntradaDTO) -> Rpa
|
|
357
364
|
checks = 0
|
358
365
|
|
359
366
|
for _ in range(max_attempts):
|
360
|
-
|
367
|
+
janela_confirm = app.window(title="Confirm")
|
368
|
+
|
369
|
+
if janela_confirm.exists(timeout=1): # espera 1s a cada tentativa
|
361
370
|
checks = 0
|
362
371
|
|
363
|
-
|
364
|
-
|
365
|
-
|
372
|
+
try:
|
373
|
+
janela_confirm.set_focus()
|
374
|
+
janela_confirm.restore() # garante que está visível
|
375
|
+
except Exception as e:
|
376
|
+
print(f"Erro ao dar foco: {e}")
|
377
|
+
continue
|
366
378
|
|
367
379
|
# Tenta clicar até 4 vezes com intervalo de 5s
|
368
380
|
for _ in range(4):
|
@@ -370,18 +382,16 @@ async def geracao_aprovacao_pedidos_processo(task: RpaProcessoEntradaDTO) -> Rpa
|
|
370
382
|
await emsys.verify_warning_and_error("Confirm", "&Yes")
|
371
383
|
break # Sai do loop se clicar com sucesso
|
372
384
|
except Exception as e:
|
373
|
-
print(f"Tentativa falhou: {e}")
|
385
|
+
print(f"Tentativa de clique falhou: {e}")
|
374
386
|
time.sleep(5)
|
375
|
-
break # Sai do loop principal
|
387
|
+
break # Sai do loop principal após tentar clicar
|
376
388
|
else:
|
377
389
|
checks += 1
|
378
390
|
if checks >= minimum_checks:
|
391
|
+
print("Janela 'Confirm' não apareceu após múltiplas tentativas.")
|
379
392
|
break
|
380
393
|
time.sleep(1)
|
381
|
-
|
382
|
-
max_attempts = 80
|
383
|
-
minimum_checks = 4
|
384
|
-
checks = 0
|
394
|
+
|
385
395
|
|
386
396
|
for _ in range(max_attempts):
|
387
397
|
if app.window(title="Information").exists():
|
@@ -4042,7 +4042,7 @@ async def nf_devolucao_liquidar_cupom(
|
|
4042
4042
|
"assets\\emsys\\icon_pesquisa_nota_saida.png", confidence=0.8
|
4043
4043
|
)
|
4044
4044
|
pyautogui.click(pesquisar_icon)
|
4045
|
-
await worker_sleep(
|
4045
|
+
await worker_sleep(10)
|
4046
4046
|
except Exception as e:
|
4047
4047
|
return RpaRetornoProcessoDTO(
|
4048
4048
|
sucesso=False,
|
@@ -44,7 +44,7 @@ worker_automate_hub/tasks/jobs/cte_xml.py,sha256=m4BkJDgp95Vr3oqEh6wXeeb31qzZhRF
|
|
44
44
|
worker_automate_hub/tasks/jobs/descartes.py,sha256=iHmFIFBYEgvoI648nntCrvT_LyoJZ_zFTyS6lJLsnPE,44486
|
45
45
|
worker_automate_hub/tasks/jobs/devolucao_ctf.py,sha256=7tdUihaDqjIf7POjM79EqKG0w-qqXbhC6jq6hteavkw,250822
|
46
46
|
worker_automate_hub/tasks/jobs/devolucao_ctf_35.py,sha256=e9t5k2mtZcUcEGKPWysbWzsH_gqrK-6aBXjWe2jWfTg,253948
|
47
|
-
worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=
|
47
|
+
worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=rWXmtUMX9oYTCMyO28bwl9DvxWXXeKswbs-tA0iN7Cs,272586
|
48
48
|
worker_automate_hub/tasks/jobs/ecac_estadual_go.py,sha256=dKkf22nH5gp3RErq5u0UzRsKyJ81fc6ZZ4vLtUuMwHA,21002
|
49
49
|
worker_automate_hub/tasks/jobs/ecac_estadual_main.py,sha256=8WmKe4-MRtzHobXz2S4YBDNN8alfawkC-BBlRY-mn1g,1726
|
50
50
|
worker_automate_hub/tasks/jobs/ecac_estadual_mt.py,sha256=C26zmpGQGUq6sP9lU9nanM3Fje-rkyx5tjwmRy4lyL8,25300
|
@@ -76,7 +76,7 @@ worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=zu92tRCvKPK0U6I
|
|
76
76
|
worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py,sha256=XCbIZG1y7eTrBFF8ArVbOij_FbkFkIXNpwZusILmiVo,15701
|
77
77
|
worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py,sha256=mmBW7KetUeRjiZkjnrxMKGX32io3YLZ8KGaY5_o7new,11891
|
78
78
|
worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py,sha256=QzK2aG5d9pmFbb8cTaNm3LWf5NMkmCvBkgo70gcLu0c,14781
|
79
|
-
worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py,sha256=
|
79
|
+
worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py,sha256=4Rtm2uCfA6tZ-KW6aunKug7reTqbBX69CCBZCBnwbYc,21856
|
80
80
|
worker_automate_hub/tasks/jobs/integracao_contabil.py,sha256=psoIU0tjtTJq2W8aGXjXrfkAOYlIpUtHZyNolI7dp-0,16263
|
81
81
|
worker_automate_hub/tasks/jobs/integracao_contabil_generica.py,sha256=cA41rQlqTkNo9XD1QM0xtSDhJQoWJenvNuA_WePW4OM,22048
|
82
82
|
worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py,sha256=0mlu-oPwRd9qCocB-6tWsEI0-wd48mkBJn5juYqOAX8,40788
|
@@ -95,10 +95,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
|
|
95
95
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
96
96
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
97
97
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
98
|
-
worker_automate_hub/utils/util.py,sha256=
|
98
|
+
worker_automate_hub/utils/util.py,sha256=X0ui4zwNvqm9jYOqL1lyfmBXUxlP6YtxIJ81WZhjaR0,206353
|
99
99
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=Yy4vDY5Wiw0uopy43IRm9jUgF5g1aFXMGVtG-GtH2g4,37524
|
100
100
|
worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
|
101
|
-
worker_automate_hub-0.5.
|
102
|
-
worker_automate_hub-0.5.
|
103
|
-
worker_automate_hub-0.5.
|
104
|
-
worker_automate_hub-0.5.
|
101
|
+
worker_automate_hub-0.5.707.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
102
|
+
worker_automate_hub-0.5.707.dist-info/METADATA,sha256=sWLjamnfDmzPbP7ATQIDcpHUfZr0ly7C6GTRwZIP2m0,3049
|
103
|
+
worker_automate_hub-0.5.707.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
104
|
+
worker_automate_hub-0.5.707.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.706.dist-info → worker_automate_hub-0.5.707.dist-info}/entry_points.txt
RENAMED
File without changes
|