fix: nuevos ajustes en enpoints para guardar las petciones a vu

This commit is contained in:
2026-01-02 08:45:46 -07:00
parent b879e5c24d
commit 28d3352543
5 changed files with 100 additions and 0 deletions

View File

@@ -22,6 +22,28 @@ soap_headers = {
async def obtener_acuse(**kwargs):
soap_xml = acuse_vu_controller.generate_acuse_template(**kwargs)
# Enviar documento a EFC
try:
pedimento_efc = kwargs.get('pedimento', {})
pedimento_app = pedimento_efc.get('pedimento_app','N/A')
organizacion_efc = pedimento_efc.get("organizacion", None)
pedimento_id_efc = pedimento_efc.get("id", None)
idEdocument_efc = kwargs['edoc'].get('numero_edocument', 'N/A')
file_name_request = f"vu_AC_{pedimento_app}_{idEdocument_efc}_REQUEST.xml"
document_response = await acuse_rest_controller.post_document(
soap_response=soap_xml,
organizacion=organizacion_efc,
pedimento=pedimento_id_efc,
file_name=file_name_request,
document_type=25, # Tipo de documento para request de acuse VU
)
except Exception as e:
logger.error(f"Error al enviar solicitud SOAP: {e}")
response = await acuse_vu_controller.make_request_async(
"ventanilla-acuses-HA/ConsultaAcusesServiceWS?wsdl",
data=soap_xml,