worker-automate-hub 0.5.704__py3-none-any.whl → 0.5.705__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.
@@ -135,6 +135,26 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
135
135
  pyautogui.hotkey("tab")
136
136
  await worker_sleep(10)
137
137
 
138
+ try:
139
+ # Verificando a existência da janela Busca representante e clicando em Cancelar
140
+ console.print(
141
+ "Verificando a existência da janela Busca representante e clicando em Cancelar...\n"
142
+ )
143
+ app = Application().connect(class_name="TFrmBuscaGeralDialog")
144
+ app = app["TFrmBuscaGeralDialog"]
145
+ btn_cancelar = app.child_window(title="&Cancelar", class_name="TBitBtn")
146
+ if btn_cancelar.exists():
147
+ app.set_focus()
148
+ btn_cancelar.click_input()
149
+ console.print(f" botão Cancelar clicado com sucesso")
150
+ else:
151
+ console.print(f"Botão Cancelar Não encontrado")
152
+
153
+ except:
154
+ console.log(
155
+ f"Nenhuma tela de Busca representante foi encontrada.",
156
+ style="bold green",
157
+ )
138
158
  # Clica em cancelar na Janela "Busca Representante"
139
159
  # screenshot_path = take_screenshot()
140
160
  # window_busca_representante_position = take_target_position(screenshot_path, "Representante")
@@ -475,6 +495,13 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
475
495
  #Clica cancelar
476
496
  pyautogui.click((1194, 745))
477
497
  await worker_sleep(5)
498
+ if len(itens) <= 1:
499
+ return RpaRetornoProcessoDTO(
500
+ sucesso=False,
501
+ retorno=f"Apenas um item na transferencia, ele está com saldo de: {amount_avaliable}",
502
+ status=RpaHistoricoStatusEnum.Falha,
503
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
504
+ )
478
505
  continue
479
506
  else:
480
507
  itens_zero_qtd.append(f"DIVERGENCIA DE ESTOQUE - Item: {item["codigoProduto"]} Quantidade que deveria ser transferida: {item['qtd']} | Quantidade disponível: {amount_avaliable}")
@@ -984,4 +1011,4 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
984
1011
  sucesso=False,
985
1012
  retorno=log_msg,
986
1013
  status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
987
- )
1014
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.704
3
+ Version: 0.5.705
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
@@ -86,7 +86,7 @@ worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py,sha256=_6CFh79ea
86
86
  worker_automate_hub/tasks/jobs/notas_faturamento_sap.py,sha256=p6tVE027FHHXBxt2sIDxqLInpf_0wS-8TcACnS34p7w,13961
87
87
  worker_automate_hub/tasks/jobs/playground.py,sha256=7vWDg9DwToHwGJ6_XOa8TQ6LmfRV5Qz2TaOV3q3P9sA,1918
88
88
  worker_automate_hub/tasks/jobs/sped_fiscal.py,sha256=Zsq-IwKxA0b2tikO6Rri4WXVj10jK-Jd0-gxk8yVBH0,31064
89
- worker_automate_hub/tasks/jobs/transferencias.py,sha256=nfqGz_ZGu2VkejddlxyOmynShNdoqSqeN38v36q6bzQ,44207
89
+ worker_automate_hub/tasks/jobs/transferencias.py,sha256=X-hbz0GSsdeUHOZlz_wZ1XvNfWiQI0Ms2bD7VP-mcbE,45539
90
90
  worker_automate_hub/tasks/task_definitions.py,sha256=oadXjZkmUge5Gek3ChCM-qriHRBMOrKW3u5HOXBNUQU,11957
91
91
  worker_automate_hub/tasks/task_executor.py,sha256=9dmLUlMpJOI7FhbaFE593TcWnDxBvuXbGVecs1aaJxE,5728
92
92
  worker_automate_hub/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -98,7 +98,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
98
98
  worker_automate_hub/utils/util.py,sha256=xA13nQqZglwkvfAKH18Unv4UoZUyvL58CacSrzUpYTw,206352
99
99
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=Yy4vDY5Wiw0uopy43IRm9jUgF5g1aFXMGVtG-GtH2g4,37524
100
100
  worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
101
- worker_automate_hub-0.5.704.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
- worker_automate_hub-0.5.704.dist-info/METADATA,sha256=EkLgx0mi6RQCfhvhRXczCqcwWagUM-V33y2OpkeqTC0,3049
103
- worker_automate_hub-0.5.704.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
- worker_automate_hub-0.5.704.dist-info/RECORD,,
101
+ worker_automate_hub-0.5.705.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
+ worker_automate_hub-0.5.705.dist-info/METADATA,sha256=Gj7EXb5Veuv-gI84HfexgqfjGw6igsd31QwQTKNMcxQ,3049
103
+ worker_automate_hub-0.5.705.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
+ worker_automate_hub-0.5.705.dist-info/RECORD,,