worker-automate-hub 0.5.660__tar.gz → 0.5.662__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.660 → worker_automate_hub-0.5.662}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +326 -297
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/README.md +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/datalake_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/webhook_service.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/rpa_sap_dto.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/cte_manual.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/cte_xml.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/devolucao_ctf.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/devolucao_ctf_35.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_cte_1353.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_cte_333.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/integracao_contabil.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/lancamento_rateio.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/notas_faturamento_sap.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/worker.py +0 -0
|
@@ -77,303 +77,330 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
return_login = await login_emsys_fiscal(config.conConfiguracao, app, task)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
#
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
80
|
+
if return_login.sucesso == True:
|
|
81
|
+
type_text_into_field(
|
|
82
|
+
"Livro de Apuração Pis Cofins",
|
|
83
|
+
app["TFrmMenuPrincipal"]["Edit"],
|
|
84
|
+
True,
|
|
85
|
+
"50",
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
await worker_sleep(10)
|
|
89
|
+
console.print(f"Verificando a presença de Confirm...")
|
|
90
|
+
confirm_pop_up = await is_window_open("Confirm")
|
|
91
|
+
if confirm_pop_up["IsOpened"] == True:
|
|
92
|
+
app = Application().connect(class_name="TMessageForm")
|
|
93
|
+
main_window = app["TMessageForm"]
|
|
94
|
+
main_window.set_focus()
|
|
95
|
+
main_window.child_window(title="&No").click()
|
|
96
|
+
pyautogui.click(120, 173)
|
|
97
|
+
pyautogui.press("enter")
|
|
98
|
+
await worker_sleep(2)
|
|
99
|
+
pyautogui.press("enter")
|
|
100
|
+
console.print(
|
|
101
|
+
f"\nPesquisa: 'Livro de Apuração PIS Cofins' realizada com sucesso",
|
|
102
|
+
style="bold green",
|
|
103
|
+
)
|
|
104
|
+
else:
|
|
105
|
+
logger.info(f"\nError Message: {return_login.retorno}")
|
|
106
|
+
console.print(f"\nError Message: {return_login.retorno}", style="bold red")
|
|
107
|
+
return return_login
|
|
108
|
+
|
|
109
|
+
await worker_sleep(8)
|
|
110
|
+
console.print(
|
|
111
|
+
"Verificando se a janela Movimento de Apuração PIS / COFINS foi aberta com sucesso...\n"
|
|
112
|
+
)
|
|
113
|
+
max_attempts = 15
|
|
114
|
+
i = 0
|
|
115
|
+
while i < max_attempts:
|
|
116
|
+
movimento_apura_pis_cofins = await is_window_open_by_class(
|
|
117
|
+
"TFrmMovtoApuraPisCofins", "TFrmMovtoApuraPisCofins"
|
|
118
|
+
)
|
|
119
|
+
if movimento_apura_pis_cofins["IsOpened"] == True:
|
|
120
|
+
console.print(
|
|
121
|
+
"janela Movimento de Apuração PIS / COFINS foi aberta com sucesso...\n"
|
|
122
|
+
)
|
|
123
|
+
break
|
|
124
|
+
else:
|
|
125
|
+
await worker_sleep(1)
|
|
126
|
+
i = i + 1
|
|
127
|
+
|
|
128
|
+
if i >= max_attempts:
|
|
129
|
+
return RpaRetornoProcessoDTO(
|
|
130
|
+
sucesso=False,
|
|
131
|
+
retorno="Erro ao abrir a janela Movimento de Apuração PIS / COFINS, tela não encontrada",
|
|
132
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
133
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
filial_cod = lancamento_pis_cofins_processar.get("empresa")
|
|
137
|
+
periodo_dt = lancamento_pis_cofins_processar.get("periodo")
|
|
138
|
+
|
|
139
|
+
await worker_sleep(1)
|
|
140
|
+
# Preenchendo os campos necessarios de período e selecionando todas as empresas
|
|
141
|
+
console.print(f"\Informando o período... ", style="bold green")
|
|
142
|
+
app = Application().connect(class_name="TFrmMovtoApuraPisCofins", timeout=120)
|
|
143
|
+
main_window = app["TFrmMovtoApuraPisCofins"]
|
|
144
|
+
main_window.set_focus()
|
|
145
|
+
|
|
146
|
+
console.print("Inserindo o período...\n")
|
|
147
|
+
periodo_field = main_window.child_window(
|
|
148
|
+
class_name="TDBIEditDate", found_index=0
|
|
149
|
+
)
|
|
150
|
+
periodo_field.set_edit_text(periodo_dt)
|
|
151
|
+
|
|
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
|
+
|
|
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...")
|
|
171
|
+
|
|
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
|
+
return RpaRetornoProcessoDTO(
|
|
204
|
+
sucesso=False,
|
|
205
|
+
retorno=retorno,
|
|
206
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
207
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
console.print(f"Clicando em OK - para andamento do processo...")
|
|
211
|
+
app = Application().connect(class_name="TFrmSelecionaEmpresas", timeout=120)
|
|
212
|
+
main_window = app["TFrmSelecionaEmpresas"]
|
|
213
|
+
main_window.set_focus()
|
|
214
|
+
|
|
215
|
+
try:
|
|
216
|
+
btn_ok = main_window.child_window(title="OK")
|
|
217
|
+
btn_ok.click()
|
|
218
|
+
except:
|
|
219
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
220
|
+
btn_ok.click()
|
|
221
|
+
|
|
222
|
+
await worker_sleep(3)
|
|
223
|
+
|
|
224
|
+
try:
|
|
225
|
+
selecionar_todos_itens = (
|
|
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} "
|
|
242
|
+
return RpaRetornoProcessoDTO(
|
|
243
|
+
sucesso=False,
|
|
244
|
+
retorno=retorno,
|
|
245
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
246
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
await worker_sleep(10)
|
|
250
|
+
|
|
251
|
+
# Verificar se já existe registro no mês apurado
|
|
252
|
+
try:
|
|
253
|
+
selecionar_todos_itens = ASSETS_PATH + "\\lancamento_pis_cofins\\ja_existe_periodo.png"
|
|
254
|
+
|
|
255
|
+
localizacao = None
|
|
256
|
+
for tentativa in range(10):
|
|
257
|
+
localizacao = pyautogui.locateOnScreen(selecionar_todos_itens, confidence=0.9)
|
|
258
|
+
if localizacao:
|
|
259
|
+
break
|
|
260
|
+
await worker_sleep(2) # espera 2 segundos antes da próxima tentativa
|
|
261
|
+
|
|
262
|
+
if localizacao:
|
|
263
|
+
app = Application().connect(title="Informação", timeout=60)
|
|
264
|
+
main_window = app["Informação"]
|
|
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.")
|
|
271
|
+
|
|
272
|
+
except Exception as e:
|
|
273
|
+
console.print(f"Erro ao tentar verificar imagem: {e}")
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
await worker_sleep(5)
|
|
277
|
+
console.print("Verificando se possui tela de Informação... \n")
|
|
278
|
+
information_pop_up = await is_window_open("Information")
|
|
279
|
+
if information_pop_up["IsOpened"] == True:
|
|
280
|
+
msg_pop_up = await ocr_title("Information_pop_up_cofins", "Informação")
|
|
281
|
+
console.print(f"retorno:{msg_pop_up.sucesso}")
|
|
282
|
+
console.print(f"retorno:{msg_pop_up}")
|
|
283
|
+
if msg_pop_up.sucesso == True:
|
|
284
|
+
msg_retorno = msg_pop_up.retorno
|
|
285
|
+
console.print(msg_retorno)
|
|
286
|
+
retorno = f"Pop up nao mapeado para seguimento do robo {msg_pop_up.retorno}"
|
|
287
|
+
return RpaRetornoProcessoDTO(
|
|
288
|
+
sucesso=False,
|
|
289
|
+
retorno=retorno,
|
|
290
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
291
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
292
|
+
)
|
|
293
|
+
else:
|
|
294
|
+
retorno = f"Não foi possivel realizar a confirmação do msg do OCR após clicar em Incluir na tela de Movimento de Apuração PIS / COFINS"
|
|
295
|
+
return RpaRetornoProcessoDTO(
|
|
296
|
+
sucesso=False,
|
|
297
|
+
retorno=retorno,
|
|
298
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
299
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
300
|
+
)
|
|
301
|
+
else:
|
|
302
|
+
console.print("Não possui tela de Informação... \n")
|
|
303
|
+
|
|
304
|
+
# PRECISO TESTAR ADICIONAR EXCESSÃO PARA A TELA DE AVISO
|
|
305
|
+
pop_up_aviso = []
|
|
306
|
+
console.print(f"Verificando se possui tela de Aviso...")
|
|
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()
|
|
320
|
+
|
|
321
|
+
try:
|
|
322
|
+
btn_ok = main_window.child_window(title="OK")
|
|
323
|
+
btn_ok.click()
|
|
324
|
+
except:
|
|
325
|
+
btn_ok = main_window.child_window(title="&OK")
|
|
326
|
+
btn_ok.click()
|
|
327
|
+
|
|
328
|
+
await worker_sleep(5)
|
|
329
|
+
else:
|
|
330
|
+
break
|
|
331
|
+
|
|
332
|
+
if len(pop_up_aviso) > 0:
|
|
333
|
+
return RpaRetornoProcessoDTO(
|
|
334
|
+
sucesso=False,
|
|
335
|
+
retorno=f"Livro de apuração diferente de Confirmado/Encerrado: {pop_up_aviso}",
|
|
336
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
337
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
338
|
+
)
|
|
339
|
+
else:
|
|
340
|
+
console.print(
|
|
341
|
+
"Não possui tela de Aviso ou Pop-up de informação, seguindo com o andamento do processo... \n"
|
|
342
|
+
)
|
|
343
|
+
try:
|
|
344
|
+
app = Application().connect(class_name="TFrmMovtoApuraPisCofins", timeout=60)
|
|
345
|
+
main_window = app["TFrmMovtoApuraPisCofins"]
|
|
346
|
+
|
|
347
|
+
# Tenta fechar a janela até 10 vezes
|
|
348
|
+
for tentativa in range(10):
|
|
349
|
+
try:
|
|
350
|
+
if main_window.exists(timeout=2):
|
|
351
|
+
main_window.close()
|
|
352
|
+
await worker_sleep(2)
|
|
353
|
+
|
|
354
|
+
if not main_window.exists(timeout=2):
|
|
355
|
+
console.print("Tela de Movimento Apuração, fechada com sucesso... \n")
|
|
356
|
+
break
|
|
357
|
+
except Exception as e:
|
|
358
|
+
console.print(f"Tentativa {tentativa + 1}: Erro ao tentar fechar a janela: {e}")
|
|
359
|
+
await worker_sleep(2)
|
|
360
|
+
else:
|
|
361
|
+
console.print("Não foi possível fechar a tela de Movimento Apuração após 10 tentativas.")
|
|
362
|
+
|
|
363
|
+
except Exception as e:
|
|
364
|
+
console.print(f"Erro ao conectar com a janela TFrmMovtoApuraPisCofins: {e}")
|
|
365
|
+
app = Application().connect(
|
|
366
|
+
class_name="TFrmMovtoApuraPisCofins", timeout=120
|
|
367
|
+
)
|
|
368
|
+
main_window = app["TFrmMovtoApuraPisCofins"]
|
|
369
|
+
main_window.close()
|
|
370
|
+
await worker_sleep(2)
|
|
371
|
+
console.print("Tela de Movimento Apuração, fechada com sucesso... \n")
|
|
372
|
+
else:
|
|
373
|
+
return RpaRetornoProcessoDTO(
|
|
374
|
+
sucesso=False,
|
|
375
|
+
retorno="Erro ao abrir a janela Seleção de Empresas, tela não encontrada",
|
|
376
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
377
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
await worker_sleep(10)
|
|
381
|
+
# Verificar se já existe registro no mês apurado
|
|
382
|
+
try:
|
|
383
|
+
selecionar_todos_itens = (
|
|
384
|
+
ASSETS_PATH + "\\lancamento_pis_cofins\\ja_existe_periodo.png"
|
|
385
|
+
)
|
|
386
|
+
# Tenta localizar a imagem na tela
|
|
387
|
+
localizacao = pyautogui.locateOnScreen(
|
|
388
|
+
selecionar_todos_itens, confidence=0.9
|
|
389
|
+
)
|
|
390
|
+
await worker_sleep(3)
|
|
391
|
+
if localizacao:
|
|
392
|
+
app = Application().connect(title="Informação", timeout=120)
|
|
393
|
+
main_window = app["Informação"]
|
|
394
|
+
main_window.set_focus()
|
|
395
|
+
informacao = main_window.child_window(title="OK")
|
|
396
|
+
informacao.click()
|
|
397
|
+
console.print("Clique realizado com sucesso!")
|
|
398
|
+
else:
|
|
399
|
+
console.print("Imagem não encontrada na tela.")
|
|
400
|
+
except:
|
|
401
|
+
pass
|
|
402
|
+
|
|
403
|
+
console.print(f"Abrindo a janela de Otimizador cálculo PIS/COFINS...")
|
|
377
404
|
|
|
378
405
|
try:
|
|
379
406
|
type_text_into_field(
|
|
@@ -874,3 +901,5 @@ async def lancamento_pis_cofins(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
|
874
901
|
status=RpaHistoricoStatusEnum.Falha,
|
|
875
902
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
876
903
|
)
|
|
904
|
+
|
|
905
|
+
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/ahead_service.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/api/client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/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.660 → worker_automate_hub-0.5.662}/worker_automate_hub/config/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/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.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/repeat.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/retry.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/decorators/timeit.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/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.660 → worker_automate_hub-0.5.662}/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.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/env.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/logger.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/toast.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/updater.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.660 → worker_automate_hub-0.5.662}/worker_automate_hub/utils/util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|