worker-automate-hub 0.5.756__tar.gz → 0.5.758__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.
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/extracao_saldo_estoque_fiscal.py +60 -31
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/README.md +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/datalake_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/webhook_service.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/rpa_sap_dto.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/cte_manual.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/cte_xml.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/devolucao_ctf.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/devolucao_ctf_35.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_cte_1353.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_cte_333.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/extracao_saldo_estoque.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/integracao_contabil.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/lancamento_rateio.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/notas_faturamento_sap.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/opex_capex.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/worker.py +0 -0
@@ -4,6 +4,7 @@ from datetime import datetime
|
|
4
4
|
from pywinauto import Application, timings, findwindows, keyboard
|
5
5
|
import sys
|
6
6
|
import io
|
7
|
+
|
7
8
|
# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
|
8
9
|
|
9
10
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
@@ -42,12 +43,14 @@ pyautogui.PAUSE = 0.5
|
|
42
43
|
pyautogui.FAILSAFE = False
|
43
44
|
|
44
45
|
|
45
|
-
async def extracao_saldo_estoque_fiscal(
|
46
|
+
async def extracao_saldo_estoque_fiscal(
|
47
|
+
task: RpaProcessoEntradaDTO,
|
48
|
+
) -> RpaRetornoProcessoDTO:
|
46
49
|
try:
|
47
50
|
config = await get_config_by_name("login_emsys_fiscal")
|
48
|
-
periodo = task.configEntrada[
|
49
|
-
periodo_format = periodo.replace("/","")
|
50
|
-
filial = task.configEntrada[
|
51
|
+
periodo = task.configEntrada["periodo"]
|
52
|
+
periodo_format = periodo.replace("/", "")
|
53
|
+
filial = task.configEntrada["filialEmpresaOrigem"]
|
51
54
|
historico_id = task.historico_id
|
52
55
|
await kill_all_emsys()
|
53
56
|
|
@@ -56,7 +59,9 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
56
59
|
# Fecha a instancia do emsys - caso esteja aberta
|
57
60
|
await kill_all_emsys()
|
58
61
|
|
59
|
-
app = Application(backend="win32").start(
|
62
|
+
app = Application(backend="win32").start(
|
63
|
+
"C:\\Rezende\\EMSys3\\EMSysFiscal_39.exe"
|
64
|
+
)
|
60
65
|
warnings.filterwarnings(
|
61
66
|
"ignore",
|
62
67
|
category=UserWarning,
|
@@ -100,7 +105,7 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
100
105
|
await worker_sleep(7)
|
101
106
|
|
102
107
|
##### Janela Movimento Livros Fiscais #####
|
103
|
-
|
108
|
+
# Conecta na janela principal
|
104
109
|
app = Application().connect(class_name="TFrmMovtoLivroFiscal")
|
105
110
|
main_window = app.window(class_name="TFrmMovtoLivroFiscal")
|
106
111
|
main_window.wait("exists enabled visible ready", timeout=20)
|
@@ -116,21 +121,23 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
116
121
|
|
117
122
|
# Limpa e digita
|
118
123
|
keyboard.send_keys("^a{BACKSPACE}07/2025")
|
119
|
-
|
124
|
+
|
120
125
|
# Seleciona inventário
|
121
126
|
chk_inventario = main_window.child_window(
|
122
127
|
class_name="TcxCheckBox", found_index=6
|
123
|
-
).click_input()
|
128
|
+
).click_input()
|
124
129
|
|
125
130
|
await worker_sleep(2)
|
126
131
|
|
127
132
|
# Caminho da imagem do botão
|
128
|
-
imagem_botao = r"
|
133
|
+
imagem_botao = r"assets\\extracao_relatorios\\btn_incluir_livro.png"
|
129
134
|
|
130
135
|
if os.path.exists(imagem_botao):
|
131
136
|
try:
|
132
137
|
# Localiza a imagem na tela
|
133
|
-
botao = pyautogui.locateCenterOnScreen(
|
138
|
+
botao = pyautogui.locateCenterOnScreen(
|
139
|
+
imagem_botao, confidence=0.9
|
140
|
+
) # confidence precisa do opencv instalado
|
134
141
|
if botao:
|
135
142
|
pyautogui.click(botao)
|
136
143
|
print("Botão clicado com sucesso!")
|
@@ -140,7 +147,7 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
140
147
|
print(f"Erro ao localizar/clicar na imagem: {e}")
|
141
148
|
else:
|
142
149
|
print("Caminho da imagem não existe.")
|
143
|
-
|
150
|
+
|
144
151
|
##### Janela Perguntas da Geração Livros Fiscais #####
|
145
152
|
app = Application().connect(class_name="TPerguntasLivrosFiscaisForm")
|
146
153
|
main_window = app.window(class_name="TPerguntasLivrosFiscaisForm")
|
@@ -149,7 +156,9 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
149
156
|
respostas = ["Não", "Sim", "Não", "Não"]
|
150
157
|
|
151
158
|
for i, resposta in enumerate(respostas):
|
152
|
-
combo = main_window.child_window(
|
159
|
+
combo = main_window.child_window(
|
160
|
+
class_name="TDBIComboBoxValues", found_index=i
|
161
|
+
).wrapper_object()
|
153
162
|
combo.set_focus()
|
154
163
|
combo.click_input()
|
155
164
|
await worker_sleep(0.1)
|
@@ -159,12 +168,14 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
159
168
|
main_window.child_window(class_name="TButton", found_index=1).click_input()
|
160
169
|
|
161
170
|
await worker_sleep(2)
|
162
|
-
|
171
|
+
|
163
172
|
##### Janela Gerar Registros #####
|
164
173
|
app = Application(backend="win32").connect(title="Gerar Registros")
|
165
174
|
main_window = app.window(title="Gerar Registros")
|
166
175
|
# Clicar em Sim
|
167
|
-
btn_sim = main_window.child_window(
|
176
|
+
btn_sim = main_window.child_window(
|
177
|
+
class_name="Button", found_index=1
|
178
|
+
).click_input()
|
168
179
|
|
169
180
|
await worker_sleep(2)
|
170
181
|
|
@@ -172,14 +183,16 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
172
183
|
app = Application().connect(class_name="TFrmMotvoMotivoInventario")
|
173
184
|
main_window = app.window(class_name="TFrmMotvoMotivoInventario")
|
174
185
|
main_window.wait("exists enabled visible ready", timeout=20)
|
175
|
-
slc_01 = main_window.child_window(
|
186
|
+
slc_01 = main_window.child_window(
|
187
|
+
class_name="TDBIComboBoxValues", found_index=0
|
188
|
+
).click_input()
|
176
189
|
await worker_sleep(0.1)
|
177
190
|
keyboard.send_keys("01" + "{ENTER}")
|
178
191
|
await worker_sleep(0.2)
|
179
192
|
|
180
193
|
# Clicar em confirmar
|
181
194
|
main_window.child_window(class_name="TBitBtn", found_index=0).click_input()
|
182
|
-
|
195
|
+
|
183
196
|
await worker_sleep(5)
|
184
197
|
|
185
198
|
##### Conecta à janela Preview Relatorio #####
|
@@ -204,14 +217,16 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
204
217
|
|
205
218
|
await worker_sleep(2)
|
206
219
|
|
207
|
-
# Clicar em visualizar livro
|
220
|
+
# Clicar em visualizar livro
|
208
221
|
caminho = r"assets\\extracao_relatorios\\btn_visu_livros.png"
|
209
222
|
# Verifica se o arquivo existe
|
210
223
|
if os.path.isfile(caminho):
|
211
224
|
print("A imagem existe:", caminho)
|
212
225
|
|
213
226
|
# Procura a imagem na tela
|
214
|
-
pos = pyautogui.locateCenterOnScreen(
|
227
|
+
pos = pyautogui.locateCenterOnScreen(
|
228
|
+
caminho, confidence=0.9
|
229
|
+
) # ajuste o confidence se necessário
|
215
230
|
if pos:
|
216
231
|
pyautogui.click(pos) # clica no centro da imagem
|
217
232
|
print("Clique realizado na imagem.")
|
@@ -226,12 +241,16 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
226
241
|
app = Application().connect(class_name="TFrmMovtoLivroFiscal")
|
227
242
|
main_window = app.window(class_name="TFrmMovtoLivroFiscal")
|
228
243
|
main_window.wait("exists enabled visible ready", timeout=20)
|
229
|
-
input_7 = main_window.child_window(
|
244
|
+
input_7 = main_window.child_window(
|
245
|
+
class_name="TDBIEditCode", found_index=0
|
246
|
+
).click_input()
|
230
247
|
await worker_sleep(0.1)
|
231
248
|
keyboard.send_keys("7" + "{TAB}")
|
232
249
|
await worker_sleep(0.2)
|
233
250
|
# Clicar em imprimir
|
234
|
-
btn_imprimir = main_window.child_window(
|
251
|
+
btn_imprimir = main_window.child_window(
|
252
|
+
class_name="TBitBtn", found_index=0
|
253
|
+
).click_input()
|
235
254
|
|
236
255
|
await worker_sleep(2)
|
237
256
|
|
@@ -239,7 +258,9 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
239
258
|
app = Application().connect(class_name="TFrmFRVisualizaTemplateMenuNew")
|
240
259
|
main_window = app.window(class_name="TFrmFRVisualizaTemplateMenuNew")
|
241
260
|
main_window.wait("exists enabled visible ready", timeout=20)
|
242
|
-
btn_gerar_rel = main_window.child_window(
|
261
|
+
btn_gerar_rel = main_window.child_window(
|
262
|
+
class_name="TBitBtn", found_index=1
|
263
|
+
).click_input()
|
243
264
|
|
244
265
|
await worker_sleep(2)
|
245
266
|
|
@@ -247,16 +268,20 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
247
268
|
app = Application().connect(class_name="TFrmFRParametroRelatorio")
|
248
269
|
main_window = app.window(class_name="TFrmFRParametroRelatorio")
|
249
270
|
main_window.wait("exists enabled visible ready", timeout=20)
|
250
|
-
slc_nao = main_window.child_window(
|
271
|
+
slc_nao = main_window.child_window(
|
272
|
+
class_name="TComboBox", found_index=0
|
273
|
+
).click_input()
|
251
274
|
await worker_sleep(0.1)
|
252
275
|
keyboard.send_keys("NAO" + "{ENTER}")
|
253
276
|
await worker_sleep(0.2)
|
254
277
|
|
255
278
|
# Clicar BOTAO OK
|
256
|
-
slc_nao = main_window.child_window(
|
279
|
+
slc_nao = main_window.child_window(
|
280
|
+
class_name="TBitBtn", found_index=1
|
281
|
+
).click_input()
|
257
282
|
|
258
283
|
await worker_sleep(2)
|
259
|
-
|
284
|
+
|
260
285
|
# Clicar em salvar
|
261
286
|
caminho = r"assets\\extracao_relatorios\\btn_salvar.png"
|
262
287
|
# Verifica se o arquivo existe
|
@@ -264,7 +289,9 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
264
289
|
print("A imagem existe:", caminho)
|
265
290
|
|
266
291
|
# Procura a imagem na tela
|
267
|
-
pos = pyautogui.locateCenterOnScreen(
|
292
|
+
pos = pyautogui.locateCenterOnScreen(
|
293
|
+
caminho, confidence=0.9
|
294
|
+
) # ajuste o confidence se necessário
|
268
295
|
if pos:
|
269
296
|
pyautogui.click(pos) # clica no centro da imagem
|
270
297
|
print("Clique realizado na imagem.")
|
@@ -293,8 +320,8 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
293
320
|
|
294
321
|
# Clicar em Salvar
|
295
322
|
btn_salvar = main_window.child_window(
|
296
|
-
|
297
|
-
).click_input()
|
323
|
+
class_name="TBitBtn", found_index=1
|
324
|
+
).click_input()
|
298
325
|
|
299
326
|
await worker_sleep(5)
|
300
327
|
|
@@ -303,7 +330,9 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
303
330
|
main_window = app.window(title_re="Salvar para arquivo")
|
304
331
|
|
305
332
|
# Campo Nome (Edit) - use set_edit_text para evitar problemas de escape
|
306
|
-
campo_nome = main_window.child_window(
|
333
|
+
campo_nome = main_window.child_window(
|
334
|
+
class_name="Edit", control_id=1148
|
335
|
+
).wrapper_object()
|
307
336
|
caminho_arquivo = rf"C:\Users\automatehub\Downloads\saldo_estoque_fiscal_{periodo_format}_{filial}.xlsx"
|
308
337
|
campo_nome.set_focus()
|
309
338
|
campo_nome.set_edit_text(caminho_arquivo)
|
@@ -311,7 +340,7 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
311
340
|
print("✅ Texto inserido no campo Nome")
|
312
341
|
|
313
342
|
await worker_sleep(3)
|
314
|
-
|
343
|
+
|
315
344
|
# Clicar em ok para salvar
|
316
345
|
keyboard.send_keys("{TAB}{TAB}{ENTER}", pause=0.3)
|
317
346
|
|
@@ -331,7 +360,7 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
331
360
|
except findwindows.ElementNotFoundError:
|
332
361
|
print("Janela 'Printing' não estava aberta.")
|
333
362
|
|
334
|
-
nome_com_extensao = f
|
363
|
+
nome_com_extensao = f"saldo_estoque_fiscal_{periodo_format}_{filial}.xlsx"
|
335
364
|
# lê o arquivo
|
336
365
|
with open(f"{caminho_arquivo}", "rb") as file:
|
337
366
|
file_bytes = io.BytesIO(file.read())
|
@@ -350,7 +379,7 @@ async def extracao_saldo_estoque_fiscal(task: RpaProcessoEntradaDTO) -> RpaRetor
|
|
350
379
|
return RpaRetornoProcessoDTO(
|
351
380
|
sucesso=True,
|
352
381
|
retorno="Relatório enviado com sucesso",
|
353
|
-
status=RpaHistoricoStatusEnum.Sucesso
|
382
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
354
383
|
)
|
355
384
|
|
356
385
|
except Exception as e:
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/api/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/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.756 → worker_automate_hub-0.5.758}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/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.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/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.756 → worker_automate_hub-0.5.758}/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
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.5.756 → worker_automate_hub-0.5.758}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|