feature/pedimento completo carga remesas, coves, edocs y acuses y aparte descarga sus documentos, se corrigieron las formulas de remesas, acuse y e documents para permitir la correcta descarga de susdocumentos y se aseguro que el status sea el correcto
This commit is contained in:
@@ -91,12 +91,13 @@ async def consume_ws_get_cove(**kwargs):
|
||||
# Enviar documento de request a EFC
|
||||
try:
|
||||
file_name_request = f"vu_COVE_{pedimento_app}_{cove}_REQUEST.xml"
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
document_response = await coves_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=19,
|
||||
identifier=cove,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento request: {e}")
|
||||
@@ -117,12 +118,13 @@ async def consume_ws_get_cove(**kwargs):
|
||||
raise Exception("No se recibió respuesta del servicio SOAP")
|
||||
|
||||
if soap_error(soap_response):
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
document_response = await coves_rest_controller.post_or_update_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=f"vu_COVE_{pedimento_app}_{cove}_ERROR.xml",
|
||||
document_type=20,
|
||||
identifier=cove,
|
||||
)
|
||||
|
||||
raise Exception("Error en la respuesta del servicio SOAP")
|
||||
@@ -205,12 +207,13 @@ async def consume_ws_get_acuse_cove(**kwargs):
|
||||
# Enviar documento de request a EFC
|
||||
try:
|
||||
file_name_request = f"vu_AC_COVE_{kwargs.get('pedimento', {}).get('pedimento_app', 'N/A')}_{kwargs['cove'].get('cove', 'N/A')}_REQUEST.xml"
|
||||
document_response = await coves_rest_controller.post_document(
|
||||
document_response = await coves_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=23,
|
||||
identifier=kwargs['cove'].get('cove', 'N/A'),
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento request de acuse cove: {e}")
|
||||
@@ -251,12 +254,13 @@ async def consume_ws_get_acuse_cove(**kwargs):
|
||||
if soap_error(response):
|
||||
error_file_name = f"vu_AC_COVE_{kwargs.get('pedimento', {}).get('pedimento_app', 'N/A')}_{kwargs['cove'].get('cove', 'N/A')}_ERROR.xml"
|
||||
try:
|
||||
rest_response = await coves_rest_controller.post_document(
|
||||
rest_response = await coves_rest_controller.post_or_update_document(
|
||||
soap_response=response,
|
||||
organizacion=kwargs.get('pedimento').get('organizacion'),
|
||||
pedimento=kwargs.get('pedimento').get('id'),
|
||||
file_name=error_file_name,
|
||||
document_type=24,
|
||||
identifier=kwargs['cove'].get('cove', 'N/A'),
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al guardar respuesta SOAP errónea: {e}")
|
||||
|
||||
Reference in New Issue
Block a user