worker-automate-hub 0.4.438__py3-none-any.whl → 0.4.440__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.
- worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +12 -0
- worker_automate_hub/utils/util.py +22 -6
- {worker_automate_hub-0.4.438.dist-info → worker_automate_hub-0.4.440.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.4.438.dist-info → worker_automate_hub-0.4.440.dist-info}/RECORD +6 -6
- {worker_automate_hub-0.4.438.dist-info → worker_automate_hub-0.4.440.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.4.438.dist-info → worker_automate_hub-0.4.440.dist-info}/entry_points.txt +0 -0
@@ -38,6 +38,7 @@ from worker_automate_hub.utils.util import (
|
|
38
38
|
warnings_after_xml_imported,
|
39
39
|
worker_sleep,
|
40
40
|
check_nota_importada,
|
41
|
+
carregamento_import_xml,
|
41
42
|
)
|
42
43
|
|
43
44
|
pyautogui.PAUSE = 0.5
|
@@ -263,6 +264,17 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
|
|
263
264
|
"sucesso": False,
|
264
265
|
"retorno": f"Número máximo de tentativas atingido, Não foi possivel finalizar os trabalhos na tela de Informações para importação da Nota Fiscal Eletrônica",
|
265
266
|
}
|
267
|
+
|
268
|
+
await worker_sleep(2)
|
269
|
+
waiting_for_delay = await carregamento_import_xml()
|
270
|
+
if waiting_for_delay.sucesso:
|
271
|
+
console.print(waiting_for_delay.retorno)
|
272
|
+
else:
|
273
|
+
return RpaRetornoProcessoDTO(
|
274
|
+
sucesso=False,
|
275
|
+
retorno=waiting_for_delay.retorno,
|
276
|
+
status=RpaHistoricoStatusEnum.Falha,
|
277
|
+
)
|
266
278
|
|
267
279
|
console.print(
|
268
280
|
"Verificando a existencia de POP-UP de Itens não localizados ou NCM ...\n"
|
@@ -248,6 +248,14 @@ async def find_element_center(image_path, region_to_look, timeout):
|
|
248
248
|
|
249
249
|
def type_text_into_field(text, field, empty_before, chars_to_empty):
|
250
250
|
try:
|
251
|
+
try:
|
252
|
+
app = Application().connect(class_name="TFrmMenuPrincipal", timeout=60)
|
253
|
+
main_window = app["TFrmMenuPrincipal"]
|
254
|
+
|
255
|
+
main_window.set_focus()
|
256
|
+
except:
|
257
|
+
console.print(f"Erro ao conectar na janela, tentando seguir..")
|
258
|
+
|
251
259
|
if empty_before:
|
252
260
|
field.type_keys("{BACKSPACE " + chars_to_empty + "}", with_spaces=True)
|
253
261
|
|
@@ -2176,7 +2184,7 @@ async def select_documento_type(document_type: str) -> RpaRetornoProcessoDTO:
|
|
2176
2184
|
RpaRetornoProcessoDTO: Retorna um objeto com informações sobre o status do processo.
|
2177
2185
|
"""
|
2178
2186
|
try:
|
2179
|
-
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
2187
|
+
app = Application().connect(class_name="TFrmNotaFiscalEntrada", timeout=60)
|
2180
2188
|
main_window = app["TFrmNotaFiscalEntrada"]
|
2181
2189
|
|
2182
2190
|
main_window.set_focus()
|
@@ -2206,7 +2214,7 @@ async def select_documento_type(document_type: str) -> RpaRetornoProcessoDTO:
|
|
2206
2214
|
set_combobox("||List", document_type)
|
2207
2215
|
except Exception as e:
|
2208
2216
|
console.log("Não foi possivel selecionar o tipo de documento via set combobox, realizando a alteração utilizando pyautogui write")
|
2209
|
-
pyautogui.write("
|
2217
|
+
pyautogui.write("document_type")
|
2210
2218
|
await worker_sleep(2)
|
2211
2219
|
pyautogui.hotkey("enter")
|
2212
2220
|
await worker_sleep(2)
|
@@ -2229,7 +2237,7 @@ async def select_documento_type(document_type: str) -> RpaRetornoProcessoDTO:
|
|
2229
2237
|
else:
|
2230
2238
|
return RpaRetornoProcessoDTO(
|
2231
2239
|
sucesso=False,
|
2232
|
-
retorno=f"Não foi possivel selecionar o tipo do documento
|
2240
|
+
retorno=f"Não foi possivel selecionar o tipo do documento",
|
2233
2241
|
status=RpaHistoricoStatusEnum.Falha,
|
2234
2242
|
)
|
2235
2243
|
|
@@ -2374,11 +2382,18 @@ async def error_after_xml_imported() -> RpaRetornoProcessoDTO:
|
|
2374
2382
|
capturar_proxima_mensagem = True
|
2375
2383
|
|
2376
2384
|
elif capturar_proxima_mensagem:
|
2377
|
-
|
2385
|
+
if "duplicate key" in control_text:
|
2386
|
+
return RpaRetornoProcessoDTO(
|
2378
2387
|
sucesso=False,
|
2379
|
-
retorno=f"
|
2388
|
+
retorno=f"Não foi possivel seguir devido ao numero da chave ja existir no banco de dados, erro: {control_text}... \n",
|
2380
2389
|
status=RpaHistoricoStatusEnum.Falha,
|
2381
2390
|
)
|
2391
|
+
else:
|
2392
|
+
return RpaRetornoProcessoDTO(
|
2393
|
+
sucesso=False,
|
2394
|
+
retorno=f"Erro do banco de dados: {control_text} \n",
|
2395
|
+
status=RpaHistoricoStatusEnum.Falha,
|
2396
|
+
)
|
2382
2397
|
|
2383
2398
|
elif "XML já foi importado anteriormente" in control_text:
|
2384
2399
|
return RpaRetornoProcessoDTO(
|
@@ -2533,7 +2548,8 @@ async def itens_not_found_supplier(xml: str):
|
|
2533
2548
|
)
|
2534
2549
|
await worker_sleep(5)
|
2535
2550
|
i += 1
|
2536
|
-
|
2551
|
+
|
2552
|
+
await worker_sleep(5)
|
2537
2553
|
logs_erro = await is_window_open_by_class("TFrmExibeLogErroImportacaoNfe","TFrmExibeLogErroImportacaoNfe")
|
2538
2554
|
if logs_erro["IsOpened"] == True:
|
2539
2555
|
app = Application().connect(class_name="TFrmExibeLogErroImportacaoNfe")
|
@@ -48,7 +48,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=vFkDcgJ9uxrMMLYdeON
|
|
48
48
|
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=Kv1Ttgq477Xtp17QDymcOgWtuozFAexUqhcThPV9GTI,32767
|
49
49
|
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=MYPaYAP2iwdBYDZUf39f7yGibTME9uObEash_QTCmFA,32231
|
50
50
|
worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=jIml8gjXPdI6_x7S9VVV8IrKZRF7_PTNOMnhNmYMDTU,14490
|
51
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=
|
51
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=SZzsdjZGMFObZB_25EwvfNdKUlA_e3tbSrUPCYONltM,14620
|
52
52
|
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=Urt_7dZNuyUkSyG9fYb2ArBXzEONXlrqWIesoXeL1EI,50984
|
53
53
|
worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=3-zxbb-9YHPmSA_K1Qgxp_FwSqg2QDjGBRCLxDZ8QoQ,3451
|
54
54
|
worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=mZ6mCaz1lYmyFxwC8MVLXPsgynE1VkNKlEzYGsciDiY,10179
|
@@ -65,10 +65,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
|
|
65
65
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
66
66
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
67
67
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
68
|
-
worker_automate_hub/utils/util.py,sha256=
|
68
|
+
worker_automate_hub/utils/util.py,sha256=6GFMSMk8DOE_6Y_xmYQBczyN7bxcGRrH2q634Lb2Um0,121847
|
69
69
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=7ju688sD52y30taGSm5rPMGdQyByUUwveLeKV4ImEiE,28401
|
70
70
|
worker_automate_hub/worker.py,sha256=KDBU3L2kVobndrnN5coRZFTwVmBLKmPJjRv20sCo5Hc,4697
|
71
|
-
worker_automate_hub-0.4.
|
72
|
-
worker_automate_hub-0.4.
|
73
|
-
worker_automate_hub-0.4.
|
74
|
-
worker_automate_hub-0.4.
|
71
|
+
worker_automate_hub-0.4.440.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
72
|
+
worker_automate_hub-0.4.440.dist-info/METADATA,sha256=THkDGdmgI_Vu4f1XF-r1K9GA6Vql7-nCMh2y1F32Vbs,2895
|
73
|
+
worker_automate_hub-0.4.440.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
74
|
+
worker_automate_hub-0.4.440.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.4.438.dist-info → worker_automate_hub-0.4.440.dist-info}/entry_points.txt
RENAMED
File without changes
|