worker-automate-hub 0.5.719__py3-none-any.whl → 0.5.720__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/api/client.py +4 -2
- worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +34 -14
- worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +10 -0
- worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +16 -0
- {worker_automate_hub-0.5.719.dist-info → worker_automate_hub-0.5.720.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.719.dist-info → worker_automate_hub-0.5.720.dist-info}/RECORD +8 -8
- {worker_automate_hub-0.5.719.dist-info → worker_automate_hub-0.5.720.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.719.dist-info → worker_automate_hub-0.5.720.dist-info}/entry_points.txt +0 -0
@@ -232,9 +232,10 @@ async def get_config_by_name(name: str) -> RpaConfiguracao:
|
|
232
232
|
|
233
233
|
try:
|
234
234
|
headers_basic = {"Authorization": f"Basic {env_config["API_AUTHORIZATION"]}"}
|
235
|
+
timeout = aiohttp.ClientTimeout(total=600)
|
235
236
|
|
236
237
|
async with aiohttp.ClientSession(
|
237
|
-
connector=aiohttp.TCPConnector(verify_ssl=True)
|
238
|
+
connector=aiohttp.TCPConnector(verify_ssl=True), timeout=timeout
|
238
239
|
) as session:
|
239
240
|
async with session.get(
|
240
241
|
f"{env_config["API_BASE_URL"]}/configuracao/api/{name}",
|
@@ -508,10 +509,11 @@ async def get_status_nf_emsys(chave: int):
|
|
508
509
|
url = f"{env_config['API_BASE_URL']}/emsys/consulta-status-nota?chaveNfe={chave}"
|
509
510
|
|
510
511
|
headers_basic = {"Authorization": f"Basic {env_config['API_AUTHORIZATION']}"}
|
512
|
+
timeout = aiohttp.ClientTimeout(total=600)
|
511
513
|
|
512
514
|
try:
|
513
515
|
async with aiohttp.ClientSession(
|
514
|
-
connector=aiohttp.TCPConnector(verify_ssl=True)
|
516
|
+
connector=aiohttp.TCPConnector(verify_ssl=True), timeout=timeout
|
515
517
|
) as session:
|
516
518
|
async with session.get(url, headers=headers_basic) as response:
|
517
519
|
if response.status != 200:
|
@@ -8,6 +8,7 @@ import uuid
|
|
8
8
|
import time
|
9
9
|
import win32clipboard
|
10
10
|
import difflib
|
11
|
+
|
11
12
|
# import sys
|
12
13
|
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..","..","..")))
|
13
14
|
import pyautogui
|
@@ -141,7 +142,7 @@ async def entrada_de_notas_15(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
141
142
|
class_name="TDBIComboBox", found_index=1
|
142
143
|
)
|
143
144
|
|
144
|
-
|
145
|
+
# Conectar à aplicação
|
145
146
|
app = Application(backend="win32").connect(title_re=".*Nota Fiscal.*")
|
146
147
|
|
147
148
|
# Acessar a janela
|
@@ -155,7 +156,6 @@ async def entrada_de_notas_15(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
155
156
|
|
156
157
|
print("Item selecionado com sucesso.")
|
157
158
|
|
158
|
-
|
159
159
|
await worker_sleep(4)
|
160
160
|
|
161
161
|
# Clica em 'Importar-Nfe'
|
@@ -533,30 +533,30 @@ async def entrada_de_notas_15(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
533
533
|
panel_TTabSheet.wait("visible")
|
534
534
|
panel_TTabSheet.click()
|
535
535
|
send_keys("{DOWN " + ("7") + "}")
|
536
|
-
|
536
|
+
|
537
537
|
await worker_sleep(5)
|
538
|
-
|
538
|
+
|
539
539
|
panel_TPage = main_window.child_window(class_name="TPage", title="Formulario")
|
540
540
|
panel_TTabSheet = panel_TPage.child_window(class_name="TPageControl")
|
541
541
|
|
542
542
|
panel_TabPagamento = panel_TTabSheet.child_window(class_name="TTabSheet")
|
543
|
-
#check if have restante
|
543
|
+
# check if have restante
|
544
544
|
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
545
|
-
panel_nf = app[
|
545
|
+
panel_nf = app["TFrmNotaFiscalEntrada"]
|
546
546
|
remove_btn = panel_nf.child_window(class_name="TDBIBitBtn", found_index=0)
|
547
|
-
if remove_btn.exists() and remove_btn.is_enabled():
|
547
|
+
if remove_btn.exists() and remove_btn.is_enabled():
|
548
548
|
remove_btn.click()
|
549
549
|
else:
|
550
550
|
print("Botão de exclusão não encontrado ou desabilitado.")
|
551
551
|
try:
|
552
|
-
#Confirm screen to remove actual value and expiration date
|
552
|
+
# Confirm screen to remove actual value and expiration date
|
553
553
|
app = Application().connect(class_name="TMessageForm")
|
554
|
-
panel_confirm = app[
|
554
|
+
panel_confirm = app["TMessageForm"]
|
555
555
|
await worker_sleep(1)
|
556
556
|
panel_confirm.child_window(class_name="TButton", found_index=1).click()
|
557
557
|
except:
|
558
558
|
console.print("Sem tela de confirmação")
|
559
|
-
|
559
|
+
|
560
560
|
# panel_TabPagamentoCaixa = panel_TTabSheet.child_window(
|
561
561
|
# title="Pagamento Pelo Caixa"
|
562
562
|
# )
|
@@ -567,17 +567,21 @@ async def entrada_de_notas_15(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
567
567
|
# console.print(f"Selecionando a Especie de Caixa... \n")
|
568
568
|
# tipo_cobranca.click()
|
569
569
|
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
570
|
-
panel_tab_pagamento = app[
|
570
|
+
panel_tab_pagamento = app["TFrmNotaFiscalEntrada"]
|
571
571
|
try:
|
572
572
|
# set_combobox("||List", "BANCO DO BRASIL BOLETO")
|
573
|
-
panel_tab_pagamento.child_window(
|
573
|
+
panel_tab_pagamento.child_window(
|
574
|
+
class_name="TDBIComboBox", found_index=0
|
575
|
+
).select("BANCO DO BRASIL BOLETO")
|
574
576
|
except:
|
575
577
|
# set_combobox("||List", "BOLETO")
|
576
|
-
panel_tab_pagamento.child_window(
|
578
|
+
panel_tab_pagamento.child_window(
|
579
|
+
class_name="TDBIComboBox", found_index=0
|
580
|
+
).select("BOLETO")
|
577
581
|
|
578
582
|
valor_str = nota.get("valorNota")
|
579
583
|
if valor_str:
|
580
|
-
valor_str = valor_str.replace(
|
584
|
+
valor_str = valor_str.replace(",", ".")
|
581
585
|
else:
|
582
586
|
valor_str = None
|
583
587
|
|
@@ -651,6 +655,22 @@ async def entrada_de_notas_15(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
651
655
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
652
656
|
await worker_sleep(5)
|
653
657
|
i += 1
|
658
|
+
nf_imported = await check_nota_importada(nota.get("nfe"))
|
659
|
+
console.print("\Consultando se a nota ja foi lançada...")
|
660
|
+
try:
|
661
|
+
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
662
|
+
if status_nf_emsys.get("status") == "Lançada":
|
663
|
+
console.print(
|
664
|
+
"\nNota lançada com sucesso, processo finalizado...",
|
665
|
+
style="bold green",
|
666
|
+
)
|
667
|
+
return RpaRetornoProcessoDTO(
|
668
|
+
sucesso=True,
|
669
|
+
retorno="Nota Lançada com sucesso!",
|
670
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
671
|
+
)
|
672
|
+
except:
|
673
|
+
pass
|
654
674
|
|
655
675
|
await worker_sleep(20)
|
656
676
|
console.print("\nVerifica se a nota ja foi lançada...")
|
@@ -774,6 +774,16 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
774
774
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
775
775
|
await worker_sleep(5)
|
776
776
|
i += 1
|
777
|
+
nf_imported = await check_nota_importada(nota.get("nfe"))
|
778
|
+
console.print("\Consultando se a nota ja foi lançada...")
|
779
|
+
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
780
|
+
if status_nf_emsys.get("status") == "Lançada":
|
781
|
+
console.print("\nNota lançada com sucesso, processo finalizado...", style="bold green")
|
782
|
+
return RpaRetornoProcessoDTO(
|
783
|
+
sucesso=True,
|
784
|
+
retorno="Nota Lançada com sucesso!",
|
785
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
786
|
+
)
|
777
787
|
|
778
788
|
information_pop_up = await is_window_open("Information")
|
779
789
|
|
@@ -987,6 +987,22 @@ async def entrada_de_notas_503(task: RpaProcessoEntradaDTO) -> RpaRetornoProcess
|
|
987
987
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
988
988
|
await worker_sleep(5)
|
989
989
|
i += 1
|
990
|
+
nf_imported = await check_nota_importada(nota.get("nfe"))
|
991
|
+
console.print("\Consultando se a nota ja foi lançada...")
|
992
|
+
try:
|
993
|
+
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
994
|
+
if status_nf_emsys.get("status") == "Lançada":
|
995
|
+
console.print(
|
996
|
+
"\nNota lançada com sucesso, processo finalizado...",
|
997
|
+
style="bold green",
|
998
|
+
)
|
999
|
+
return RpaRetornoProcessoDTO(
|
1000
|
+
sucesso=True,
|
1001
|
+
retorno="Nota Lançada com sucesso!",
|
1002
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
1003
|
+
)
|
1004
|
+
except:
|
1005
|
+
pass
|
990
1006
|
|
991
1007
|
await worker_sleep(15)
|
992
1008
|
console.print("\nVerifica se a nota ja foi lançada...")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
worker_automate_hub/__init__.py,sha256=LV28uQvBfpPIqudGIMJmVB8E941MjXHcu8DMoX5n8AM,25
|
2
2
|
worker_automate_hub/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
worker_automate_hub/api/ahead_service.py,sha256=QbNrZf9q7fS0s-S5fZVytqC7dINi9u2f6aB6SDrGVVA,2231
|
4
|
-
worker_automate_hub/api/client.py,sha256=
|
4
|
+
worker_automate_hub/api/client.py,sha256=evBsq_CURD_tWgZC1XqTLxWPerPSuEpS89KHD4i2VJA,25787
|
5
5
|
worker_automate_hub/api/datalake_service.py,sha256=qw_N_OOgDKDuPbI-fdYkWWTlT4CUtFTl0VVlZ0fLM-M,3001
|
6
6
|
worker_automate_hub/api/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
worker_automate_hub/api/helpers/api_helpers.py,sha256=SkheO2fXexeh-a4shr8Qzsz_kZhuSG0DJ7kbODctRbM,3696
|
@@ -53,8 +53,8 @@ worker_automate_hub/tasks/jobs/ecac_estadual_sp.py,sha256=AqSsn0SlK_nok4AhMCNUlA
|
|
53
53
|
worker_automate_hub/tasks/jobs/ecac_federal.py,sha256=VFOrbMuMHL3ac1sJ-z-N1p1WYtP-e-JJHbvUfgmfgNw,55748
|
54
54
|
worker_automate_hub/tasks/jobs/entrada_cte_1353.py,sha256=knwPbjZZsnvHKurs7O7gv7bFpQIAmv4qPB1rZa3zBsY,12102
|
55
55
|
worker_automate_hub/tasks/jobs/entrada_cte_333.py,sha256=FvpU_bsdPB2ANQ_i63Jlkdo5yZM4zJdr2mm41KTrJtE,13285
|
56
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_15.py,sha256=
|
57
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256
|
56
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_15.py,sha256=CCNV_6O0ORbxYq0Ing0aTIzk8tQbbyFZg7i-bS4h4Ns,30634
|
57
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=-L2y681Y-RYqzLMhdGpao7CHq4SdLTZKe0JV0k2IYPA,38322
|
58
58
|
worker_automate_hub/tasks/jobs/entrada_de_notas_207.py,sha256=A5HM2Eh2bGZueVefnQL9KiCWW95j8zX1v2MslgbDcUE,36871
|
59
59
|
worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=lku233FqwOknXF14HHC6fZ75WubE69Jp32bAUhKPtGQ,34575
|
60
60
|
worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=ODp82BkWaiF40t6uZLJYxG2nGGnvDyeQBHhkkh9ZgPI,35994
|
@@ -62,7 +62,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_34.py,sha256=AXUL8DakrDeTxWW8dn3
|
|
62
62
|
worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=z494n0SUyxorjhvpbat2ELnj7lbhtWPb9JOIsattwA8,35216
|
63
63
|
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=whsK_TfNZSmzt0PNHnVi0q4OIxzfKiR5nGuB9WfEYeI,47071
|
64
64
|
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=WBsCRbH7ANiCjEn0aEDc5AqGf6grEFhxyBoAIh3zJ40,44160
|
65
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_503.py,sha256=
|
65
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_503.py,sha256=q4_PeGrMqMs1EzBp7hGtpAuteqmvzDg-Q796pTlF8KI,47395
|
66
66
|
worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=xXeNipdXTSll8yAtAmN7v0sjN3oMlWU4THu30mKDddc,30339
|
67
67
|
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=Y20hsr46YbfkHPaSdC7pAgODMbfHyIAUg-NzCODWL78,37089
|
68
68
|
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=ZYE2YmQJ9954Uuc9fiSykGi0ws_NPXs8ex244y20P44,64642
|
@@ -98,7 +98,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
98
98
|
worker_automate_hub/utils/util.py,sha256=WooEK9h7xOwg_Z2g_SEFa7iJ7MbzQUzKcJBHCheKBUs,206793
|
99
99
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=ERqMuyL7yf3ID5P6vHyFNh7N5LqNRduUKLY8069Oabo,37958
|
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.720.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
102
|
+
worker_automate_hub-0.5.720.dist-info/METADATA,sha256=rHuQjY1xuymP_he-UKNSorgLWFp2R8f6rjyCn9YqX-A,3049
|
103
|
+
worker_automate_hub-0.5.720.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
104
|
+
worker_automate_hub-0.5.720.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.719.dist-info → worker_automate_hub-0.5.720.dist-info}/entry_points.txt
RENAMED
File without changes
|