worker-automate-hub 0.5.91__tar.gz → 0.5.93__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/PKG-INFO +1 -1
  2. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/pyproject.toml +1 -1
  3. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +75 -15
  4. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/README.md +0 -0
  5. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/__init__.py +0 -0
  6. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/__init__.py +0 -0
  7. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/ahead_service.py +0 -0
  8. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/client.py +0 -0
  9. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/datalake_service.py +0 -0
  10. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/helpers/__init__.py +0 -0
  11. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
  12. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/rdp_service.py +0 -0
  13. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/rpa_fila_service.py +0 -0
  14. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/rpa_historico_service.py +0 -0
  15. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/api/webhook_service.py +0 -0
  16. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/cli.py +0 -0
  17. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/config/__init__.py +0 -0
  18. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/config/settings.py +0 -0
  19. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/config.py +0 -0
  20. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/core/so_manipulation.py +0 -0
  21. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/__init__.py +0 -0
  22. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/deprecation.py +0 -0
  23. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/rate_limit.py +0 -0
  24. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/repeat.py +0 -0
  25. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/retry.py +0 -0
  26. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/singleton.py +0 -0
  27. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/decorators/timeit.py +0 -0
  28. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/__init__.py +0 -0
  29. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/__init__.py +0 -0
  30. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
  31. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
  32. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
  33. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
  34. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
  35. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dto/__init__.py +0 -0
  36. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
  37. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
  38. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
  39. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
  40. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/__init__.py +0 -0
  41. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
  42. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
  43. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
  44. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
  45. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
  46. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
  47. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
  48. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
  49. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
  50. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
  51. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
  52. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
  53. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
  54. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
  55. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
  56. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
  57. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
  58. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
  59. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
  60. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
  61. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
  62. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
  63. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
  64. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
  65. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
  66. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
  67. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
  68. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
  69. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/playground.py +0 -0
  70. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
  71. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
  72. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/task_definitions.py +0 -0
  73. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/tasks/task_executor.py +0 -0
  74. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/__init__.py +0 -0
  75. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/env.py +0 -0
  76. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
  77. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/logger.py +0 -0
  78. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/toast.py +0 -0
  79. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/updater.py +0 -0
  80. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/util.py +0 -0
  81. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
  82. {worker_automate_hub-0.5.91 → worker_automate_hub-0.5.93}/worker_automate_hub/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.91
3
+ Version: 0.5.93
4
4
  Summary: Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta.
5
5
  Author: Joel Paim
6
6
  Requires-Python: >=3.12,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "worker-automate-hub"
3
- version = "0.5.91"
3
+ version = "0.5.93"
4
4
  description = "Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta."
5
5
  authors = ["Joel Paim"]
6
6
  readme = "README.md"
@@ -1080,27 +1080,87 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
1080
1080
  )
1081
1081
 
1082
1082
 
