worker-automate-hub 0.4.360__tar.gz → 0.4.362__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/PKG-INFO +1 -1
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/pyproject.toml +1 -1
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/sped_fiscal.py +32 -75
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/README.md +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/worker.py +0 -0
@@ -237,7 +237,7 @@ async def sped_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
237
237
|
await worker_sleep(5)
|
238
238
|
console.print(f"Verificando sem possui o pop-up de Registro de Entrada... \n")
|
239
239
|
registro_entrada_pop_up_class = await is_window_open_by_class("TMsgBox", "TMsgBox")
|
240
|
-
if registro_entrada_pop_up_class == True:
|
240
|
+
if registro_entrada_pop_up_class["IsOpened"] == True:
|
241
241
|
console.print(f"Pop-up existe, clicando em Sim... \n")
|
242
242
|
app = Application(backend="win32").connect(class_name="TMsgBox", timeout=30)
|
243
243
|
main_window = app["TMsgBox"]
|
@@ -379,7 +379,7 @@ async def sped_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
379
379
|
|
380
380
|
while i < max_attempts:
|
381
381
|
information_pop_up_class = await is_window_open_by_class("TMsgBox", "TMsgBox")
|
382
|
-
if information_pop_up_class == True:
|
382
|
+
if information_pop_up_class["IsOpened"] == True:
|
383
383
|
break
|
384
384
|
else:
|
385
385
|
console.print(f"Aguardando confirmação de sped finalizado...\n")
|
@@ -393,91 +393,48 @@ async def sped_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
393
393
|
status=RpaHistoricoStatusEnum.Falha,
|
394
394
|
)
|
395
395
|
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
window_rect = main_window.rectangle()
|
405
|
-
screenshot = pyautogui.screenshot(
|
406
|
-
region=(
|
407
|
-
window_rect.left,
|
408
|
-
window_rect.top,
|
409
|
-
window_rect.width(),
|
410
|
-
window_rect.height(),
|
411
|
-
)
|
412
|
-
)
|
413
|
-
username = getpass.getuser()
|
414
|
-
path_to_png = f"C:\\Users\\{username}\\Downloads\\information_popup_{short_uuid}_{filial_cod}.png"
|
415
|
-
screenshot.save(path_to_png)
|
416
|
-
console.print(f"Print salvo em {path_to_png}...\n")
|
396
|
+
|
397
|
+
console.print("\nArquivo do SPED gerado com sucesso...", style="bold green")
|
398
|
+
console.log("Realizando o envio para o Backoffice...\n")
|
399
|
+
file_bytes = ""
|
400
|
+
with open(temp_path_to_txt, 'rb') as file:
|
401
|
+
file_bytes = file.read()
|
402
|
+
await worker_sleep(6)
|
403
|
+
|
417
404
|
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
await worker_sleep(6)
|
436
|
-
|
437
|
-
console.log("Realizando o envio para o Backoffice...\n")
|
438
|
-
file_bytes = ""
|
439
|
-
with open(temp_path_to_txt, 'rb') as file:
|
440
|
-
file_bytes = file.read()
|
441
|
-
|
442
|
-
|
443
|
-
get_historico = get_historico_by_processo_identificador(filial_cod, task.nomProcesso)
|
444
|
-
if get_historico["sucesso"] == True:
|
445
|
-
data = get_historico["retorno"]
|
446
|
-
id_historico = data[0]['uuidHistorico']
|
447
|
-
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
448
|
-
desArquivo = f"ArquivoSped_{filial_cod}_{timestamp}.txt"
|
449
|
-
try:
|
450
|
-
send_file(id_historico, desArquivo, "text", file_bytes, file_extension="txt")
|
451
|
-
result = "Arquivo do SPED gerado com sucesso e arquivo salvo no Backoffice !"
|
452
|
-
os.remove(temp_path_to_txt)
|
453
|
-
return RpaRetornoProcessoDTO(
|
454
|
-
sucesso=True,
|
455
|
-
retorno=result,
|
456
|
-
status=RpaHistoricoStatusEnum.Sucesso,
|
457
|
-
)
|
458
|
-
except Exception as e:
|
459
|
-
result = f"Arquivo do SPED gerado com sucesso, porém gerou erro ao realizar o envio para o backoffice {e} - Arquivo ainda salvo na dispositivo utilizado no diretório {temp_path_to_txt} !"
|
460
|
-
console.print(result, style="bold red")
|
461
|
-
|
462
|
-
return RpaRetornoProcessoDTO(
|
463
|
-
sucesso=False,
|
464
|
-
retorno=result,
|
465
|
-
status=RpaHistoricoStatusEnum.Falha,
|
466
|
-
)
|
467
|
-
else:
|
468
|
-
result = f"Arquivo do SPED gerado com sucesso, porém não foi possivel obter o id do historico para envio do arquivo, retorno {get_historico["retorno"]} - Arquivo ainda salvo na dispositivo utilizado no diretório {temp_path_to_txt}"
|
405
|
+
get_historico = await get_historico_by_processo_identificador(filial_cod, task.nomProcesso)
|
406
|
+
if get_historico["sucesso"] == True:
|
407
|
+
data = get_historico["retorno"]
|
408
|
+
id_historico = data[0]['uuidHistorico']
|
409
|
+
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
410
|
+
desArquivo = f"ArquivoSped_{filial_cod}_{timestamp}.txt"
|
411
|
+
try:
|
412
|
+
send_file(id_historico, desArquivo, "text", file_bytes, file_extension="txt")
|
413
|
+
result = "Arquivo do SPED gerado com sucesso e arquivo salvo no Backoffice !"
|
414
|
+
os.remove(temp_path_to_txt)
|
415
|
+
return RpaRetornoProcessoDTO(
|
416
|
+
sucesso=True,
|
417
|
+
retorno=result,
|
418
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
419
|
+
)
|
420
|
+
except Exception as e:
|
421
|
+
result = f"Arquivo do SPED gerado com sucesso, porém gerou erro ao realizar o envio para o backoffice {e} - Arquivo ainda salvo na dispositivo utilizado no diretório {temp_path_to_txt} !"
|
469
422
|
console.print(result, style="bold red")
|
423
|
+
|
470
424
|
return RpaRetornoProcessoDTO(
|
471
425
|
sucesso=False,
|
472
426
|
retorno=result,
|
473
427
|
status=RpaHistoricoStatusEnum.Falha,
|
474
428
|
)
|
475
429
|
else:
|
430
|
+
result = f"Arquivo do SPED gerado com sucesso, porém não foi possivel obter o id do historico para envio do arquivo, retorno {get_historico["retorno"]} - Arquivo ainda salvo na dispositivo utilizado no diretório {temp_path_to_txt}"
|
431
|
+
console.print(result, style="bold red")
|
476
432
|
return RpaRetornoProcessoDTO(
|
477
433
|
sucesso=False,
|
478
|
-
retorno=
|
434
|
+
retorno=result,
|
479
435
|
status=RpaHistoricoStatusEnum.Falha,
|
480
436
|
)
|
437
|
+
|
481
438
|
except Exception as e:
|
482
439
|
console.print(f"Erro ao conectar à janela Informação: {e}\n")
|
483
440
|
return RpaRetornoProcessoDTO(
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/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.360 → worker_automate_hub-0.4.362}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/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.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/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.360 → worker_automate_hub-0.4.362}/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.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.360 → worker_automate_hub-0.4.362}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|