worker-automate-hub 0.5.16__py3-none-any.whl → 0.5.18__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/coleta_dje_process.py +12 -0
- worker_automate_hub/tasks/jobs/conexao_rdp.py +4 -4
- worker_automate_hub/tasks/jobs/descartes.py +21 -18
- worker_automate_hub/tasks/jobs/ecac_estadual_go.py +8 -6
- worker_automate_hub/tasks/jobs/ecac_estadual_main.py +4 -2
- worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +8 -6
- worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +5 -3
- worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +9 -7
- worker_automate_hub/tasks/jobs/ecac_federal.py +11 -8
- worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +14 -12
- worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +19 -11
- worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +23 -11
- worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +63 -32
- worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +56 -28
- worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +54 -38
- worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +35 -21
- worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +53 -28
- worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +40 -14
- worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +28 -14
- worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +18 -12
- worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +40 -13
- worker_automate_hub/tasks/jobs/exemplo_processo.py +3 -0
- worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +3 -3
- worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +9 -7
- worker_automate_hub/tasks/jobs/login_emsys.py +2 -1
- worker_automate_hub/tasks/jobs/playground.py +4 -0
- worker_automate_hub/tasks/jobs/sped_fiscal.py +24 -0
- worker_automate_hub/tasks/jobs/transferencias.py +28 -26
- worker_automate_hub/tasks/task_executor.py +3 -0
- worker_automate_hub/utils/util.py +148 -141
- worker_automate_hub/utils/utils_nfe_entrada.py +10 -0
- {worker_automate_hub-0.5.16.dist-info → worker_automate_hub-0.5.18.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.16.dist-info → worker_automate_hub-0.5.18.dist-info}/RECORD +35 -35
- {worker_automate_hub-0.5.16.dist-info → worker_automate_hub-0.5.18.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.16.dist-info → worker_automate_hub-0.5.18.dist-info}/entry_points.txt +0 -0
@@ -11,6 +11,8 @@ from worker_automate_hub.api.client import get_config_by_name
|
|
11
11
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
12
12
|
RpaHistoricoStatusEnum,
|
13
13
|
RpaRetornoProcessoDTO,
|
14
|
+
RpaTagDTO,
|
15
|
+
RpaTagEnum,
|
14
16
|
)
|
15
17
|
from worker_automate_hub.models.dto.rpa_processo_entrada_dto import (
|
16
18
|
RpaProcessoEntradaDTO,
|
@@ -249,7 +251,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
249
251
|
return RpaRetornoProcessoDTO(
|
250
252
|
sucesso=False,
|
251
253
|
retorno=log_msg,
|
252
|
-
status=RpaHistoricoStatusEnum.Falha,
|
254
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
253
255
|
)
|
254
256
|
|
255
257
|
await worker_sleep(2)
|
@@ -276,7 +278,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
276
278
|
valor_nota,
|
277
279
|
)
|
278
280
|
return RpaRetornoProcessoDTO(
|
279
|
-
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha
|
281
|
+
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
280
282
|
)
|
281
283
|
await worker_sleep(3)
|
282
284
|
|
@@ -310,7 +312,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
310
312
|
valor_nota,
|
311
313
|
)
|
312
314
|
return RpaRetornoProcessoDTO(
|
313
|
-
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha
|
315
|
+
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
314
316
|
)
|
315
317
|
|
316
318
|
# Segue para o campo do item
|
@@ -354,7 +356,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
354
356
|
return RpaRetornoProcessoDTO(
|
355
357
|
sucesso=False,
|
356
358
|
retorno=observacao,
|
357
|
-
status=RpaHistoricoStatusEnum.Falha,
|
359
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
358
360
|
)
|
359
361
|
|
360
362
|
# Checa se existe alerta de item sem preço, se existir retorna erro(simplifica e bof)
|
@@ -377,7 +379,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
377
379
|
return RpaRetornoProcessoDTO(
|
378
380
|
sucesso=False,
|
379
381
|
retorno=observacao,
|
380
|
-
status=RpaHistoricoStatusEnum.Falha,
|
382
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
381
383
|
)
|
382
384
|
|
383
385
|
screenshot_path = take_screenshot()
|
@@ -407,7 +409,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
407
409
|
return RpaRetornoProcessoDTO(
|
408
410
|
sucesso=False,
|
409
411
|
retorno=error,
|
410
|
-
status=RpaHistoricoStatusEnum.Falha,
|
412
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
411
413
|
)
|
412
414
|
|
413
415
|
try:
|
@@ -441,7 +443,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
441
443
|
return RpaRetornoProcessoDTO(
|
442
444
|
sucesso=False,
|
443
445
|
retorno=error,
|
444
|
-
status=RpaHistoricoStatusEnum.Falha,
|
446
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
445
447
|
)
|
446
448
|
|
447
449
|
# Verifica se o saldo disponivel é valido para descartar
|
@@ -467,7 +469,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
467
469
|
)
|
468
470
|
console.print(log_msg, style="bold red")
|
469
471
|
return RpaRetornoProcessoDTO(
|
470
|
-
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha
|
472
|
+
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
471
473
|
)
|
472
474
|
|
473
475
|
# Clica em incluir para adicionar o item na nota
|
@@ -493,7 +495,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
493
495
|
return RpaRetornoProcessoDTO(
|
494
496
|
sucesso=False,
|
495
497
|
retorno=log_msg,
|
496
|
-
status=RpaHistoricoStatusEnum.Falha,
|
498
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
497
499
|
)
|
498
500
|
|
499
501
|
try:
|
@@ -516,7 +518,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
516
518
|
return RpaRetornoProcessoDTO(
|
517
519
|
sucesso=False,
|
518
520
|
retorno=log_msg,
|
519
|
-
status=RpaHistoricoStatusEnum.Falha,
|
521
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
|
520
522
|
)
|
521
523
|
except:
|
522
524
|
console.log(
|
@@ -569,7 +571,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
569
571
|
)
|
570
572
|
console.print(log_msg, style="bold red")
|
571
573
|
return RpaRetornoProcessoDTO(
|
572
|
-
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha
|
574
|
+
sucesso=False, retorno=log_msg, status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
573
575
|
)
|
574
576
|
|
575
577
|
await worker_sleep(5)
|
@@ -599,7 +601,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
599
601
|
return RpaRetornoProcessoDTO(
|
600
602
|
sucesso=False,
|
601
603
|
retorno=log_msg,
|
602
|
-
status=RpaHistoricoStatusEnum.Falha,
|
604
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
603
605
|
)
|
604
606
|
|
605
607
|
await worker_sleep(8)
|
@@ -630,7 +632,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
630
632
|
return RpaRetornoProcessoDTO(
|
631
633
|
sucesso=False,
|
632
634
|
retorno=f"Falha ao clicar no botão OK de pré-venda incluída: {e}",
|
633
|
-
status=RpaHistoricoStatusEnum.Falha,
|
635
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
634
636
|
)
|
635
637
|
else:
|
636
638
|
|
@@ -640,7 +642,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
640
642
|
return RpaRetornoProcessoDTO(
|
641
643
|
sucesso=False,
|
642
644
|
retorno="O Botão OK de pré-venda incluída não foi encontrado.",
|
643
|
-
status=RpaHistoricoStatusEnum.Falha,
|
645
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
644
646
|
)
|
645
647
|
|
646
648
|
except Exception as e:
|
@@ -650,7 +652,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
650
652
|
return RpaRetornoProcessoDTO(
|
651
653
|
sucesso=False,
|
652
654
|
retorno=f"O Botão OK de pré-venda incluída não foi encontrado: {e}",
|
653
|
-
status=RpaHistoricoStatusEnum.Falha,
|
655
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
654
656
|
)
|
655
657
|
|
656
658
|
await worker_sleep(5)
|
@@ -680,7 +682,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
680
682
|
return RpaRetornoProcessoDTO(
|
681
683
|
sucesso=False,
|
682
684
|
retorno=f"Falha ao clicar no botão YES de pesquisa pré-venda incluída: {e}",
|
683
|
-
status=RpaHistoricoStatusEnum.Falha,
|
685
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
684
686
|
)
|
685
687
|
else:
|
686
688
|
|
@@ -690,7 +692,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
690
692
|
return RpaRetornoProcessoDTO(
|
691
693
|
sucesso=False,
|
692
694
|
retorno="O Botão YES de pesquisa pré-venda incluída não foi encontrado.",
|
693
|
-
status=RpaHistoricoStatusEnum.Falha,
|
695
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
694
696
|
)
|
695
697
|
|
696
698
|
except Exception as e:
|
@@ -700,7 +702,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
700
702
|
return RpaRetornoProcessoDTO(
|
701
703
|
sucesso=False,
|
702
704
|
retorno=f"O Botão YES de pesquisa pré-venda incluída não foi encontrado: {e}",
|
703
|
-
status=RpaHistoricoStatusEnum.Falha,
|
705
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
704
706
|
)
|
705
707
|
|
706
708
|
|
@@ -723,7 +725,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
723
725
|
return RpaRetornoProcessoDTO(
|
724
726
|
sucesso=False,
|
725
727
|
retorno=f"Falha ao clicar no botão 'Confirma': {e}",
|
726
|
-
status=RpaHistoricoStatusEnum.Falha,
|
728
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
727
729
|
)
|
728
730
|
# pyautogui.moveTo(1200, 300)
|
729
731
|
await worker_sleep(5)
|
@@ -741,13 +743,13 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
741
743
|
return RpaRetornoProcessoDTO(
|
742
744
|
sucesso=False,
|
743
745
|
retorno=log_msg,
|
744
|
-
status=RpaHistoricoStatusEnum.Falha,
|
746
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
745
747
|
)
|
746
748
|
except Exception as e:
|
747
749
|
return RpaRetornoProcessoDTO(
|
748
750
|
sucesso=False,
|
749
751
|
retorno=f"Falha ao confirmar pre venda: {e}",
|
750
|
-
status=RpaHistoricoStatusEnum.Falha,
|
752
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
751
753
|
)
|
752
754
|
await worker_sleep(5)
|
753
755
|
try:
|
@@ -762,14 +764,14 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
762
764
|
return RpaRetornoProcessoDTO(
|
763
765
|
sucesso=False,
|
764
766
|
retorno=log_msg,
|
765
|
-
status=RpaHistoricoStatusEnum.Falha,
|
767
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
766
768
|
)
|
767
769
|
except Exception as e:
|
768
770
|
log_msg = f"Tela de pré-venda confirmada nao encontrada"
|
769
771
|
return RpaRetornoProcessoDTO(
|
770
772
|
sucesso=False,
|
771
773
|
retorno=log_msg,
|
772
|
-
status=RpaHistoricoStatusEnum.Falha,
|
774
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
773
775
|
)
|
774
776
|
# screenshot_path = take_screenshot()
|
775
777
|
# message_confirma_transferencia = take_target_position(
|
@@ -833,7 +835,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
833
835
|
return RpaRetornoProcessoDTO(
|
834
836
|
sucesso=False,
|
835
837
|
retorno=retorno.get("retorno"),
|
836
|
-
status=RpaHistoricoStatusEnum.Falha,
|
838
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
837
839
|
)
|
838
840
|
|
839
841
|
# Extraindo nota fiscal
|
@@ -884,7 +886,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
884
886
|
return RpaRetornoProcessoDTO(
|
885
887
|
sucesso=False,
|
886
888
|
retorno=log_msg,
|
887
|
-
status=RpaHistoricoStatusEnum.Falha,
|
889
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
888
890
|
)
|
889
891
|
|
890
892
|
except Exception as ex:
|
@@ -902,5 +904,5 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
902
904
|
return RpaRetornoProcessoDTO(
|
903
905
|
sucesso=False,
|
904
906
|
retorno=log_msg,
|
905
|
-
status=RpaHistoricoStatusEnum.Falha,
|
907
|
+
status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
|
906
908
|
)
|
@@ -14,6 +14,8 @@ from worker_automate_hub.models.dao.rpa_processo import RpaProcesso
|
|
14
14
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
15
15
|
RpaHistoricoStatusEnum,
|
16
16
|
RpaRetornoProcessoDTO,
|
17
|
+
RpaTagDTO,
|
18
|
+
RpaTagEnum,
|
17
19
|
)
|
18
20
|
from worker_automate_hub.models.dto.rpa_processo_entrada_dto import (
|
19
21
|
RpaProcessoEntradaDTO,
|
@@ -91,6 +93,7 @@ async def perform_task(task: RpaProcessoEntradaDTO):
|
|
91
93
|
sucesso=False,
|
92
94
|
retorno=err_msg,
|
93
95
|
status=RpaHistoricoStatusEnum.Descartado,
|
96
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
94
97
|
),
|
95
98
|
processo=processo,
|
96
99
|
)
|