1083
- console.print("Clicando sobre a lupa para inserir o almoxarifado...\n")
1084
- app = Application().connect(class_name="TFrmIncluiItemPreVenda", timeout=60)
1085
- main_window = app["TFrmIncluiItemPreVenda"]
1086
- main_window.set_focus()
1087
- panel_TGroup_Box= main_window.child_window(class_name="TPanel", found_index=2)
1088
- lupa_almoxarifaco = panel_TPage.child_window(class_name="TDBIBitBtn", found_index=1)
1089
- lupa_almoxarifaco.click()
1090
- console.print("Lupa clicado com sucesso inserindo a descrição do almoxarifado...\n")
1091
- await worker_sleep(2)
1083
+ i = 0
1084
+ while i < 3:
1085
+ try:
1086
+ console.print("Clicando sobre a lupa para inserir o almoxarifado...\n")
1087
+ app = Application().connect(class_name="TFrmIncluiItemPreVenda", timeout=60)
1088
+ main_window = app["TFrmIncluiItemPreVenda"]
1089
+ main_window.set_focus()
1090
+ panel_TGroup_Box= main_window.child_window(class_name="TPanel", found_index=2)
1091
+ lupa_almoxarifaco = panel_TGroup_Box.child_window(class_name="TDBIBitBtn", found_index=1)
1092
+ lupa_almoxarifaco.click()
1093
+ console.print("Lupa clicado com sucesso inserindo a descrição do almoxarifado...\n")
1094
+ await worker_sleep(2)
1095
+
1096
+ dialog_buscar = is_window_open_by_class("TfrmDialogBuscaGeral", "TfrmDialogBuscaGeral")
1097
+ if dialog_buscar["IsOpened"] == True:
1098
+ break
1099
+ else:
1100
+ console.print("Não foi possivel abrir a janela de Busca Geral")
1101
+ i = i+1
1102
+ except Exception as e:
1103
+ console.print(f"Erro ao abrir a janela de Busca Geral: {e}")
1104
+ i = i+1
1105
+
1106
+
1107
+ if i == 3:
1108
+ retorno = f"Não foi possivel abrir a tela para buscar pelo item do produto na seleção do almoxarifado - \nEtapas Executadas:\n{steps}"
1109
+ return RpaRetornoProcessoDTO(
1110
+ sucesso=False,
1111
+ retorno=retorno,
1112
+ status=RpaHistoricoStatusEnum.Falha,
1113
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
1114
+ )
1092
1115
 
1093
1116
  app = Application().connect(class_name="TfrmDialogBuscaGeral", timeout=60)
1094
1117
  main_window = app["TfrmDialogBuscaGeral"]
1095
1118
  main_window.set_focus()
1096
1119
 
1097
- field_descricao_almoxarifado = main_window.child_window(class_name="TEdit", found_index=0)
1098
- field_descricao_almoxarifado.set_edit_text(descricao)
1099
- await worker_sleep(2)
1120
+ console.print("Buscando a mercadoria baseado na descrição...\n")
1121
+ rect = main_window.rectangle()
1122
+ center_x = (rect.left + rect.right) // 2
1123
+ center_y = (rect.top + rect.bottom) // 2
1100
1124
 
1101
- btn_lupa_pesquisar = main_window.child_window(class_name="TBitBtn", found_index=0)
1102
- btn_lupa_pesquisar.click()
1103
- await worker_sleep(2)
1125
+ pyautogui.moveTo(center_x, center_y)
1126
+ pyautogui.click(coords=(center_x, center_y))
1127
+ await worker_sleep(1)
1128
+ send_keys("^({HOME})")
1129
+
1130
+ last_line = ''
1131
+ while True:
1132
+ with pyautogui.hold('ctrl'):
1133
+ pyautogui.press('c')
1134
+ await worker_sleep(1)
1135
+ with pyautogui.hold('ctrl'):
1136
+ pyautogui.press('c')
1137
+
1138
+ win32clipboard.OpenClipboard()
1139
+ descricao_item = win32clipboard.GetClipboardData().strip()
1140
+ win32clipboard.CloseClipboard()
1141
+
1142
+ if last_line == descricao_item:
1143
+ retorno = f"Todos os itens percorridos e não foi possivel encontrar a descrição condizente a {descricao} \nEtapas Executadas:\n{steps}"
1144
+ return RpaRetornoProcessoDTO(
1145
+ sucesso=False,
1146
+ retorno=retorno,
1147
+ status=RpaHistoricoStatusEnum.Falha,
1148
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
1149
+ )
1150
+ else:
1151
+ if descricao.lower() in descricao_item.lower():
1152
+ break
1153
+ else:
1154
+ last_line = descricao_item
1155
+ pyautogui.press('down')
1156
+
1157
+ # field_descricao_almoxarifado = main_window.child_window(class_name="TEdit", found_index=0)
1158
+ # field_descricao_almoxarifado.set_edit_text(descricao)
1159
+ # await worker_sleep(2)
1160
+
1161
+ # btn_lupa_pesquisar = main_window.child_window(class_name="TBitBtn", found_index=0)
1162
+ # btn_lupa_pesquisar.click()
1163
+ # await worker_sleep(2)
1104
1164
 
1105
1165
  main_window.set_focus()
1106
1166
  send_keys("%o")