feature/rbac-implementation
This commit is contained in:
@@ -59,12 +59,13 @@ async def consume_ws_get_partida(**kwargs):
|
||||
|
||||
file_name_request = f"vu_PT_{pedimento_app}_{partida.get('numero', '')}_REQUEST.xml"
|
||||
|
||||
document_response = await partida_rest_controller.post_document(
|
||||
document_response = await partida_rest_controller.post_or_update_document(
|
||||
soap_response=soap_xml,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=file_name_request,
|
||||
document_type=17, # Tipo de documento para petición de partidas
|
||||
document_type=17,
|
||||
identifier=f"_PT_{pedimento_app}_{partida.get('numero', '')}_",
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento request: {e}")
|
||||
@@ -97,12 +98,13 @@ async def consume_ws_get_partida(**kwargs):
|
||||
if soap_error(soap_response):
|
||||
error_file_name = f"vu_PT_{pedimento_app}_{partida.get('numero', '')}_ERROR.xml"
|
||||
try:
|
||||
document_response = await partida_rest_controller.post_document(
|
||||
document_response = await partida_rest_controller.post_or_update_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=error_file_name,
|
||||
document_type=18,
|
||||
identifier=f"_PT_{pedimento_app}_{partida.get('numero', '')}_",
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al guardar la respuesta de error: {e}")
|
||||
@@ -127,12 +129,13 @@ async def consume_ws_get_partida(**kwargs):
|
||||
# Enviar documento
|
||||
_file_name = f"vu_PT_{pedimento_app}_{partida.get('numero', '')}.xml"
|
||||
try:
|
||||
document_response = await partida_rest_controller.post_document(
|
||||
document_response = await partida_rest_controller.post_or_update_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=_file_name,
|
||||
document_type=1,
|
||||
document_type=1,
|
||||
identifier=f"_PT_{pedimento_app}_{partida.get('numero', '')}_",
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento: {e}")
|
||||
|
||||
Reference in New Issue
Block a user