worker-automate-hub 0.5.53__tar.gz → 0.5.55__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/webhook_service.py +5 -1
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +34 -12
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/task_executor.py +5 -1
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/util.py +125 -19
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/README.md +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/worker.py +0 -0
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/webhook_service.py
RENAMED
@@ -8,7 +8,8 @@ console = Console()
|
|
8
8
|
async def send_to_webhook(
|
9
9
|
url_retorno: str,
|
10
10
|
status: str,
|
11
|
-
observacao: str
|
11
|
+
observacao: str,
|
12
|
+
identificador_webhook: str = None
|
12
13
|
) -> None:
|
13
14
|
"""
|
14
15
|
Envia uma notificacao para o endpoint do webhook passado como parametro.
|
@@ -35,6 +36,9 @@ async def send_to_webhook(
|
|
35
36
|
"observacao": observacao,
|
36
37
|
}
|
37
38
|
|
39
|
+
if identificador_webhook:
|
40
|
+
data["identificador"] = identificador_webhook
|
41
|
+
|
38
42
|
try:
|
39
43
|
async with aiohttp.ClientSession(
|
40
44
|
connector=aiohttp.TCPConnector(verify_ssl=False)
|
@@ -35,6 +35,7 @@ from worker_automate_hub.utils.util import (
|
|
35
35
|
e_ultimo_dia_util,
|
36
36
|
delete_xml,
|
37
37
|
ocr_warnings,
|
38
|
+
ocr_by_class,
|
38
39
|
nf_busca_nf_saida,
|
39
40
|
pessoas_ativa_cliente_fornecedor,
|
40
41
|
nf_devolucao_liquidar_cupom,
|
@@ -758,9 +759,7 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
758
759
|
console.print(f"Imagem preparada com sucesso...\n")
|
759
760
|
console.print(f"Realizando OCR...\n")
|
760
761
|
captured_text = pytesseract.image_to_string(Image.open(path_to_png))
|
761
|
-
console.print(
|
762
|
-
f"Texto Full capturado {captured_text}...\n"
|
763
|
-
)
|
762
|
+
console.print(f"Texto Full capturado {captured_text}...\n")
|
764
763
|
os.remove(path_to_png)
|
765
764
|
pattern = r"sequ[êe]ncia:\s*(\d+)"
|
766
765
|
match = re.search(pattern, captured_text)
|
@@ -769,6 +768,9 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
769
768
|
numero_nota_fiscal = match.group(1)
|
770
769
|
|
771
770
|
|
771
|
+
app = Application().connect(title="Information", timeout=180)
|
772
|
+
main_window = app["Information"]
|
773
|
+
main_window.set_focus()
|
772
774
|
btn_ok = main_window.child_window(class_name="TButton", found_index=0)
|
773
775
|
btn_ok.click()
|
774
776
|
await worker_sleep(3)
|
@@ -819,17 +821,37 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
|
|
819
821
|
|
820
822
|
while i < max_attempts:
|
821
823
|
try:
|
822
|
-
app = Application().connect(class_name="TFrmProcessamentoFEe2", timeout=
|
824
|
+
app = Application().connect(class_name="TFrmProcessamentoFEe2", timeout=10)
|
823
825
|
main_window = app["TFrmProcessamentoFEe2"]
|
824
826
|
|
825
|
-
await worker_sleep(
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
827
|
+
await worker_sleep(5)
|
828
|
+
information_pop_up = await is_window_open_by_class("TMessageForm", "TMessageForm")
|
829
|
+
if information_pop_up["IsOpened"] == True:
|
830
|
+
msg_pop_up = await ocr_by_class(numero_nota_fiscal, "TMessageForm", "TMessageForm")
|
831
|
+
if msg_pop_up.sucesso:
|
832
|
+
if 'operação concl' in msg_pop_up or 'operacao concl' in msg_pop_up:
|
833
|
+
information_operacao_concluida = main_window.child_window(class_name="TMessageForm")
|
834
|
+
btn_ok = information_operacao_concluida.child_window(class_name="TButton")
|
835
|
+
btn_ok.click()
|
836
|
+
await worker_sleep(4)
|
837
|
+
main_window.close()
|
838
|
+
break
|
839
|
+
else:
|
840
|
+
retorno = f"Pop up nao mapeado para seguimento do robo {msg_pop_up} \nEtapas Executadas:\n{steps}"
|
841
|
+
return RpaRetornoProcessoDTO(
|
842
|
+
sucesso=False,
|
843
|
+
retorno=retorno,
|
844
|
+
status=RpaHistoricoStatusEnum.Falha,
|
845
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
846
|
+
)
|
847
|
+
else:
|
848
|
+
retorno = f"Não foi possivel realizar a confirmação do msg do OCR \nEtapas Executadas:\n{steps}"
|
849
|
+
return RpaRetornoProcessoDTO(
|
850
|
+
sucesso=False,
|
851
|
+
retorno=retorno,
|
852
|
+
status=RpaHistoricoStatusEnum.Falha,
|
853
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
854
|
+
)
|
833
855
|
except Exception as e:
|
834
856
|
pass
|
835
857
|
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/task_executor.py
RENAMED
@@ -36,6 +36,7 @@ async def perform_task(task: RpaProcessoEntradaDTO):
|
|
36
36
|
logger.info(log_msg)
|
37
37
|
task_uuid = task.uuidProcesso
|
38
38
|
url_retorno = task.configEntrada.get("urlRetorno", None)
|
39
|
+
identificador_webhook = task.configEntrada.get("identificador", None)
|
39
40
|
processo: RpaProcesso = await get_processo(task_uuid)
|
40
41
|
if processo is None:
|
41
42
|
worker_config = load_worker_config()
|
@@ -77,7 +78,10 @@ async def perform_task(task: RpaProcessoEntradaDTO):
|
|
77
78
|
show_toast("Sucesso", f"Processo executado com sucesso: {result}")
|
78
79
|
|
79
80
|
if url_retorno is not None and result.sucesso == False:
|
80
|
-
|
81
|
+
if identificador_webhook:
|
82
|
+
await send_to_webhook(url_retorno, result.status, result.retorno, identificador_webhook)
|
83
|
+
else:
|
84
|
+
await send_to_webhook(url_retorno, result.status, result.retorno)
|
81
85
|
return result
|
82
86
|
else:
|
83
87
|
err_msg = f"Processo não encontrado: {task_uuid}"
|
@@ -3437,6 +3437,60 @@ async def ocr_warnings(numero_nota: str)-> RpaRetornoProcessoDTO:
|
|
3437
3437
|
pass
|
3438
3438
|
|
3439
3439
|
|
3440
|
+
async def ocr_by_class(numero_nota: str, windows_class: str, app_class: str)-> RpaRetornoProcessoDTO:
|
3441
|
+
try:
|
3442
|
+
app = Application().connect(class_name=windows_class)
|
3443
|
+
main_window = app[app_class]
|
3444
|
+
main_window.set_focus()
|
3445
|
+
|
3446
|
+
console.print(f"Obtendo texto da Janela...\n")
|
3447
|
+
console.print(f"Tirando print da janela do warning para realização do OCR...\n")
|
3448
|
+
|
3449
|
+
window_rect = main_window.rectangle()
|
3450
|
+
screenshot = pyautogui.screenshot(
|
3451
|
+
region=(
|
3452
|
+
window_rect.left,
|
3453
|
+
window_rect.top,
|
3454
|
+
window_rect.width(),
|
3455
|
+
window_rect.height(),
|
3456
|
+
)
|
3457
|
+
)
|
3458
|
+
username = getpass.getuser()
|
3459
|
+
path_to_png = f"C:\\Users\\{username}\\Downloads\\ocr_bt_class_popup_{numero_nota}.png"
|
3460
|
+
screenshot.save(path_to_png)
|
3461
|
+
console.print(f"Print salvo em {path_to_png}...\n")
|
3462
|
+
|
3463
|
+
console.print(
|
3464
|
+
f"Preparando a imagem para maior resolução e assertividade no OCR...\n"
|
3465
|
+
)
|
3466
|
+
image = Image.open(path_to_png)
|
3467
|
+
image = image.convert("L")
|
3468
|
+
enhancer = ImageEnhance.Contrast(image)
|
3469
|
+
image = enhancer.enhance(2.0)
|
3470
|
+
image.save(path_to_png)
|
3471
|
+
console.print(f"Imagem preparada com sucesso...\n")
|
3472
|
+
console.print(f"Realizando OCR...\n")
|
3473
|
+
captured_text = pytesseract.image_to_string(Image.open(path_to_png))
|
3474
|
+
console.print(f"Texto Full capturado {captured_text}...\n")
|
3475
|
+
return RpaRetornoProcessoDTO(
|
3476
|
+
sucesso=True,
|
3477
|
+
retorno=captured_text,
|
3478
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
3479
|
+
)
|
3480
|
+
except Exception as e:
|
3481
|
+
return RpaRetornoProcessoDTO(
|
3482
|
+
sucesso=False,
|
3483
|
+
retorno=f"Erro ao realizar a extração do texto vinculado ao warning, erro - {e}",
|
3484
|
+
status=RpaHistoricoStatusEnum.Falha,
|
3485
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3486
|
+
)
|
3487
|
+
finally:
|
3488
|
+
try:
|
3489
|
+
os.remove(path_to_png)
|
3490
|
+
except:
|
3491
|
+
pass
|
3492
|
+
|
3493
|
+
|
3440
3494
|
async def nf_busca_nf_saida(num_nota_fiscal: str) -> RpaRetornoProcessoDTO:
|
3441
3495
|
try:
|
3442
3496
|
app = Application().connect(class_name="TFrmNotaFiscalSaida", timeout=60)
|
@@ -3590,32 +3644,77 @@ async def nf_devolucao_liquidar_cupom(num_nota_fiscal: str, data_atual: str) ->
|
|
3590
3644
|
liquidar_button.click_input()
|
3591
3645
|
|
3592
3646
|
await worker_sleep(3)
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3596
|
-
|
3647
|
+
i = 0
|
3648
|
+
max_attempts = 2
|
3649
|
+
while i <= max_attempts:
|
3650
|
+
confirm_pop_up = await is_window_open_by_class("TMessageForm","TMessageForm")
|
3651
|
+
if confirm_pop_up["IsOpened"] == True:
|
3652
|
+
capture_text_ocr = await ocr_by_class(num_nota_fiscal,"TMessageForm","TMessageForm")
|
3653
|
+
if capture_text_ocr.sucesso == True:
|
3654
|
+
msg_result = capture_text_ocr.retorno
|
3655
|
+
if "deseja realmente" in msg_result.lower():
|
3656
|
+
app_confirm = Application().connect(class_name="TMessageForm")
|
3657
|
+
main_window_confirm = app_confirm["TMessageForm"]
|
3658
|
+
|
3659
|
+
btn_yes = main_window_confirm["&Yes"]
|
3660
|
+
try:
|
3661
|
+
btn_yes.click()
|
3662
|
+
await worker_sleep(3)
|
3663
|
+
console.print("O botão Yes foi clicado com sucesso.", style="green")
|
3664
|
+
i = i+1
|
3665
|
+
#main_window.close()
|
3666
|
+
except:
|
3667
|
+
return RpaRetornoProcessoDTO(
|
3668
|
+
sucesso=False,
|
3669
|
+
retorno=f"Não foi possivel clicar em Yes durante para a confirmação da liquidação do titulo",
|
3670
|
+
status=RpaHistoricoStatusEnum.Falha,
|
3671
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3672
|
+
)
|
3673
|
+
elif "bloquear" in msg_result.lower():
|
3674
|
+
app_confirm = Application().connect(class_name="TMessageForm")
|
3675
|
+
main_window_confirm = app_confirm["TMessageForm"]
|
3597
3676
|
|
3598
|
-
|
3599
|
-
|
3600
|
-
|
3601
|
-
|
3602
|
-
|
3603
|
-
|
3604
|
-
|
3605
|
-
|
3606
|
-
|
3607
|
-
|
3608
|
-
|
3609
|
-
|
3610
|
-
|
3677
|
+
btn_yes = main_window_confirm["&No"]
|
3678
|
+
try:
|
3679
|
+
btn_yes.click()
|
3680
|
+
await worker_sleep(3)
|
3681
|
+
console.print("O botão Yes foi clicado com sucesso.", style="green")
|
3682
|
+
i = i+1
|
3683
|
+
except:
|
3684
|
+
return RpaRetornoProcessoDTO(
|
3685
|
+
sucesso=False,
|
3686
|
+
retorno=f"Não foi possivel clicar em Yes durante para a confirmação da liquidação do titulo",
|
3687
|
+
status=RpaHistoricoStatusEnum.Falha,
|
3688
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3689
|
+
)
|
3690
|
+
else:
|
3691
|
+
return RpaRetornoProcessoDTO(
|
3692
|
+
sucesso=False,
|
3693
|
+
retorno=f"POP não mapeado: {msg_result}",
|
3694
|
+
status=RpaHistoricoStatusEnum.Falha,
|
3695
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3696
|
+
)
|
3611
3697
|
|
3612
3698
|
console.print('Aguardando a confirmação de Liquidação realizado com sucesso')
|
3613
3699
|
try:
|
3614
3700
|
app = Application().connect(title="Informação", timeout=60)
|
3615
3701
|
main_window = app["Informação"]
|
3616
3702
|
main_window.set_focus()
|
3617
|
-
|
3618
|
-
|
3703
|
+
msg_pop_up = await ocr_by_class(num_nota_fiscal,"TMessageForm","TMessageForm")
|
3704
|
+
if msg_pop_up.sucesso == True:
|
3705
|
+
msg_result = msg_pop_up.retorno
|
3706
|
+
if "sucesso" in msg_result.lower():
|
3707
|
+
btn_ok = main_window.child_window(class_name="Button")
|
3708
|
+
btn_ok.click()
|
3709
|
+
pyautogui.press('enter')
|
3710
|
+
await worker_sleep(1)
|
3711
|
+
else:
|
3712
|
+
return RpaRetornoProcessoDTO(
|
3713
|
+
sucesso=False,
|
3714
|
+
retorno=f"Não foi possivel obter a confirmação de titulo liquidado com sucesso, pop_up nao mepeado: {msg_result}",
|
3715
|
+
status=RpaHistoricoStatusEnum.Falha,
|
3716
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3717
|
+
)
|
3619
3718
|
except Exception as e:
|
3620
3719
|
return RpaRetornoProcessoDTO(
|
3621
3720
|
sucesso=False,
|
@@ -3624,6 +3723,10 @@ async def nf_devolucao_liquidar_cupom(num_nota_fiscal: str, data_atual: str) ->
|
|
3624
3723
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
3625
3724
|
)
|
3626
3725
|
|
3726
|
+
|
3727
|
+
app = Application().connect(class_name="TFrmTituloReceber", timeout=60)
|
3728
|
+
main_window = app["TFrmTituloReceber"]
|
3729
|
+
main_window.set_focus()
|
3627
3730
|
console.print('Confirmando se o titulo alterou para Liquidado')
|
3628
3731
|
panel_TPage = main_window.child_window(class_name="TcxTreeView")
|
3629
3732
|
panel_TTabSheet = panel_TPage.child_window(class_name="TcxCustomInnerTreeView")
|
@@ -3638,6 +3741,9 @@ async def nf_devolucao_liquidar_cupom(num_nota_fiscal: str, data_atual: str) ->
|
|
3638
3741
|
|
3639
3742
|
if radio_liquidado.is_checked():
|
3640
3743
|
console.print("Botão 'Liquidado' está selecionado, seguindo com o processo...\n")
|
3744
|
+
app = Application().connect(class_name="TFrmTituloReceber", timeout=60)
|
3745
|
+
main_window = app["TFrmTituloReceber"]
|
3746
|
+
main_window.set_focus()
|
3641
3747
|
main_window.close()
|
3642
3748
|
else:
|
3643
3749
|
return RpaRetornoProcessoDTO(
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/api/rdp_service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/config/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/__init__.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_fila.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dao/rpa_robo.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/models/dto/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/tasks/jobs/__init__.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
|
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
|
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
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.53 → worker_automate_hub-0.5.55}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
File without changes
|
File without changes
|