worker-automate-hub 0.5.662__tar.gz → 0.5.663__tar.gz
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.
Potentially problematic release.
This version of worker-automate-hub might be problematic. Click here for more details.
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +150 -132
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/README.md +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/datalake_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/webhook_service.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/rpa_sap_dto.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/cte_manual.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/cte_xml.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/devolucao_ctf.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/devolucao_ctf_35.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_cte_1353.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_cte_333.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/integracao_contabil.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/lancamento_rateio.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/notas_faturamento_sap.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/worker.py +0 -0
|
@@ -149,131 +149,148 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
149
149
|
)
|
|
150
150
|
periodo_field.set_edit_text(periodo_dt)
|
|
151
151
|
|
|
152
|
-
console.print("Selecionando Replicar para empresas...\n")
|
|
153
|
-
replicar_para_empresas_check = main_window.child_window(
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
replicar_para_empresas_check.click_input()
|
|
157
|
-
console.print(
|
|
158
|
-
|
|
159
|
-
)
|
|
152
|
+
# console.print("Selecionando Replicar para empresas...\n")
|
|
153
|
+
# replicar_para_empresas_check = main_window.child_window(
|
|
154
|
+
# class_name="TcxCheckBox", found_index=0
|
|
155
|
+
# )
|
|
156
|
+
# replicar_para_empresas_check.click_input()
|
|
157
|
+
# console.print(
|
|
158
|
+
# "A opção 'Aplicar Rateio aos Itens Selecionados' selecionado com sucesso... \n"
|
|
159
|
+
# )
|
|
160
|
+
try:
|
|
161
|
+
await worker_sleep(5)
|
|
162
|
+
console.print("Confirmando Pop-up - ...Pode causar lentidão no sistema...\n")
|
|
163
|
+
console.print(f"Verificando a presença de Confirm...")
|
|
164
|
+
confirm_pop_up = await is_window_open_by_class("TMessageForm", "TMessageForm")
|
|
165
|
+
if confirm_pop_up["IsOpened"] == True:
|
|
166
|
+
app = Application().connect(class_name="TMessageForm")
|
|
167
|
+
main_window = app["TMessageForm"]
|
|
168
|
+
main_window.set_focus()
|
|
169
|
+
main_window.child_window(title="&Yes").click()
|
|
170
|
+
console.print(f"Yes clicado com sucesso...")
|
|
160
171
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
await worker_sleep(5)
|
|
173
|
+
console.print(
|
|
174
|
+
f"Verificando se foi aberto a tela de Seleção de Empresas clicado com sucesso..."
|
|
175
|
+
)
|
|
176
|
+
selecao_empresas_screen = await is_window_open_by_class(
|
|
177
|
+
"TFrmSelecionaEmpresas", "TFrmSelecionaEmpresas"
|
|
178
|
+
)
|
|
179
|
+
if selecao_empresas_screen["IsOpened"] == True:
|
|
180
|
+
console.print(f"Janela de Seleção de Empresas foi aberta com sucesso...")
|
|
181
|
+
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
182
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
|
183
|
+
main_window.set_focus()
|
|
184
|
+
console.print(f"Clicando em seleciona todas...")
|
|
185
|
+
try:
|
|
186
|
+
selecionar_todos_itens = (
|
|
187
|
+
ASSETS_PATH + "\\lancamento_pis_cofins\\btn_selecionar_todas.png"
|
|
188
|
+
)
|
|
189
|
+
# Tenta localizar a imagem na tela
|
|
190
|
+
localizacao = pyautogui.locateOnScreen(
|
|
191
|
+
selecionar_todos_itens, confidence=0.9
|
|
192
|
+
)
|
|
193
|
+
await worker_sleep(3)
|
|
194
|
+
if localizacao:
|
|
195
|
+
centro = pyautogui.center(localizacao)
|
|
196
|
+
pyautogui.moveTo(centro)
|
|
197
|
+
pyautogui.click()
|
|
198
|
+
console.print("Clique realizado com sucesso!")
|
|
199
|
+
else:
|
|
200
|
+
console.print("Imagem não encontrada na tela.")
|
|
201
|
+
except Exception as e:
|
|
202
|
+
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
203
|
+
pass
|
|
204
|
+
try:
|
|
205
|
+
console.print(f"Clicando em OK - para andamento do processo...")
|
|
206
|
+
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
207
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
|
208
|
+
main_window.set_focus()
|
|
171
209
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
)
|
|
179
|
-
if selecao_empresas_screen["IsOpened"] == True:
|
|
180
|
-
console.print(f"Janela de Seleção de Empresas foi aberta com sucesso...")
|
|
181
|
-
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
182
|
-
main_window = app["TFrmSelecionaEmpresas"]
|
|
183
|
-
main_window.set_focus()
|
|
184
|
-
console.print(f"Clicando em seleciona todas...")
|
|
185
|
-
try:
|
|
186
|
-
selecionar_todos_itens = (
|
|
187
|
-
ASSETS_PATH + "\\lancamento_pis_cofins\\btn_selecionar_todas.png"
|
|
188
|
-
)
|
|
189
|
-
# Tenta localizar a imagem na tela
|
|
190
|
-
localizacao = pyautogui.locateOnScreen(
|
|
191
|
-
selecionar_todos_itens, confidence=0.9
|
|
192
|
-
)
|
|
193
|
-
await worker_sleep(3)
|
|
194
|
-
if localizacao:
|
|
195
|
-
centro = pyautogui.center(localizacao)
|
|
196
|
-
pyautogui.moveTo(centro)
|
|
197
|
-
pyautogui.click()
|
|
198
|
-
console.print("Clique realizado com sucesso!")
|
|
199
|
-
else:
|
|
200
|
-
console.print("Imagem não encontrada na tela.")
|
|
201
|
-
except Exception as e:
|
|
202
|
-
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
203
|
-
return RpaRetornoProcessoDTO(
|
|
204
|
-
sucesso=False,
|
|
205
|
-
retorno=retorno,
|
|
206
|
-
status=RpaHistoricoStatusEnum.Falha,
|
|
207
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
208
|
-
)
|
|
210
|
+
try:
|
|
211
|
+
btn_ok = main_window.child_window(title="OK")
|
|
212
|
+
btn_ok.click()
|
|
213
|
+
except:
|
|
214
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
215
|
+
btn_ok.click()
|
|
209
216
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
await worker_sleep(3)
|
|
218
|
+
except:
|
|
219
|
+
pass
|
|
220
|
+
except:
|
|
221
|
+
pass
|
|
222
|
+
|
|
223
|
+
try:
|
|
224
|
+
selecionar_todos_itens = (
|
|
225
|
+
ASSETS_PATH + "\\lancamento_pis_cofins\\botao_incluir.png"
|
|
226
|
+
)
|
|
227
|
+
# Tenta localizar a imagem na tela
|
|
228
|
+
localizacao = pyautogui.locateOnScreen(
|
|
229
|
+
selecionar_todos_itens, confidence=0.9
|
|
230
|
+
)
|
|
231
|
+
await worker_sleep(3)
|
|
232
|
+
if localizacao:
|
|
233
|
+
centro = pyautogui.center(localizacao)
|
|
234
|
+
pyautogui.moveTo(centro)
|
|
235
|
+
pyautogui.click()
|
|
236
|
+
console.print("Clique realizado com sucesso!")
|
|
237
|
+
else:
|
|
238
|
+
console.print("Imagem não encontrada na tela.")
|
|
239
|
+
except Exception as e:
|
|
240
|
+
pass
|
|
241
|
+
|
|
242
|
+
await worker_sleep(10)
|
|
243
|
+
|
|
244
|
+
try:
|
|
245
|
+
app = Application().connect(title="Aviso", timeout=10)
|
|
246
|
+
main_window = app["Aviso"]
|
|
213
247
|
main_window.set_focus()
|
|
214
248
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
except:
|
|
219
|
-
btn_ok = main_window.child_window(title="&OK")
|
|
220
|
-
btn_ok.click()
|
|
221
|
-
|
|
222
|
-
await worker_sleep(3)
|
|
249
|
+
# Pega o segundo Static usando child_window (não children)
|
|
250
|
+
aviso = main_window.child_window(class_name="Static", found_index=1)
|
|
251
|
+
texto_aviso = aviso.window_text()
|
|
223
252
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
ASSETS_PATH + "\\lancamento_pis_cofins\\botao_incluir.png"
|
|
227
|
-
)
|
|
228
|
-
# Tenta localizar a imagem na tela
|
|
229
|
-
localizacao = pyautogui.locateOnScreen(
|
|
230
|
-
selecionar_todos_itens, confidence=0.9
|
|
231
|
-
)
|
|
232
|
-
await worker_sleep(3)
|
|
233
|
-
if localizacao:
|
|
234
|
-
centro = pyautogui.center(localizacao)
|
|
235
|
-
pyautogui.moveTo(centro)
|
|
236
|
-
pyautogui.click()
|
|
237
|
-
console.print("Clique realizado com sucesso!")
|
|
238
|
-
else:
|
|
239
|
-
console.print("Imagem não encontrada na tela.")
|
|
240
|
-
except Exception as e:
|
|
241
|
-
retorno = f"Não foi possivel clicar em selecionar todos os itens na Seleção de Empresas, erro: {e} "
|
|
253
|
+
if "livro fiscal com status diferente de Confirmado/Encerrado" in texto_aviso:
|
|
254
|
+
retorno = texto_aviso
|
|
242
255
|
return RpaRetornoProcessoDTO(
|
|
243
256
|
sucesso=False,
|
|
244
257
|
retorno=retorno,
|
|
245
258
|
status=RpaHistoricoStatusEnum.Falha,
|
|
246
|
-
tags=[RpaTagDTO(descricao=RpaTagEnum.
|
|
259
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
247
260
|
)
|
|
248
|
-
|
|
249
|
-
await worker_sleep(10)
|
|
250
261
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
262
|
+
except Exception as e:
|
|
263
|
+
print(f"Erro ao capturar o aviso: {e}")
|
|
264
|
+
|
|
265
|
+
await worker_sleep(2)
|
|
254
266
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if localizacao:
|
|
259
|
-
break
|
|
260
|
-
await worker_sleep(2) # espera 2 segundos antes da próxima tentativa
|
|
267
|
+
# Verificar se já existe registro no mês apurado
|
|
268
|
+
try:
|
|
269
|
+
selecionar_todos_itens = ASSETS_PATH + "\\lancamento_pis_cofins\\ja_existe_periodo.png"
|
|
261
270
|
|
|
271
|
+
localizacao = None
|
|
272
|
+
for tentativa in range(10):
|
|
273
|
+
localizacao = pyautogui.locateOnScreen(selecionar_todos_itens, confidence=0.9)
|
|
262
274
|
if localizacao:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
main_window.set_focus()
|
|
266
|
-
informacao = main_window.child_window(title="OK")
|
|
267
|
-
informacao.click()
|
|
268
|
-
console.print("Clique realizado com sucesso!")
|
|
269
|
-
else:
|
|
270
|
-
console.print("Imagem não encontrada na tela após 10 tentativas.")
|
|
275
|
+
break
|
|
276
|
+
await worker_sleep(2) # espera 2 segundos antes da próxima tentativa
|
|
271
277
|
|
|
272
|
-
|
|
273
|
-
|
|
278
|
+
if localizacao:
|
|
279
|
+
app = Application().connect(title="Informação", timeout=60)
|
|
280
|
+
main_window = app["Informação"]
|
|
281
|
+
main_window.set_focus()
|
|
282
|
+
informacao = main_window.child_window(title="OK")
|
|
283
|
+
informacao.click()
|
|
284
|
+
console.print("Clique realizado com sucesso!")
|
|
285
|
+
else:
|
|
286
|
+
console.print("Imagem não encontrada na tela após 10 tentativas.")
|
|
274
287
|
|
|
288
|
+
except Exception as e:
|
|
289
|
+
pass
|
|
275
290
|
|
|
276
|
-
|
|
291
|
+
|
|
292
|
+
await worker_sleep(5)
|
|
293
|
+
try:
|
|
277
294
|
console.print("Verificando se possui tela de Informação... \n")
|
|
278
295
|
information_pop_up = await is_window_open("Information")
|
|
279
296
|
if information_pop_up["IsOpened"] == True:
|
|
@@ -300,34 +317,35 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
300
317
|
)
|
|
301
318
|
else:
|
|
302
319
|
console.print("Não possui tela de Informação... \n")
|
|
320
|
+
except:
|
|
321
|
+
pass
|
|
322
|
+
# PRECISO TESTAR ADICIONAR EXCESSÃO PARA A TELA DE AVISO
|
|
323
|
+
pop_up_aviso = []
|
|
324
|
+
console.print(f"Verificando se possui tela de Aviso...")
|
|
325
|
+
while True:
|
|
326
|
+
aviso_screen_opened = await is_window_open("Aviso")
|
|
327
|
+
if aviso_screen_opened["IsOpened"] == True:
|
|
328
|
+
msg_pop_up = await ocr_title("aviso_pop_up_cofins", "Aviso")
|
|
329
|
+
console.print(f"retorno:{msg_pop_up.sucesso}")
|
|
330
|
+
if msg_pop_up.sucesso == True:
|
|
331
|
+
msg_retorno = msg_pop_up.retorno
|
|
332
|
+
console.print(msg_retorno)
|
|
333
|
+
pop_up_aviso.append(msg_retorno)
|
|
303
334
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
while True:
|
|
308
|
-
aviso_screen_opened = await is_window_open("Aviso")
|
|
309
|
-
if aviso_screen_opened["IsOpened"] == True:
|
|
310
|
-
msg_pop_up = await ocr_title("aviso_pop_up_cofins", "Aviso")
|
|
311
|
-
console.print(f"retorno:{msg_pop_up.sucesso}")
|
|
312
|
-
if msg_pop_up.sucesso == True:
|
|
313
|
-
msg_retorno = msg_pop_up.retorno
|
|
314
|
-
console.print(msg_retorno)
|
|
315
|
-
pop_up_aviso.append(msg_retorno)
|
|
316
|
-
|
|
317
|
-
app = Application().connect(title="Aviso", timeout=120)
|
|
318
|
-
main_window = app["Aviso"]
|
|
319
|
-
main_window.set_focus()
|
|
335
|
+
app = Application().connect(title="Aviso", timeout=120)
|
|
336
|
+
main_window = app["Aviso"]
|
|
337
|
+
main_window.set_focus()
|
|
320
338
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
339
|
+
try:
|
|
340
|
+
btn_ok = main_window.child_window(title="OK")
|
|
341
|
+
btn_ok.click()
|
|
342
|
+
except:
|
|
343
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
344
|
+
btn_ok.click()
|
|
327
345
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
346
|
+
await worker_sleep(5)
|
|
347
|
+
else:
|
|
348
|
+
break
|
|
331
349
|
|
|
332
350
|
if len(pop_up_aviso) > 0:
|
|
333
351
|
return RpaRetornoProcessoDTO(
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/ahead_service.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/api/rdp_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/config/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/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.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/repeat.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/retry.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/decorators/timeit.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/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
|
|
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.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/env.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/logger.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/toast.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/updater.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.662 → worker_automate_hub-0.5.663}/worker_automate_hub/utils/util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|