worker-automate-hub 0.4.410__tar.gz → 0.4.411__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/PKG-INFO +1 -1
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/pyproject.toml +1 -1
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +31 -116
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/README.md +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/worker.py +0 -0
@@ -640,20 +640,20 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
640
640
|
main_window.set_focus()
|
641
641
|
|
642
642
|
select_box_nop_select = main_window.child_window(class_name="TDBIComboBox", found_index=0)
|
643
|
-
|
643
|
+
select_box_nop_select.click()
|
644
|
+
nop_value = "1152 - ENTRADAS P/ TRANSFERENCIAS DE MERCADORIA- 1.152"
|
645
|
+
await worker_sleep(2)
|
646
|
+
set_combobox("||List", nop_value)
|
647
|
+
await worker_sleep(1)
|
648
|
+
pyautogui.press('down')
|
644
649
|
|
650
|
+
nop_selected = select_box_nop_select.window_text()
|
645
651
|
if '1152' in nop_selected:
|
646
652
|
console.print(f"NOP selecionada corretamente, {nop_selected} ...\n")
|
647
653
|
else:
|
648
|
-
|
649
|
-
select_box_nop_select.click()
|
650
|
-
except:
|
651
|
-
pyautogui.click(618, 330)
|
652
|
-
|
653
|
-
await worker_sleep(2)
|
654
|
-
nop_value = "1152 - ENTRADAS P/ TRANSFERENCIAS DE MERCADORIA- 1.152"
|
654
|
+
select_box_nop_select.click()
|
655
655
|
console.print(f"Inserindo a informação da NOP: {nop_value} ...\n")
|
656
|
-
await worker_sleep(
|
656
|
+
await worker_sleep(2)
|
657
657
|
set_combobox("||List", nop_value)
|
658
658
|
await worker_sleep(2)
|
659
659
|
pyautogui.hotkey("enter")
|
@@ -668,37 +668,14 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
668
668
|
else:
|
669
669
|
return RpaRetornoProcessoDTO(
|
670
670
|
sucesso=False,
|
671
|
-
retorno=f"Erro
|
671
|
+
retorno=f"Erro não foi possivel selecionar NOP correta, NOP selecionada: {nop_selected}",
|
672
672
|
status=RpaHistoricoStatusEnum.Falha,
|
673
673
|
)
|
674
|
-
|
675
|
-
|
674
|
+
console.print(f"Clicando para incluir a nota...\n")
|
675
|
+
pyautogui.click(593, 297)
|
676
|
+
await worker_sleep(40)
|
676
677
|
await emsys.verify_warning_and_error("Aviso", "OK")
|
677
|
-
|
678
|
-
retorno = await verify_nf_incuded()
|
679
|
-
await worker_sleep(60)
|
680
|
-
|
681
|
-
console.print("\nVerifica se a nota ja foi lançada...")
|
682
|
-
nf_chave_acesso = int(nota.get("nfe"))
|
683
|
-
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
684
|
-
if status_nf_emsys.get("status") != "Lançada":
|
685
|
-
return RpaRetornoProcessoDTO(
|
686
|
-
sucesso=False,
|
687
|
-
retorno=f"Erro na validação de CFOP, foi encontrado mais de uma opção com a mesma informação",
|
688
|
-
status=RpaHistoricoStatusEnum.Falha,
|
689
|
-
)
|
690
|
-
|
691
|
-
except Exception as e:
|
692
|
-
return RpaRetornoProcessoDTO(
|
693
|
-
sucesso=False,
|
694
|
-
retorno=f"Erro ao alterar o NOP, erro {e}",
|
695
|
-
status=RpaHistoricoStatusEnum.Falha,
|
696
|
-
)
|
697
|
-
|
698
|
-
await worker_sleep(3)
|
699
|
-
retorno = False
|
700
|
-
try:
|
701
|
-
max_attempts = 60
|
678
|
+
max_attempts = 50
|
702
679
|
i = 0
|
703
680
|
|
704
681
|
while i < max_attempts:
|
@@ -709,92 +686,30 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
709
686
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
710
687
|
await worker_sleep(4)
|
711
688
|
i += 1
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
console.print(f"Tirando print da janela do Information para realização do OCR...\n")
|
723
|
-
|
724
|
-
window_rect = main_window.rectangle()
|
725
|
-
screenshot = pyautogui.screenshot(
|
726
|
-
region=(
|
727
|
-
window_rect.left,
|
728
|
-
window_rect.top,
|
729
|
-
window_rect.width(),
|
730
|
-
window_rect.height(),
|
731
|
-
)
|
732
|
-
)
|
733
|
-
username = getpass.getuser()
|
734
|
-
path_to_png = f"C:\\Users\\{username}\\Downloads\\information_popup_{nota.get("nfe")}.png"
|
735
|
-
screenshot.save(path_to_png)
|
736
|
-
console.print(f"Print salvo em {path_to_png}...\n")
|
737
|
-
|
738
|
-
console.print(
|
739
|
-
f"Preparando a imagem para maior resolução e assertividade no OCR...\n"
|
740
|
-
)
|
741
|
-
image = Image.open(path_to_png)
|
742
|
-
image = image.convert("L")
|
743
|
-
enhancer = ImageEnhance.Contrast(image)
|
744
|
-
image = enhancer.enhance(2.0)
|
745
|
-
image.save(path_to_png)
|
746
|
-
console.print(f"Imagem preparada com sucesso...\n")
|
747
|
-
console.print(f"Realizando OCR...\n")
|
748
|
-
captured_text = pytesseract.image_to_string(Image.open(path_to_png))
|
749
|
-
console.print(
|
750
|
-
f"Texto Full capturado {captured_text}...\n"
|
689
|
+
|
690
|
+
await worker_sleep(15)
|
691
|
+
console.print("\nVerifica se a nota ja foi lançada...")
|
692
|
+
nf_chave_acesso = int(nota.get("nfe"))
|
693
|
+
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
694
|
+
if status_nf_emsys.get("status") != "Lançada":
|
695
|
+
return RpaRetornoProcessoDTO(
|
696
|
+
sucesso=False,
|
697
|
+
retorno=f"Erro na validação de CFOP, foi encontrado mais de uma opção com a mesma informação",
|
698
|
+
status=RpaHistoricoStatusEnum.Falha,
|
751
699
|
)
|
752
|
-
os.remove(path_to_png)
|
753
|
-
if 'nota fiscal inc' in captured_text.lower():
|
754
|
-
console.print(f"Tentando clicar no Botão OK...\n")
|
755
|
-
btn_ok = main_window.child_window(class_name="TButton")
|
756
|
-
|
757
|
-
if btn_ok.exists():
|
758
|
-
btn_ok.click()
|
759
|
-
retorno = True
|
760
|
-
else:
|
761
|
-
return RpaRetornoProcessoDTO(
|
762
|
-
sucesso=False,
|
763
|
-
retorno=f"Pop_up Informantion não mapeado para andamento do robô, mensagem {captured_text}",
|
764
|
-
status=RpaHistoricoStatusEnum.Falha,
|
765
|
-
)
|
766
700
|
else:
|
767
|
-
|
768
|
-
print("romero brito?")
|
769
|
-
retorno = await verify_nf_incuded()
|
770
|
-
|
771
|
-
except Exception as e:
|
772
|
-
console.print(f"Erro ao conectar à janela Information: {e}\n")
|
773
|
-
return RpaRetornoProcessoDTO(
|
774
|
-
sucesso=False,
|
775
|
-
retorno=f"Erro em obter o retorno, Nota inserida com sucesso, erro {e}",
|
776
|
-
status=RpaHistoricoStatusEnum.Falha,
|
777
|
-
)
|
778
|
-
|
779
|
-
await emsys.verify_warning_and_error("Aviso", "OK")
|
780
|
-
await emsys.verify_warning_and_error("Aviso", "&OK")
|
781
|
-
|
782
|
-
if retorno:
|
783
|
-
console.print("\nNota lançada com sucesso...", style="bold green")
|
784
|
-
await worker_sleep(6)
|
785
|
-
return RpaRetornoProcessoDTO(
|
701
|
+
return RpaRetornoProcessoDTO(
|
786
702
|
sucesso=True,
|
787
703
|
retorno="Nota Lançada com sucesso!",
|
788
704
|
status=RpaHistoricoStatusEnum.Sucesso,
|
789
705
|
)
|
790
|
-
else:
|
791
|
-
console.print("Erro ao lançar nota", style="bold red")
|
792
|
-
return RpaRetornoProcessoDTO(
|
793
|
-
sucesso=False,
|
794
|
-
retorno=f"Erro ao lançar nota",
|
795
|
-
status=RpaHistoricoStatusEnum.Falha,
|
796
|
-
)
|
797
706
|
|
707
|
+
except Exception as e:
|
708
|
+
return RpaRetornoProcessoDTO(
|
709
|
+
sucesso=False,
|
710
|
+
retorno=f"Erro ao alterar o NOP, erro {e}",
|
711
|
+
status=RpaHistoricoStatusEnum.Falha,
|
712
|
+
)
|
798
713
|
except Exception as ex:
|
799
714
|
observacao = f"Erro Processo Entrada de Notas: {str(ex)}"
|
800
715
|
logger.error(observacao)
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/api/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/config/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/models/__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
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/tasks/__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
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.410 → worker_automate_hub-0.4.411}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|