From 9954beeb2eaeb2815ddceb7c32e4499cc8b18967 Mon Sep 17 00:00:00 2001 From: dfcarvajal Date: Tue, 18 Nov 2025 19:58:35 +0100 Subject: [PATCH] =?UTF-8?q?Refactorizaci=C3=B3n=20r=C3=A1pida=20de=20petic?= =?UTF-8?q?iones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flows.json | 4384 ++++++++++++++++++++++++++++++++++++++++++----- flows_cred.json | 2 +- 2 files changed, 3961 insertions(+), 425 deletions(-) diff --git a/flows.json b/flows.json index b172893..396d0ca 100644 --- a/flows.json +++ b/flows.json @@ -15,6 +15,14 @@ "info": "", "env": [] }, + { + "id": "6e1ee0f06e75580d", + "type": "tab", + "label": "Cartociudad Rapido", + "disabled": false, + "info": "", + "env": [] + }, { "id": "a3043505f409dd12", "type": "group", @@ -109,6 +117,109 @@ "advanced": "{}", "uriTabActive": "tab-uri-simple" }, + { + "id": "15fe39abe7f560b2", + "type": "ui-base", + "name": "My Dashboard", + "path": "/dashboard", + "appIcon": "", + "includeClientData": true, + "acceptsClientConfig": [ + "ui-notification", + "ui-control" + ], + "showPathInSidebar": false, + "headerContent": "page", + "navigationStyle": "default", + "titleBarStyle": "default", + "showReconnectNotification": true, + "notificationDisplayTime": 1, + "showDisconnectNotification": true, + "allowInstall": false + }, + { + "id": "423c5b5820f88c05", + "type": "ui-theme", + "name": "Default Theme", + "colors": { + "surface": "#ffffff", + "primary": "#0094CE", + "bgPage": "#eeeeee", + "groupBg": "#ffffff", + "groupOutline": "#cccccc" + }, + "sizes": { + "density": "default", + "pagePadding": "12px", + "groupGap": "12px", + "groupBorderRadius": "4px", + "widgetGap": "12px" + } + }, + { + "id": "d5367e576f526ae9", + "type": "ui-page", + "name": "Page 1", + "ui": "15fe39abe7f560b2", + "path": "/page1", + "icon": "home", + "layout": "grid", + "theme": "423c5b5820f88c05", + "breakpoints": [ + { + "name": "Default", + "px": 0, + "cols": 3 + }, + { + "name": "Tablet", + "px": 576, + "cols": 6 + }, + { + "name": "Small Desktop", + "px": 768, + "cols": 9 + }, + { + "name": "Desktop", + "px": 1024, + "cols": 12 + } + ], + "order": 1, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "2365cb156242b3e6", + "type": "ui-group", + "name": "Group 1", + "page": "d5367e576f526ae9", + "width": 6, + "height": 1, + "order": 2, + "showTitle": true, + "className": "", + "visible": true, + "disabled": false, + "groupType": "default" + }, + { + "id": "29e5d13e29bfbb4b", + "type": "ui-group", + "name": "Validar", + "page": "d5367e576f526ae9", + "width": 6, + "height": 1, + "order": 1, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, { "id": "da1a19e474be7c21", "type": "MSSQL", @@ -172,7 +283,7 @@ "finalize": "", "libs": [], "x": 430, - "y": 880, + "y": 1000, "wires": [ [ "535b18bcfc71f9cd" @@ -244,7 +355,7 @@ "finalize": "", "libs": [], "x": 160, - "y": 880, + "y": 1000, "wires": [ [ "d647c9286ddb06ce" @@ -269,7 +380,7 @@ "payload": "", "payloadType": "date", "x": 200, - "y": 940, + "y": 1060, "wires": [ [ "a5d5ef751185e3e9" @@ -289,7 +400,7 @@ "finalize": "", "libs": [], "x": 300, - "y": 1000, + "y": 1120, "wires": [ [ "495d54abe840ccc9" @@ -309,7 +420,7 @@ "finalize": "", "libs": [], "x": 390, - "y": 940, + "y": 1060, "wires": [ [ "3acef3e43d0415d4" @@ -330,7 +441,7 @@ "statusVal": "", "statusType": "auto", "x": 610, - "y": 1000, + "y": 1120, "wires": [] }, { @@ -347,7 +458,7 @@ "statusVal": "", "statusType": "auto", "x": 680, - "y": 880, + "y": 1000, "wires": [] }, { @@ -421,7 +532,7 @@ "rowsPerMsg": 1, "outputs": 1, "x": 770, - "y": 940, + "y": 1060, "wires": [ [] ] @@ -708,7 +819,7 @@ "t": "set", "p": "limit", "pt": "msg", - "to": "1000", + "to": "100", "tot": "num" }, { @@ -725,7 +836,7 @@ "to": "", "reg": false, "x": 620, - "y": 580, + "y": 700, "wires": [ [ "4af6fd0defd481ea" @@ -745,7 +856,7 @@ "handleDocId": false, "name": "", "x": 830, - "y": 580, + "y": 700, "wires": [ [ "4644d386e752575d" @@ -766,7 +877,7 @@ "statusVal": "", "statusType": "auto", "x": 840, - "y": 880, + "y": 1000, "wires": [] }, { @@ -791,7 +902,7 @@ "payload": "", "payloadType": "date", "x": 260, - "y": 580, + "y": 700, "wires": [ [ "4250b98e85f30aa3" @@ -808,7 +919,7 @@ "ec0a560685f299d8" ], "x": 935, - "y": 580, + "y": 700, "wires": [] }, { @@ -833,7 +944,7 @@ "payload": "", "payloadType": "date", "x": 180, - "y": 660, + "y": 480, "wires": [ [ "d66163bb05e6f12e", @@ -874,8 +985,8 @@ "from": "", "to": "", "reg": false, - "x": 460, - "y": 660, + "x": 500, + "y": 480, "wires": [ [ "004948a143b907dd" @@ -895,7 +1006,7 @@ "handleDocId": false, "name": "Consulta", "x": 720, - "y": 660, + "y": 480, "wires": [ [ "bb5ad864c986b15f" @@ -916,7 +1027,7 @@ "statusVal": "", "statusType": "auto", "x": 900, - "y": 660, + "y": 480, "wires": [] }, { @@ -952,14 +1063,141 @@ "from": "", "to": "", "reg": false, - "x": 450, - "y": 700, + "x": 490, + "y": 520, "wires": [ [ "004948a143b907dd" ] ] }, + { + "id": "5e1954f3ba4bce4b", + "type": "link in", + "z": "1a4b40705122dc91", + "name": "link in 3", + "links": [ + "0c8361e1ffd8995c", + "3105cb58919fe886" + ], + "x": 445, + "y": 660, + "wires": [ + [ + "4250b98e85f30aa3" + ] + ] + }, + { + "id": "7b7214ea354e3b74", + "type": "inject", + "z": "1a4b40705122dc91", + "name": "Activación - Recuperar geoposiciones de CartoCiudad tratamiento rapido", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": "1", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 320, + "y": 800, + "wires": [ + [ + "664bb290fa751036" + ] + ] + }, + { + "id": "664bb290fa751036", + "type": "change", + "z": "1a4b40705122dc91", + "name": "Preparación de la Consulta", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "find", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "limit", + "pt": "msg", + "to": "1", + "tot": "num" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"cartociudad\": { \"$exists\": false } }, { \"limit\" : msg.limit }]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 720, + "y": 800, + "wires": [ + [ + "ae75d79916e0a333" + ] + ] + }, + { + "id": "ae75d79916e0a333", + "type": "mongodb4", + "z": "1a4b40705122dc91", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 930, + "y": 800, + "wires": [ + [ + "d1035ff8c39cd84c" + ] + ] + }, + { + "id": "d1035ff8c39cd84c", + "type": "link out", + "z": "1a4b40705122dc91", + "name": "Limpieza Rápida", + "mode": "link", + "links": [ + "a66d44720bfed89d" + ], + "x": 1035, + "y": 800, + "wires": [] + }, { "id": "1fd044cbc45e1620", "type": "function", @@ -972,8 +1210,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 310, - "y": 300, + "x": 590, + "y": 860, "wires": [ [ "c58559633003fc35" @@ -996,8 +1234,8 @@ "authType": "", "senderr": false, "headers": [], - "x": 230, - "y": 340, + "x": 830, + "y": 860, "wires": [ [ "c2879b84c754c37d" @@ -1016,8 +1254,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 420, - "y": 340, + "x": 1020, + "y": 860, "wires": [ [ "3a02a4797e73bfe2" @@ -1089,7 +1327,7 @@ "id": "d3881558e6fef33f", "type": "change", "z": "a796bfad8ab76fe4", - "name": "Generamos las referencias y la consulta de la calle", + "name": "Generamos referencia_geocache y consulta_calle", "rules": [ { "t": "set", @@ -1115,7 +1353,7 @@ "y": 80, "wires": [ [ - "3112772543b09bd9" + "065d8956ac11a589" ] ] }, @@ -1123,15 +1361,8 @@ "id": "3112772543b09bd9", "type": "change", "z": "a796bfad8ab76fe4", - "name": "Guardamos la dirección y creamos la consulta en el cache", + "name": "Creamos la consulta de referencia_geocache", "rules": [ - { - "t": "set", - "p": "direccion", - "pt": "msg", - "to": "payload", - "tot": "msg" - }, { "t": "set", "p": "operation", @@ -1150,7 +1381,7 @@ "t": "set", "p": "payload", "pt": "msg", - "to": "[{ \"referencia_geocache\": { \"$eq\": msg.referencia_geocache } }, { \"limit\" : msg.limit }]", + "to": "[{ \"referencia_geocache\": { \"$eq\": msg.referencia_geocache }}]", "tot": "jsonata" } ], @@ -1159,8 +1390,8 @@ "from": "", "to": "", "reg": false, - "x": 410, - "y": 140, + "x": 370, + "y": 160, "wires": [ [ "67310a0b495f77a2" @@ -1179,8 +1410,8 @@ "maxTimeMS": "0", "handleDocId": false, "name": "", - "x": 270, - "y": 200, + "x": 630, + "y": 160, "wires": [ [ "304f30478bb9e954" @@ -1207,14 +1438,14 @@ "checkall": "true", "repair": false, "outputs": 2, - "x": 480, - "y": 200, + "x": 840, + "y": 160, "wires": [ [ - "b176ccfcb67d19a0" + "039fe8c413696211" ], [ - "2432622b4a8371d9" + "ea5fca57029b791a" ] ], "outputLabels": [ @@ -1242,16 +1473,14 @@ "checkall": "true", "repair": false, "outputs": 2, - "x": 620, - "y": 340, + "x": 1220, + "y": 860, "wires": [ [ - "74306aa17eeb2b5e", - "0b0d1db5adb29e98", - "6a58b6dfedf7cc13" + "b5d1699d2f623f08" ], [ - "25a80352d25475a2" + "5d8fed0824f5d590" ] ], "outputLabels": [ @@ -1283,7 +1512,7 @@ "t": "set", "p": "payload", "pt": "msg", - "to": "{ \"referencia_geocache\": referencia_geocache, \"lat\": payload.lat, \"lon\": payload.lon}", + "to": "{\t \"referencia_geocache\": referencia_geocache,\t \"lat\": actualizar.lat,\t \"lon\": actualizar.lon,\t \"address\": actualizar.address,\t \"muni\": actualizar.muni,\t \"province\": actualizar.province,\t \"accion\" : \"validado\"\t}", "tot": "jsonata" } ], @@ -1292,8 +1521,8 @@ "from": "", "to": "", "reg": false, - "x": 370, - "y": 460, + "x": 570, + "y": 1380, "wires": [ [ "aa8980407983e089" @@ -1312,10 +1541,12 @@ "maxTimeMS": "0", "handleDocId": false, "name": "", - "x": 690, - "y": 460, + "x": 890, + "y": 1380, "wires": [ - [] + [ + "22e91d97b48287ac" + ] ] }, { @@ -1330,10 +1561,12 @@ "maxTimeMS": "0", "handleDocId": false, "name": "", - "x": 690, - "y": 540, + "x": 890, + "y": 1440, "wires": [ - [] + [ + "183f81d1ad8abb3f" + ] ] }, { @@ -1369,181 +1602,14 @@ "from": "", "to": "", "reg": false, - "x": 380, - "y": 540, + "x": 580, + "y": 1440, "wires": [ [ "a37d6875203d3cef" ] ] }, - { - "id": "4063e875162c944d", - "type": "link out", - "z": "a796bfad8ab76fe4", - "name": "OUT - Procesar", - "mode": "link", - "links": [ - "717811bdd780a620" - ], - "x": 835, - "y": 200, - "wires": [] - }, - { - "id": "717811bdd780a620", - "type": "link in", - "z": "a796bfad8ab76fe4", - "name": "IN - Procesar", - "links": [ - "4063e875162c944d" - ], - "x": 105, - "y": 300, - "wires": [ - [ - "1fd044cbc45e1620" - ] - ] - }, - { - "id": "25a80352d25475a2", - "type": "link out", - "z": "a796bfad8ab76fe4", - "name": "OUT - Actualizar servicios", - "mode": "link", - "links": [ - "a5b95491428a914b" - ], - "x": 755, - "y": 380, - "wires": [] - }, - { - "id": "a5b95491428a914b", - "type": "link in", - "z": "a796bfad8ab76fe4", - "name": "IN - Actualizar servicios", - "links": [ - "25a80352d25475a2" - ], - "x": 105, - "y": 500, - "wires": [ - [ - "ee3b382fec9125f9", - "2c1d536a860b099e" - ] - ] - }, - { - "id": "74306aa17eeb2b5e", - "type": "debug", - "z": "a796bfad8ab76fe4", - "name": "Error de datos de cartociudad", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 1030, - "y": 420, - "wires": [] - }, - { - "id": "96d63073d4c3043e", - "type": "change", - "z": "a796bfad8ab76fe4", - "name": "Actualizamos los datos de la calle afectada por la memoria histórica", - "rules": [ - { - "t": "set", - "p": "operation", - "pt": "msg", - "to": "updateMany", - "tot": "str" - }, - { - "t": "set", - "p": "collection", - "pt": "msg", - "to": "servicios_consolidado_calle_filtrado", - "tot": "str" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP \t\t },\t {\t \"$set\": {\t \"Calle\": msg.cambio.calle\t } \t }\t]", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 640, - "y": 660, - "wires": [ - [ - "5be9c850777e19f4" - ] - ] - }, - { - "id": "5be9c850777e19f4", - "type": "mongodb4", - "z": "a796bfad8ab76fe4", - "clientNode": "648a51546e4dadc6", - "mode": "collection", - "collection": "", - "operation": "", - "output": "toArray", - "maxTimeMS": "0", - "handleDocId": false, - "name": "", - "x": 970, - "y": 660, - "wires": [ - [ - "61bddcdd604826da" - ] - ] - }, - { - "id": "0b0d1db5adb29e98", - "type": "link out", - "z": "a796bfad8ab76fe4", - "name": "OUT - Fallos para Arreglar", - "mode": "link", - "links": [ - "37f1c5b138623383", - "e795e6d956e3180e" - ], - "x": 755, - "y": 300, - "wires": [] - }, - { - "id": "37f1c5b138623383", - "type": "link in", - "z": "a796bfad8ab76fe4", - "name": "IN - Memoria Historica", - "links": [ - "0b0d1db5adb29e98" - ], - "x": 105, - "y": 660, - "wires": [ - [ - "92e5a359bb49899f" - ] - ] - }, { "id": "92e5a359bb49899f", "type": "function", @@ -1556,133 +1622,17 @@ "initialize": "", "finalize": "", "libs": [], - "x": 260, - "y": 660, + "x": 1000, + "y": 2280, "wires": [ - [ - "96d63073d4c3043e" - ] + [] ] }, - { - "id": "63bf04cd67af12fd", - "type": "function", - "z": "a796bfad8ab76fe4", - "name": "Calles con Mala codificación", - "func": "msg.cambio = msg.cambio || {};\n\nconst cambios = {\n \"CAMINO SALOBRAL MADRID\": { tipovia: \"Carretera\", calle: \"Estación de Contenedores\", numero_retirada: \"4\" },\n \"CARRETERA VILLAVERDE KM 4.8 GETAFE\": { numero_retirada: \"4\" },\n \"GLORIETA SANDRO PERTINI MADRID\": { extra_calle: \"28043\" },\n \"PLAZA CIUDAD LINEAL MADRID\": { tipovia: \"CALLE\", calle: \"ALCALA\", numero_retirada: \"423\" },\n \"CAMINO CABESTREROS 9 MADRID\": { tipovia: \"CALLE\", calle: \"CABESTREROS\" },\n \"PLAZA CORREGIDOR CONDE DE MACEDA Y TABOADA MADRID\": { tipovia: \"CALLE\", calle: \"PICO DE LOS ARTILLEROS\", numero_retirada: \"150\" },\n \"AVENIDA AMERICA 2 FUENLABRADA\": { numero_retirada: \"SN\", extra_calle: \"2\" },\n \"AVENIDA AMERICA FUENLABRADA\": { numero_retirada: \"SN\", extra_calle: \"2\" },\n \"CALLE TACONA COMISARÍA MADRID\": { numero_retirada: \"33\" },\n \"CALLE DOCTOR TOLOSA LATOUR FAROLA 62 MADRID\": { numero_retirada: \"62\" },\n \"PLAZA BARICHARA 4 MADRID\": { tipovia: \"CALLE\" },\n \"PLAZA BARICHARA 2 MADRID\": { tipovia: \"CALLE\" },\n \"CALLE QUINTANAORTUÑO MADRID\": { calle: \"QUINTANAPALLA\" },\n \"CALLE GABRIEL MIRO 1 MADRID\": { tipovia: \"PLAZA\" },\n \"CAMINO CABESTROS 9 MADRID\": { tipovia: \"CALLE\", calle: \"CABESTREROS\" },\n \"CALLE BENIMAMET FRENTE 6 MADRID\": { tipovia: \"CALLE\", numero_retirada: \"6\" },\n \"GLORIETA DE LOS NEVEROS MADRID\": { tipovia: \"CALLE\", calle: \"PUERTA DEL ANGEL\", numero_retirada: \"10\" },\n \"GLORIETA DE LOS PATINES MADRID\": { tipovia: \"CALLE\", calle: \"PUERTA DEL ANGEL\", numero_retirada: \"10\" },\n \"PASEO GENERAL SAGARDIA RAMOS 21 MADRID\": { tipovia: \"PLAZA\" },\n \"PASEO GENERAL SAGARDIA RAMOS MADRID\": { tipovia: \"PLAZA\" },\n \"CALLE LUSCINDA FTE 7 MADRID\": { numero_retirada: \"7\" },\n \"CAMINO LEÑEROS MADRID\": { tipovia: \"CALLE\" },\n \"CALLE SANTIAGO RUISEÑOR MADRID\": { tipovia: \"SANTIAGO RUSIÑOL\" },\n \"CALLE PARQUE FERIAL JUAN CARLOS I MADRID\": { tipovia: \"VIA\", calle: \"DUBLIN\", numero_retirada: \"6\" },\n \"ACCESO PARKING PARQUE JUAN CARLOS I MADRID\": { tipovia: \"VIA\", calle: \"DUBLIN\", numero_retirada: \"6\" },\n \"PLAZA LIMA 2 MADRID\": { tipovia: \"PASEO\", calle: \"DE LA CASTELLANA\", numero_retirada: \"140\" },\n \"CALLE ROSALEDA S/N MADRID\": { calle: \"DE LA ROSALEDA\", numero_retirada: \"2\" },\n \"CALLE SEVERINO AZNAR EMBID FTE 3 MADRID\": { numero_retirada: \"3\" },\n \"ACCESO VILLAROSA MADRID\": { tipovia: \"CALLE\", calle: \"CHAPARRAL\", numero_retirada: \"47\" },\n \"CALLE PENELOPE ORION MADRID\": { tipovia: \"CALLE\", calle: \"PENELOPE\", numero_retirada: \"2\" },\n \"GLORIETA SU ALTEZA REAL JUAN CARLOS I 2 MADRID\": { tipovia: \"GLORIETA\", calle: \"SU ALTEZA REAL JUAN CARLOS\", numero_retirada: \"1\" },\n \"GLORIETA SU ALTEZA REAL JUAN CARLOS 1 MADRID\": { tipovia: \"VIA\", calle: \"DUBLIN\", numero_retirada: \"6\" },\n \"GLORIETA SU ALTE¡ZA REAL JUAN CARLOS I 1 MADRID\": { tipovia: \"GLORIETA\", calle: \"SU ALTEZA REAL JUAN CARLOS\", numero_retirada: \"1\" },\n \"ACCES VIRGEN FUENCISLA 5 MADRID\": { tipovia: \"CALLE\", calle: \"VIRGEN DE LA FUENCISLA\", numero_retirada: \"2\" },\n \"CALLE PASEO CASTELLANA MADRID\": { tipovia: \"PASEO\", calle: \"DE LA CASTELLANA\", numero_retirada: \"140\" },\n \"ACCESO AVENIDA DE LOS TOREROS MADRID\": { tipovia: \"AVENIDA\", calle: \"DE LOS TOREROS\", numero_retirada: \"4\" },\n \"ACCESO VELAZQUEZ 9 MADRID\": { tipovia: \"CALLE\", numero_retirada: \"9\" },\n \"ACCESO PLAZA ENCARNACIÓN 21 MADRID\": { tipovia: \"PLAZA\", calle: \"ENCARNACIÓN\", numero_retirada: \"21\" },\n \"ACCESO PLAZA MARINA ESPAÑOLA 7 MADRID\": { tipovia: \"PLAZA\", calle: \"MARINA ESPAÑOLA\", numero_retirada: \"7\" },\n \"CALLE RIBERA DE SAN FERMIN MADRID\": { tipovia: \"AVENIDA\", calle: \"SAN FERMIN\", numero_retirada: \"16\" },\n \"ACCESO NARCIS MONTURIOL 5 MADRID\": { calle: \"NARCISO MONTURIOL\" },\n \"CALLE AEROPUERTO MADRID\": { numero_retirada: \"10\" },\n \"ESTACION ATOCHA (TODA EXCEPTO CERCANÍAS) MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"CALLE RONDA DE ATOCHA MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"ACCESO PARKING ESTACION DE ATOCHA S/N MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA S/N MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"AVENIDA MENDEZ ALVARO 1 MADRID\": { tipovia: \"CALLE\", calle: \"MENDEZ ALVARO\", numero_retirada: \"1\" },\n \"CALLE FARO DE MONCLOA MADRID\": { tipovia: \"AVENIDA\", calle: \"REYES CATÓLICOS\", numero_retirada: \"6\" },\n \"ACCES AEROPUERTO TI SALIDAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO AEROPUERTO T-1 SALIDAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCES AEROPUERTO BARAJAS 2 MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO BARAJAS TI SALIDAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCES BARAJAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ZONA AEROPUERTO BARAJAS T1 LLEGADAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO AEROPUERTO T2 SALIDAS 2 MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO AEROPUERTO T2 SALIDAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO BARAJAS T2 LLEGADAS MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO AEROPUERTO CENTRO CARGA AEREA 2 MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"ACCESO AEROPUERTO DE BARAJAS T3 MADRID\": { tipovia: \"CAMINO\", calle: \"CUARTEL\", numero_retirada: \"11\" },\n \"CIRCUNVALACION M 30 KM9 MADRID\": { tipovia: \"CALLE\", calle: \"PICO CLAVERO\", numero_retirada: \"6\" },\n \"CIRCUNVALACION M 30 KM 10.500 MADRID\": { tipovia: \"CALLE\", calle: \"PICO CLAVERO\", numero_retirada: \"6\" },\n \"ACCES VILLA DE MARIN 1 MADRID\": { tipovia: \"CALLE\", calle: \"PICO CLAVERO\", numero_retirada: \"6\" },\n \"CALLE PARQUE AGUSTIN RODRIGUEZ SAHAGUN MADRID\": { tipovia: \"PASEO\", calle: \"DIRECCION\", numero_retirada: \"202\" },\n \"CALLE PARQUE AGUSTIN RODRIGUEZ SAHAGUN 227 MADRID\": { tipovia: \"PASEO\", calle: \"DIRECCION\", numero_retirada: \"202\" },\n \"ACCESO M30 C1ª PK 24800 MADRID\": { tipovia: \"CARRETERA\", calle: \"EL PARDO\", numero_retirada: \"25\" },\n \"CALLE EMILIO DE LA TEJADA MADRID\": { tipovia: \"CALLE\", calle: \"GRANJA DE TORREHERMOSA\", numero_retirada: \"1\" },\n \"CALLE PEDRO BOSCH, DEL 1 Y 2 AL PUENTE FERROCARRIL MADRID\": { tipovia: \"CALLE\", calle: \"PEDRO BOSCH\", numero_retirada: \"1\" },\n \"ACCESO M30 C2ª PK 5 MADRID\": { tipovia: \"CALLE\", calle: \"VIRGEN DE LA PAZ\", numero_retirada: \"24\" },\n \"ACCESO M30 C2ª KM 5.700 MADRID\": { tipovia: \"CALLE\", calle: \"VIRGEN DE LA PAZ\", numero_retirada: \"24\" },\n \"CARRETERA N11 SALIDA SOBRE PUENTE M30 MADRID\": { tipovia: \"AVENIDA\", calle: \"DE BURGOS\", numero_retirada: \"42\" },\n \"ACCES M - 11 MADRID\": { tipovia: \"AVENIDA\", calle: \"DE BURGOS\", numero_retirada: \"42\" },\n \"ACCES M-11 MADRID\": { tipovia: \"AVENIDA\", calle: \"DE BURGOS\", numero_retirada: \"42\" },\n \"CALLE SANTA CATALINA DE LOS DONADOS 2 MADRID\": { tipovia: \"CALLE\", calle: \"DE LOS DONADOS\", numero_retirada: \"3\" },\n \"CALLE SANTA CATALINA DE LOS DONADOS 4 MADRID\": { tipovia: \"CALLE\", calle: \"DE LOS DONADOS\", numero_retirada: \"3\" },\n \"PASEO VIRGEN DEL PUERTO, ALTO MADRID\": { tipovia: \"PASEO\", calle: \"VIRGEN DEL PUERTO\", numero_retirada: \"6\" },\n \"ACCESO M 30 SALIDA CASA DE CAMPO 2 MADRID\": { tipovia: \"PASEO\", calle: \"SAN POL DEL MAR\", numero_retirada: \"5\" },\n \"ACCESO M30 AVDA. DE LA PAZ MADRID\": { tipovia: \"CALLE\", calle: \"RETAMA\", numero_retirada: \"8\" },\n \"ACCES RONDA DEL SUR MADRID\": { tipovia: \"RONDA\", calle: \"DEL SUR\", numero_retirada: \"6\" },\n \"CALLE JOSE ORTEGA Y GASETT MADRID\": { calle: \"JOSE ORTEGA Y GASSET\", numero_retirada: \"6\" },\n \"CALLE JOSE ORTEGA Y GASETT 6 MADRID\": { calle: \"JOSE ORTEGA Y GASSET\", numero_retirada: \"6\" },\n \"CALLE JOSE ORTEGA Y GASETT 9 MADRID\": { calle: \"JOSE ORTEGA Y GASSET\", numero_retirada: \"6\" },\n \"AVENIDA CAPITAL DE ESPAÑA-MADRID MADRID\": { calle: \"CAPITAL DE ESPAÑA\" },\n \"CALLE CIUDAD UNIVERSITARIA MADRID\": { tipovia: \"AVENIDA\", calle: \"COMPLUTENSE\", numero_retirada: \"3\" },\n \"GLORIETA CTM MADRID\": { tipovia: \"CARRETERA\", calle: \"VILLAVERDE A VALLECAS\", numero_retirada: \"236\" },\n \"AVENIDA ANDALUCIA, DEL KM. 8,501 AL 12,000 MADRID\": { tipovia: \"AVENIDA\", calle: \"ANDALUCIA\", numero_retirada: \"9\" },\n \"ACCESO M40 C2ª TANATORIO MADRID\": { tipovia: \"AVENIDA\", calle: \"ROSALES\", numero_retirada: \"30\" },\n \"CIRCUNVALACION M30 KM. 6,00 MADRID\": { tipovia: \"AVENIDA\", calle: \"ROSALES\", numero_retirada: \"30\" },\n \"CIRCUNVALACION M30 MADRID\": { tipovia: \"AVENIDA\", calle: \"ROSALES\", numero_retirada: \"30\" },\n \"ACCESO M203 ENTRADA ERMITA MADRID\": { tipovia: \"CALLE\", calle: \"PIROTECNIA\", numero_retirada: \"83\" },\n \"CALLE SAN EDUARDO MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL MARGALLO\", numero_retirada: \"6\" },\n \"CALLE ESTACIONAMIENTO ZOO CASA CAMPO MADRID\": { tipovia: \"PASEO\", calle: \"ZARZON\", numero_retirada: \"2\" },\n \"ACCESO CASA DE CAMPO - PARQUE ATRACCIONES MADRID\": { tipovia: \"PASEO\", calle: \"ZARZON\", numero_retirada: \"2\" },\n \"ACCESO CASA DE CAMPO-PARQUE ATRACCIONES MADRID\": { tipovia: \"PASEO\", calle: \"ZARZON\", numero_retirada: \"2\" },\n \"ACCESO M40 C1ª KM 31.00 MADRID\": { tipovia: \"CALLE\", calle: \"SAN BERNARDO\", numero_retirada: \"13\" },\n \"EDIFICIOS COMISARIA DE CHAMARTIN MADRID\": { tipovia: \"CALLE\", calle: \"AGUSTIN DE FOXA\", numero_retirada: \"52\" },\n \"PASEO MUÑOZ GRANDES 3 MADRID\": { tipovia: \"PASEO\", calle: \"MARCELINO CAMACHO\", numero_retirada: \"3\" },\n \"CALLE ARAGON (PROSPERIDAD) MADRID\": { tipovia: \"PASEO\", calle: \"ARAGON\", numero_retirada: \"29\" },\n \"CARRETERA A-3 ACCESO A VALDEMINGOMEZ 00 MADRID\": { tipovia: \"AVENIDA\", calle: \"LABORAL\", numero_retirada: \"3\" },\n \"CAMINO VERTEDERO/VALDEMINGOMEZ S/N MADRID\": { tipovia: \"AVENIDA\", calle: \"LABORAL\", numero_retirada: \"3\" },\n \"CARRETERA DEL VERTEDERO S/N MADRID\": { tipovia: \"AVENIDA\", calle: \"LABORAL\", numero_retirada: \"3\" },\n \"RONDA VALDEMINGOMEZ MADRID\": { tipovia: \"AVENIDA\", calle: \"LABORAL\", numero_retirada: \"3\" },\n \"CALLE LERIDA (TETUAN) 7 MADRID\": { tipovia: \"CALLE\", calle: \"LERIDA\", numero_retirada: \"3\" },\n \"EDIFICIO COMISARIA DE LATINA MADRID\": { tipovia: \"CALLE\", calle: \"ERIKA\", numero_retirada: \"3\" },\n \"CARRETERA CORUÑA, DE LA, DEL KM. 1 AL 7,500 MADRID\": { tipovia: \"AVENIDA\", calle: \"PADRE HUIDOBRO\", numero_retirada: \"7\" },\n \"ZONA TALLER DE ARGANDA MADRID\": { tipovia: \"CALLE\", calle: \"SIERRA CARBONERA\", numero_retirada: \"44\" },\n \"ACCESO AEROPUERTO BARAJAS T4 SALIDAS MADRID\": { tipovia: \"CALLE\", calle: \"JUPITER\", numero_retirada: \"29\" },\n \"ACCESO AEROPUERTO BARAJAS T-4 2 MADRID\": { tipovia: \"CALLE\", calle: \"JUPITER\", numero_retirada: \"29\" },\n \"CALLE ARROYO FRESNO 2 MADRID\": { tipovia: \"CALLE\", calle: \"ARROYO DEL MONTE\", numero_retirada: \"2\" },\n \"ACCESO ESTADIO VICENTE CALDERON MADRID\": { tipovia: \"PASEO\", calle: \"DE LOS MELANCOLICOS\", numero_retirada: \"50\" },\n \"ACCES ESTADIO VICENTE CALDERON 42 MADRID\": { tipovia: \"PASEO\", calle: \"DE LOS MELANCOLICOS\", numero_retirada: \"50\" },\n \"ACCES ESTADIO VICENTE CALDERON MADRID\": { tipovia: \"PASEO\", calle: \"DE LOS MELANCOLICOS\", numero_retirada: \"50\" },\n \"PLAZA HISPANIDAD MADRID\": { tipovia: \"CALLE\", calle: \"DEL GALEON\", numero_retirada: \"16\" },\n \"POBLADO CAÑADA REAL GALIANA MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"CAMINO CAÑADA REAL GALIANA 167 MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"CAMINO CAÑADA REAL GALIANA 137 MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"ACCES CAÑADA REAL MERINAS MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"CALLE CAÑADA REAL GALIANA 9 MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"CAÑADA REAL GALIANA S/N MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"POBLADO CAÑAVERAL 2 MADRID\": { tipovia: \"CALLE\", calle: \"CHARCO ALTO\", numero_retirada: \"17\" },\n \"LUGAR HOSPITAL RAMON Y CAJAL MADRID\": { tipovia: \"CALLE\", calle: \"ANTONIO ROBLES\", numero_retirada: \"1\" },\n \"PLAZA ESTORIL MADRID\": { tipovia: \"CALLE\" },\n \"CALLEJON RESINA MADRID\": { tipovia: \"CALLE\", numero_retirada: \"41\" },\n \"CALLE MARQUES DE VADILLO 1 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL RICARDOS\", numero_retirada: \"2\" },\n \"CAMINO MENESES MADRID\": { tipovia: \"CALLE\", numero_retirada: \"4\" },\n \"LUGAR VENTA DEL BATAN MADRID\": { tipovia: \"PASEO\", calle: \"DE LA VENTA\", numero_retirada: \"1\" },\n \"CALLE MIMBRERAS DE LATINA MADRID\": { tipovia: \"PLAZA\", calle: \"DE LA CEBADA\", numero_retirada: \"10\" },\n \"AUTOVIA M 30 19500 MADRID\": { tipovia: \"PASEO\", calle: \"DE LA FLORIDA\", numero_retirada: \"23\" },\n \"ACCES CDOR DIEGO VALDERRABANO MADRID\": { tipovia: \"CALLE\", calle: \"DEL CORREGIDOR DIEGO DE VALDERRABANO\", numero_retirada: \"4\" },\n \"TUNEL COSTA RICA M30 MADRID\": { tipovia: \"CALLE\", calle: \"ALBERTO ALCOCER\", numero_retirada: \"46\" },\n \"ACCES PASEO DE LA CASTELLANA MADRID\": { tipovia: \"PASEO\", calle: \"DE LA CASTELLANA\", numero_retirada: \"2\" },\n \"PASAJE MONTSERRAT MADRID\": { numero_retirada: \"6\" },\n \"ACCESO A-4 KM 5.100 MADRID\": { tipovia: \"CALLE\", calle: \"EMBAJADORES\", numero_retirada: \"286\" },\n \"CARRETERA CARABANCHEL-VILLAVERDE (MARGEN DERECHO) MADRID\": { calle: \"CARRETERA CARABANCHEL VILLAVERDE\", numero_retirada: \"135\" },\n \"CARRETERA CARABANCHEL-VILLAVERDE (MARGEN DERECHO) 135 MADRID\": { calle: \"CARRETERA CARABANCHEL VILLAVERDE\", numero_retirada: \"135\" },\n \"CALLE CASTALIA (PUENTE DE VALLECAS) MADRID\": { tipovia: \"CALLE\", calle: \"CASTALIA\", numero_retirada: \"5\" },\n \"CARRETERA A-5 KM 6 ENTRADA MADRID\": { tipovia: \"PASEO\", calle: \"EXTREMADURA\", numero_retirada: \"309\" },\n \"ACCES FELIX RODRIGUEZ FUENTE 9 MADRID\": { tipovia: \"PASEO\", calle: \"DE LOS CEREZOS\", numero_retirada: \"25\" },\n \"CARRETERA DE VALENCIA KM 7,300 MADRID\": { tipovia: \"CALLE\", calle: \"PROVISIONAL HOSPITAL DE VALLECAS\", numero_retirada: \"1\" },\n \"CALLE MADERA SB MADRID\": { numero_retirada: \"1\" },\n \"CARRETERA CORUÑA KM 4.500 2 MADRID\": { tipovia: \"CALLE\", calle: \"PROVISIONAL HOSPITAL DE VALLECAS\", numero_retirada: \"1\" },\n \"ACCESO M30 PK 12,300 MADRID\": { tipovia: \"PUERTO\", calle: \"DE LA CRUZ VERDE\", numero_retirada: \"31\" },\n \"CALLE BASAURI SB MADRID\": { numero_retirada: \"1\" },\n \"PLAZA GENERAL SAGARDIA RAMOS SN MADRID\": { tipovia: \"PLAZA\", calle: \"GENERAL SAGARDIA RAMOS\", numero_retirada: \"1\" },\n \"PLAZA GENERAL SAGARDIA RAMOS 1 MADRID\": { tipovia: \"PLAZA\", calle: \"GENERAL SAGARDIA RAMOS\", numero_retirada: \"1\" },\n \"GLORIETA BEATA ANA MARIA DE JESUS 3 MADRID\": { tipovia: \"GLORIETA\", calle: \"BEATA ANA MARÍA DE JESÚS\", numero_retirada: \"3\" },\n \"PLAZA REPUBLICA DE CHILE 0 MADRID\": { tipovia: \"PLAZA\", calle: \"REPÚBLICA DE CHILE\", numero_retirada: \"1\" },\n \"ACCESO M40 PROLONGACION ODONELL 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"PADRE CARLOS DORESTE\", numero_retirada: \"1\" },\n \"ACCESO A4 STDO MADRID INCORPORACION M30 C 1 0 MADRID\": { tipovia: \"AVENIDA\", calle: \"DE ANDALUCÍA\", numero_retirada: \"120\" },\n \"CALLE MALAGA CHAMBERI 5 MADRID\": { tipovia: \"CALLE\", calle: \"MÁLAGA\", numero_retirada: \"5\" },\n \"CALLE MALAGA CHAMBERI 0 MADRID\": { tipovia: \"CALLE\", calle: \"MÁLAGA\", numero_retirada: \"5\" },\n \"ACCESO M30 C1 SALIDA LEGAZPI 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"LEGAZPI\", numero_retirada: \"1\" },\n \"CALLE GABRIEL MIRO 8 MADRID\": { tipovia: \"CALLE\", calle: \"GABRIEL MIRÓ\", numero_retirada: \"8\" },\n \"CALLE GABRIEL MIRO 4 MADRID\": { tipovia: \"CALLE\", calle: \"GABRIEL MIRÓ\", numero_retirada: \"8\" },\n \"CALLE GABRIEL MIRO 3 MADRID\": { tipovia: \"CALLE\", calle: \"GABRIEL MIRÓ\", numero_retirada: \"8\" },\n \"CALLE GABRIEL MIRO 2 MADRID\": { tipovia: \"CALLE\", calle: \"GABRIEL MIRÓ\", numero_retirada: \"8\" },\n \"ACCES LA CELSA 0 MADRID\": { tipovia: \"CALLE\", calle: \"CELSA\", numero_retirada: \"1\" },\n \"CALLE PEÑA PRIETA 8 MADRID\": { tipovia: \"CALLE\", calle: \"PEÑA PRIETA\", numero_retirada: \"8\" },\n \"CALLE RICARDO LEON Y GENERAL MITRE SN MADRID\": { tipovia: \"CALLE\", calle: \"RICARDO LEÓN\", numero_retirada: \"25\" },\n \"GLORIETA VALDEPERDICES 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"VALDEPERDICES\", numero_retirada: \"1\" },\n \"ZONA PARKING ESTACION DE SANTA EUGENIA 0 MADRID\": { tipovia: \"CALLE\", calle: \"SANTA EUGENIA\", numero_retirada: \"95\" },\n \"ACCES RONDA DE SEGOVIA 2 MADRID\": { tipovia: \"RONDA\", calle: \"DE SEGOVIA\", numero_retirada: \"2\" },\n \"ACCES RONDA DE SEGOVIA 7 MADRID\": { tipovia: \"RONDA\", calle: \"DE SEGOVIA\", numero_retirada: \"2\" },\n \"ACCES RONDA DE SEGOVIA SN MADRID\": { tipovia: \"RONDA\", calle: \"DE SEGOVIA\", numero_retirada: \"2\" },\n \"ACCES RONDA DE SEGOVIA 0 MADRID\": { tipovia: \"RONDA\", calle: \"DE SEGOVIA\", numero_retirada: \"2\" },\n \"ACCESO PARKING ATOCHA SN MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKING ATOCHA 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCES PARKIN ESTACION DE ATOCHA 00 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCES PARKIN ESTACION DE ATOCHA 5 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCES PARKIN ESTACION DE ATOCHA 21 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCES PARKIN ESTACION DE ATOCHA SN MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCES PARKIN ESTACION DE ATOCHA 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 3 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 78 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 2 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 16 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 23 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"ACCESO PARKIN ESTACION ATOCHA 62 MADRID\": { tipovia: \"GLORIETA\", calle: \"CARLOS V\", numero_retirada: \"1\" },\n \"BARRIO VALDEMINGOMEZ 0 MADRID\": { tipovia: \"CALLE\", calle: \"VALDEMINGÓMEZ\", numero_retirada: \"1\" },\n \"BARRIO VALDEMINGOMEZ SN MADRID\": { tipovia: \"CALLE\", calle: \"VALDEMINGÓMEZ\", numero_retirada: \"1\" },\n \"RONDA VALDEMINGOMEZ 2 MADRID\": { tipovia: \"RONDA\", calle: \"VALDEMINGÓMEZ\", numero_retirada: \"2\" },\n \"ACCESO AVENIDA EL FERROL SN MADRID\": { tipovia: \"AVENIDA\", calle: \"DEL FERROL\", numero_retirada: \"7\" },\n \"ACCESO AVENIDA EL FERROL 7 MADRID\": { tipovia: \"AVENIDA\", calle: \"DEL FERROL\", numero_retirada: \"7\" },\n \"ACCESO M30 C1ª PK 8 00 0 MADRID\": { tipovia: \"CALLE\", calle: \"M-30\", numero_retirada: \"8\" },\n \"CALLE CASA LARREINA 3 MADRID\": { tipovia: \"CALLE\", calle: \"CASA LARREINA\", numero_retirada: \"3\" },\n \"CALLE CASA LARREINA 2 MADRID\": { tipovia: \"CALLE\", calle: \"CASA LARREINA\", numero_retirada: \"3\" },\n \"AUTOVIA M 203 SN MADRID\": { tipovia: \"CARRETERA\", calle: \"M-203\", numero_retirada: \"1\" },\n \"CALLE GENERAL ROMERO BASART 25 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL ROMERO BASARTE\", numero_retirada: \"25\" },\n \"CALLE GENERAL ROMERO BASART 54 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL ROMERO BASARTE\", numero_retirada: \"25\" },\n \"CALLE GENERAL ROMERO BASART 31 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL ROMERO BASARTE\", numero_retirada: \"25\" },\n \"CALLE GENERAL ROMERO BASART 72 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL ROMERO BASARTE\", numero_retirada: \"25\" },\n \"CALLE GENERAL ROMERO BASART 0 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL ROMERO BASARTE\", numero_retirada: \"25\" },\n \"VIA DE SERVICIO EL BOSCO 2 MADRID\": { tipovia: \"CALLE\", calle: \"EL BOSCO\", numero_retirada: \"2\" },\n \"PASAJE MONSERRAT 0 MADRID\": { tipovia: \"PASAJE\", calle: \"MONTSERRAT\", numero_retirada: \"1\" },\n \"PASAJE MONSERRAT SN MADRID\": { tipovia: \"PASAJE\", calle: \"MONTSERRAT\", numero_retirada: \"1\" },\n \"ZONA AEROPUERTO BARAJAS T1 LLEGADAS 2 MADRID\": { tipovia: \"TERMINAL\", calle: \"AEROPUERTO BARAJAS T1\", numero_retirada: \"1\" },\n \"ZONA AEROPUERTO BARAJAS T1 LLEGADAS 00 MADRID\": { tipovia: \"TERMINAL\", calle: \"AEROPUERTO BARAJAS T1\", numero_retirada: \"1\" },\n \"CALLE EDUARDO BARREIROS C V JOSE PEREZ SN MADRID\": { tipovia: \"CALLE\", calle: \"EDUARDO BARREIROS\", numero_retirada: \"1\" },\n \"CALLE EDUARDO BARREIROS C V JOSE PEREZ 0 MADRID\": { tipovia: \"CALLE\", calle: \"EDUARDO BARREIROS\", numero_retirada: \"1\" },\n \"EDIFICIO COMISARIA VILLA DE VALLECAS 0 MADRID\": { tipovia: \"CALLE\", calle: \"RIO GENIL\", numero_retirada: \"35\" },\n \"ACCES CAMINO ALTO SAN ISIDRO SN MADRID\": { tipovia: \"CAMINO\", calle: \"ALTO DE SAN ISIDRO\", numero_retirada: \"1\" },\n \"ACCES CAMINO ALTO DE SAN ISIDRO 0 MADRID\": { tipovia: \"CAMINO\", calle: \"ALTO DE SAN ISIDRO\", numero_retirada: \"1\" },\n \"ACCESO M 30 AVDA ENTREVIAS 0 MADRID\": { tipovia: \"AVENIDA\", calle: \"ENTREVÍAS\", numero_retirada: \"1\" },\n \"ACCESO M30 AVDA ENTREVIAS 6 MADRID\": { tipovia: \"AVENIDA\", calle: \"ENTREVÍAS\", numero_retirada: \"1\" },\n \"CALLE SERRANO C V HERMOSILLA SN MADRID\": { tipovia: \"CALLE\", calle: \"SERRANO\", numero_retirada: \"1\" },\n \"ACCES MARIA SEVILLA DIAGO 3 MADRID\": { tipovia: \"CALLE\", calle: \"MARÍA SEVILLA DIAGO\", numero_retirada: \"3\" },\n \"ACCES COMISARIA LEGAÑITOS 0 MADRID\": { tipovia: \"CALLE\", calle: \"LEGAÑITOS\", numero_retirada: \"7\" },\n \"CALLE GENERAL PALANCA S N MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL PALANCA\", numero_retirada: \"25\" },\n \"ACCES AEROPUERTO BARAJAS 1 MADRID\": { tipovia: \"TERMINAL\", calle: \"AEROPUERTO BARAJAS T1\", numero_retirada: \"1\" },\n \"CAMINO BATAN S N MADRID\": { tipovia: \"CAMINO\", calle: \"BATÁN\", numero_retirada: \"1\" },\n \"CAMINO BATAN 0 MADRID\": { tipovia: \"CAMINO\", calle: \"BATÁN\", numero_retirada: \"1\" },\n \"CAMINO BATAN SN MADRID\": { tipovia: \"CAMINO\", calle: \"BATÁN\", numero_retirada: \"1\" },\n \"PLAZA HNOS FALCO Y ALVAREZ DE TOLEDO 16 MADRID\": { tipovia: \"PLAZA\", calle: \"HERMANOS FALCÓ\", numero_retirada: \"16\" },\n \"PLAZA HERMANOS FALCO Y ALVAREZ DE TOLEDO S N MADRID\": { tipovia: \"PLAZA\", calle: \"HERMANOS FALCÓ\", numero_retirada: \"16\" },\n \"PLAZA HERMANOS FALCO Y ALVAREZ DE TOLEDO 14 MADRID\": { tipovia: \"PLAZA\", calle: \"HERMANOS FALCÓ\", numero_retirada: \"16\" },\n \"PLAZA HERMANOS FALCO Y ALVAREZ DE TOLEDO 20 MADRID\": { tipovia: \"PLAZA\", calle: \"HERMANOS FALCÓ\", numero_retirada: \"16\" },\n \"PLAZA HERMANOS FALCO Y ALVAREZ DE TOLEDO 11 MADRID\": { tipovia: \"PLAZA\", calle: \"HERMANOS FALCÓ\", numero_retirada: \"16\" },\n \"AUTOVIA A 5 KM 7 800 0 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-5\", numero_retirada: \"7\" },\n \"AUTOVIA A 5 KM 7 800 8 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-5\", numero_retirada: \"7\" },\n \"AUTOVIA A 5 KM 7 800 6600 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-5\", numero_retirada: \"7\" },\n \"AUTOVIA A 5 KM 7 800 7 600 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-5\", numero_retirada: \"7\" },\n \"CALLE TOLEDO C V GASOMETRO SN MADRID\": { tipovia: \"CALLE\", calle: \"TOLEDO\", numero_retirada: \"1\" },\n \"CALLE TOLEDO C V GASOMETRO 0 MADRID\": { tipovia: \"CALLE\", calle: \"TOLEDO\", numero_retirada: \"1\" },\n \"CALLE CAPITAN HAYA S N MADRID\": { tipovia: \"CALLE\", calle: \"CAPITÁN HAYA\", numero_retirada: \"1\" },\n \"PASAJE REMONTA 0 MADRID\": { tipovia: \"PASAJE\", calle: \"REMONTA\", numero_retirada: \"1\" },\n \"PLAZA LEALTAD S N MADRID\": { tipovia: \"PLAZA\", calle: \"LEALTAD\", numero_retirada: \"1\" },\n \"CALLE NUÑEZ DE BALBOA S N MADRID\": { tipovia: \"CALLE\", calle: \"NUÑEZ DE BALBOA\", numero_retirada: \"1\" },\n \"CALLE DOCTOR ESQUERDO S N MADRID\": { tipovia: \"CALLE\", calle: \"DOCTOR ESQUERDO\", numero_retirada: \"1\" },\n \"AVENIDA BUENOS AIRES S N MADRID\": { tipovia: \"AVENIDA\", calle: \"BUENOS AIRES\", numero_retirada: \"1\" },\n \"CARRETERA CARABANCHEL VILLAVERDE MARGEN IZQUIERDO 103 MADRID\": { tipovia: \"CARRETERA\", calle: \"CARABANCHEL A VILLAVERDE\", numero_retirada: \"103\" },\n \"CALLE PARQUE ANA TUTOR 8 MADRID\": { tipovia: \"PARQUE\", calle: \"ANA TUTOR\", numero_retirada: \"8\" },\n \"GLORIETA GENERAL SAN MARTIN 3 MADRID\": { tipovia: \"GLORIETA\", calle: \"GENERAL SAN MARTÍN\", numero_retirada: \"3\" },\n \"CALLE MONTE IGUELDO S N MADRID\": { tipovia: \"CALLE\", calle: \"MONTE IGUELDO\", numero_retirada: \"1\" },\n \"PLAZA COLON S N MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"BASE COLON MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON SN MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON 4 MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON 0 MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON F 31 MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON 2 MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON 141141 MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"ACCES BASE DE COLON MADRID\": { tipovia: \"PLAZA\", calle: \"COLÓN\", numero_retirada: \"1\" },\n \"CALLE SANTA BERNARDINA S N MADRID\": { tipovia: \"CALLE\", calle: \"SANTA BERNARDINA\", numero_retirada: \"1\" },\n \"ACCES DEL ROBLEDAL 0 MADRID\": { tipovia: \"CALLE\", calle: \"ROBLEDAL\", numero_retirada: \"1\" },\n \"CALLE REAL DE PINTO 1 MADRID\": { tipovia: \"CALLE\", calle: \"REAL DE PINTO\", numero_retirada: \"1\" },\n \"AUTOVIA A3 VIA DE SERVICIO PK 7 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-3\", numero_retirada: \"7\" },\n \"AUTOVIA A3 VIA DE SERVICIO 140000 MADRID\": { tipovia: \"CARRETERA\", calle: \"A-3\", numero_retirada: \"7\" },\n \"CALLE CHIMBO 23 1 A 0 MADRID\": { tipovia: \"CALLE\", calle: \"CHIMBO\", numero_retirada: \"23\" },\n \"CALLE AVDA MORATALAZ 0 MADRID\": { tipovia: \"AVENIDA\", calle: \"MORATALAZ\", numero_retirada: \"1\" },\n \"CALLE LOPEZ DE HOYOS S N MADRID\": { tipovia: \"CALLE\", calle: \"LÓPEZ DE HOYOS\", numero_retirada: \"1\" },\n \"AVENIDA RAFAEL FINAT S N MADRID\": { tipovia: \"AVENIDA\", calle: \"RAFAEL FINAT\", numero_retirada: \"1\" },\n \"AVENIDA RAFAEL FINAT 1 MADRID\": { tipovia: \"AVENIDA\", calle: \"RAFAEL FINAT\", numero_retirada: \"1\" },\n \"ACCESO DON RAMON DE LA CRUZ 2 MADRID\": { tipovia: \"CALLE\", calle: \"RAMÓN DE LA CRUZ\", numero_retirada: \"2\" },\n \"ACCESO DON RAMON DE LA CRUZ 3 MADRID\": { tipovia: \"CALLE\", calle: \"RAMÓN DE LA CRUZ\", numero_retirada: \"2\" },\n \"CALLE GENERAL MOSCARDO 1 MADRID\": { tipovia: \"CALLE\", calle: \"GENERAL MOSCARDO\", numero_retirada: \"1\" },\n \"CALLE ESTACION DEPURADORA SANTA CATALINA 65 MADRID\": { tipovia: \"CALLE\", calle: \"ESTACIÓN DEPURADORA\", numero_retirada: \"65\" },\n \"CALLE ESTACION DEPURADORA SANTA CATALINA 0 MADRID\": { tipovia: \"CALLE\", calle: \"ESTACIÓN DEPURADORA\", numero_retirada: \"65\" },\n \"CARRETERA PARDO EL DE PUERTA DE HIERRO AL KM 3 500 SN MADRID\": { tipovia: \"CARRETERA\", calle: \"M-612\", numero_retirada: \"3\" },\n \"CALLE RETAMA FAR 3 MADRID\": { tipovia: \"CALLE\", calle: \"RETAMA\", numero_retirada: \"3\" },\n \"GLORIETA REALES ACADEMIAS 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"REALES ACADEMIAS\", numero_retirada: \"1\" },\n \"CALLE SEVILLA S N MADRID\": { tipovia: \"CALLE\", calle: \"SEVILLA\", numero_retirada: \"1\" },\n \"CALLE PRINCESA S N MADRID\": { tipovia: \"CALLE\", calle: \"PRINCESA\", numero_retirada: \"1\" },\n \"GLORIETA CADIZ S N MADRID\": { tipovia: \"GLORIETA\", calle: \"CÁDIZ\", numero_retirada: \"1\" },\n \"GLORIETA CADIZ 0 MADRID\": { tipovia: \"GLORIETA\", calle: \"CÁDIZ\", numero_retirada: \"1\" },\n \"GLORIETA RUBEN DARIO S N MADRID\": { tipovia: \"GLORIETA\", calle: \"RUBÉN DARÍO\", numero_retirada: \"1\" },\n \"CALLE RONDA SUR 0 MADRID\": { tipovia: \"RONDA\", calle: \"SUR\", numero_retirada: \"1\" },\n \"GLORIETA ARCENTALES 2 MADRID\": { tipovia: \"GLORIETA\", calle: \"ARCENTALES\", numero_retirada: \"2\" },\n \"CALLE PUENTE DE SEGOVIA 0000 MADRID\": { tipovia: \"PUENTE\", calle: \"DE SEGOVIA\", numero_retirada: \"1\" },\n \"CALLE PUENTE DE SEGOVIA 8 MADRID\": { tipovia: \"PUENTE\", calle: \"DE SEGOVIA\", numero_retirada: \"1\" },\n \"AVENIDA ARROYO DEL FRESNO 0 MADRID\": { tipovia: \"AVENIDA\", calle: \"ARROYO DEL FRESNO\", numero_retirada: \"1\" },\n \"CALLE ARROYO FRESNO 4 MADRID\": { tipovia: \"AVENIDA\", calle: \"ARROYO DEL FRESNO\", numero_retirada: \"1\" },\n \"CALLE ARROYO FRESNO 0 MADRID\": { tipovia: \"AVENIDA\", calle: \"ARROYO DEL FRESNO\", numero_retirada: \"1\" },\n \"PLAZA DOCTOR ALONSO AGUILAR 0 MADRID\": { tipovia: \"PLAZA\", calle: \"DOCTOR ALONSO AGUILAR\", numero_retirada: \"1\" },\n \"CALLE ALCALDE CONDE DE MAYALDE 0 MADRID\": { tipovia: \"CALLE\", calle: \"ALCALDE CONDE DE MAYALDE\", numero_retirada: \"1\" }\n};\n\nif (cambios.hasOwnProperty(msg.consulta_calle)) {\n Object.assign(msg.cambio, cambios[msg.consulta_calle]);\n return msg;\n}", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 260, - "y": 720, - "wires": [ - [ - "ddc2820a375bb8f6" - ] - ] - }, - { - "id": "ddc2820a375bb8f6", - "type": "change", - "z": "a796bfad8ab76fe4", - "name": "Actualizamos los datos de las calles mal codificadas", - "rules": [ - { - "t": "set", - "p": "operation", - "pt": "msg", - "to": "updateMany", - "tot": "str" - }, - { - "t": "set", - "p": "collection", - "pt": "msg", - "to": "servicios_consolidado_calle_filtrado", - "tot": "str" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP \t },\t {\t \"$set\": {\t \"TipoVia\": msg.cambio.tipovia,\t \"Calle\": msg.cambio.calle,\t \"numero_retirada\": msg.cambio.numero_retirada,\t \"extra_calle\": msg.cambio.extra_calle\t }\t }\t]", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 680, - "y": 720, - "wires": [ - [ - "c9dfd4a858aeb687" - ] - ] - }, - { - "id": "c9dfd4a858aeb687", - "type": "mongodb4", - "z": "a796bfad8ab76fe4", - "clientNode": "648a51546e4dadc6", - "mode": "collection", - "collection": "", - "operation": "", - "output": "toArray", - "maxTimeMS": "0", - "handleDocId": false, - "name": "", - "x": 970, - "y": 720, - "wires": [ - [ - "61bddcdd604826da" - ] - ] - }, - { - "id": "e795e6d956e3180e", - "type": "link in", - "z": "a796bfad8ab76fe4", - "name": "IN - Mala codificación", - "links": [ - "0b0d1db5adb29e98" - ], - "x": 105, - "y": 720, - "wires": [ - [ - "63bf04cd67af12fd" - ] - ] - }, - { - "id": "61bddcdd604826da", - "type": "debug", - "z": "a796bfad8ab76fe4", - "name": "Información de servicios procesados", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 1230, - "y": 720, - "wires": [] - }, { "id": "a1f0210367ec78c3", "type": "debug", "z": "a796bfad8ab76fe4", - "name": "debug 1", + "name": "CACHE", "active": false, "tosidebar": true, "console": false, @@ -1691,7 +1641,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1360, + "x": 940, "y": 260, "wires": [] }, @@ -1707,56 +1657,11 @@ "initialize": "", "finalize": "", "libs": [], - "x": 720, - "y": 180, + "x": 960, + "y": 2240, "wires": [ - [ - "fa2e9116677470ca" - ], - [ - "4063e875162c944d" - ] - ] - }, - { - "id": "fa2e9116677470ca", - "type": "change", - "z": "a796bfad8ab76fe4", - "name": "Peparamos el identificador de calle a borrar", - "rules": [ - { - "t": "set", - "p": "operation", - "pt": "msg", - "to": "deleteOne", - "tot": "str" - }, - { - "t": "set", - "p": "collection", - "pt": "msg", - "to": "servicios_consolidado_calle_filtrado", - "tot": "str" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "[\t {\t \"_id\": direccion._id\t }\t]", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 990, - "y": 160, - "wires": [ - [ - "4eee84ac85459806" - ] + [], + [] ] }, { @@ -1771,11 +1676,11 @@ "maxTimeMS": "0", "handleDocId": false, "name": "", - "x": 1250, - "y": 160, + "x": 830, + "y": 1620, "wires": [ [ - "61bddcdd604826da" + "237facc4aaef9d97" ] ] }, @@ -1812,7 +1717,7 @@ "from": "", "to": "", "reg": false, - "x": 900, + "x": 480, "y": 260, "wires": [ [ @@ -1832,7 +1737,7 @@ "maxTimeMS": "0", "handleDocId": false, "name": "", - "x": 1210, + "x": 790, "y": 260, "wires": [ [ @@ -1841,33 +1746,279 @@ ] }, { - "id": "919761f72ff72c12", - "type": "file", + "id": "385c8170afd1861c", + "type": "debug", "z": "a796bfad8ab76fe4", - "name": "guardar valores", - "filename": "direcciones", - "filenameType": "str", - "appendNewline": true, - "createDir": false, - "overwriteFile": "false", - "encoding": "none", - "x": 1080, - "y": 340, + "name": "ACTUALIZADOS", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1530, + "y": 2980, + "wires": [] + }, + { + "id": "ae0ccf49a164192f", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Insertar", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "insertOne", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "consulta_calle", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\t \"consulta_calle\": $flowContext(\"consulta_calle\"),\t \"tipovia\": $flowContext(\"tipovia\"),\t \"calle\": $flowContext(\"calle\"),\t \"numero_retirada\": $flowContext(\"numero_retirada\"),\t \"extra_calle\": $flowContext(\"extra_calle\"),\t \"accion\": \"validado\"\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 920, + "y": 2940, "wires": [ - [] + [ + "cf7d08b21478be85" + ] ] }, { - "id": "6a58b6dfedf7cc13", + "id": "76d0610e0cf4a848", + "type": "ui-text-input", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "consulta_calle", + "label": "consulta_calle", + "order": 2, + "width": 0, + "height": 0, + "topic": "topic", + "topicType": "msg", + "mode": "text", + "tooltip": "", + "delay": 300, + "passthru": false, + "sendOnDelay": false, + "sendOnBlur": true, + "sendOnEnter": true, + "className": "", + "clearable": false, + "sendOnClear": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "x": 780, + "y": 2340, + "wires": [ + [ + "3d08fca02fbfdc13" + ] + ] + }, + { + "id": "13a8bf685ef1303b", + "type": "ui-text-input", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "tipocalle", + "label": "tipocalle", + "order": 3, + "width": 0, + "height": 0, + "topic": "topic", + "topicType": "msg", + "mode": "text", + "tooltip": "", + "delay": 300, + "passthru": false, + "sendOnDelay": false, + "sendOnBlur": true, + "sendOnEnter": true, + "className": "", + "clearable": false, + "sendOnClear": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "x": 760, + "y": 2380, + "wires": [ + [ + "a403b6e0d3b62351" + ] + ] + }, + { + "id": "5a4e60652aab552c", + "type": "ui-text-input", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "calle", + "label": "calle", + "order": 4, + "width": 0, + "height": 0, + "topic": "topic", + "topicType": "msg", + "mode": "text", + "tooltip": "", + "delay": 300, + "passthru": true, + "sendOnDelay": false, + "sendOnBlur": true, + "sendOnEnter": true, + "className": "", + "clearable": false, + "sendOnClear": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "x": 750, + "y": 2420, + "wires": [ + [ + "2bb29b85114ff2c3" + ] + ] + }, + { + "id": "a97aaad7209e3953", + "type": "ui-text-input", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "numero_retirada", + "label": "numero_retirada", + "order": 5, + "width": 0, + "height": 0, + "topic": "topic", + "topicType": "msg", + "mode": "text", + "tooltip": "", + "delay": 300, + "passthru": true, + "sendOnDelay": false, + "sendOnBlur": true, + "sendOnEnter": true, + "className": "", + "clearable": false, + "sendOnClear": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "x": 780, + "y": 2460, + "wires": [ + [ + "eae675ed8219e086" + ] + ] + }, + { + "id": "2e1a6699fd10a0d0", + "type": "ui-text-input", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "extra_calle", + "label": "extra_calle", + "order": 6, + "width": 0, + "height": 0, + "topic": "topic", + "topicType": "msg", + "mode": "text", + "tooltip": "", + "delay": 300, + "passthru": true, + "sendOnDelay": false, + "sendOnBlur": true, + "sendOnEnter": true, + "className": "", + "clearable": false, + "sendOnClear": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "x": 770, + "y": 2500, + "wires": [ + [ + "bc7269f08c168a0b" + ] + ] + }, + { + "id": "3dbbc9b098e37e96", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "Insertar datos", + "label": "Insertar Datos", + "order": 7, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "ultima_validacion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 360, + "y": 2680, + "wires": [ + [ + "ee0c6a9d7d1aa05c", + "a75d78af573442dc" + ] + ] + }, + { + "id": "3d08fca02fbfdc13", "type": "change", "z": "a796bfad8ab76fe4", "name": "", "rules": [ { "t": "set", - "p": "payload", - "pt": "msg", - "to": "referencia_geocache", + "p": "consulta_calle", + "pt": "flow", + "to": "payload", "tot": "msg" } ], @@ -1876,11 +2027,3396 @@ "from": "", "to": "", "reg": false, - "x": 880, - "y": 340, + "x": 1000, + "y": 2340, + "wires": [ + [] + ] + }, + { + "id": "a403b6e0d3b62351", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "", + "rules": [ + { + "t": "set", + "p": "tipovia", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 980, + "y": 2380, + "wires": [ + [] + ] + }, + { + "id": "2bb29b85114ff2c3", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "", + "rules": [ + { + "t": "set", + "p": "calle", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 970, + "y": 2420, + "wires": [ + [] + ] + }, + { + "id": "eae675ed8219e086", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "", + "rules": [ + { + "t": "set", + "p": "numero_retirada", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1010, + "y": 2460, + "wires": [ + [] + ] + }, + { + "id": "bc7269f08c168a0b", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "", + "rules": [ + { + "t": "set", + "p": "extra_calle", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 990, + "y": 2500, + "wires": [ + [] + ] + }, + { + "id": "cf7d08b21478be85", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1070, + "y": 2940, "wires": [ [ - "919761f72ff72c12" + "f521d21d39f94c81" + ] + ] + }, + { + "id": "65929efb1b36beb0", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Buscar", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "findOne", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "consulta_calle", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"consulta_calle\": { \"$eq\": $flowContext(\"consulta_calle\") }}]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 460, + "y": 2960, + "wires": [ + [ + "acf35447afb95d83" + ] + ] + }, + { + "id": "acf35447afb95d83", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 610, + "y": 2960, + "wires": [ + [ + "d004b5eb8f81d4f5" + ] + ] + }, + { + "id": "d004b5eb8f81d4f5", + "type": "switch", + "z": "a796bfad8ab76fe4", + "name": "¿Existe?", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "null" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 760, + "y": 2960, + "wires": [ + [ + "ae0ccf49a164192f" + ], + [ + "376d12f46845ec84", + "a91e0f85d9f57fb2" + ] + ], + "outputLabels": [ + "NO", + "SI" + ] + }, + { + "id": "376d12f46845ec84", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Actualizamos los datos de las calles mal codificadas", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": $flowContext(\"tipovia_original\"),\t \"Calle\": $flowContext(\"calle_original\"),\t \"numero_retirada\": $flowContext(\"numero_retirada_original\"),\t \"Poblacion\": $flowContext(\"poblacion_original\"),\t \"CP\": $flowContext(\"cp_original\")\t },\t {\t \"$set\": {\t \"TipoVia\": $flowContext(\"tipovia\"),\t \"Calle\": $flowContext(\"calle\"),\t \"numero_retirada\": $flowContext(\"numero_retirada\"),\t \"extra_calle\": $flowContext(\"extra_calle\"),\t \"geocodingProcesado\": \"false\"\t }\t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1060, + "y": 2980, + "wires": [ + [ + "54cfdd34c936f6b8" + ] + ] + }, + { + "id": "11f1b5cccc45d206", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Actualizamos la consulta_calle", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "consulta_calle", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"consulta_calle\": $flowContext(\"consulta_calle\")\t },\t {\t \"$set\": {\t \"tipovia\": $flowContext(\"tipovia\"),\t \"calle\": $flowContext(\"calle\"),\t \"numero_retirada\": $flowContext(\"numero_retirada\"),\t \"extra_calle\": $flowContext(\"extra_calle\")\t }\t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 990, + "y": 3100, + "wires": [ + [ + "397b758c268fcfe3" + ] + ] + }, + { + "id": "54cfdd34c936f6b8", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1350, + "y": 2980, + "wires": [ + [ + "385c8170afd1861c" + ] + ] + }, + { + "id": "397b758c268fcfe3", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1210, + "y": 3100, + "wires": [ + [ + "01486ff2b815efdc" + ] + ] + }, + { + "id": "929680815ce51af8", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1370, + "y": 3040, + "wires": [ + [ + "be21eaa7c3594803" + ] + ] + }, + { + "id": "a91e0f85d9f57fb2", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Borramos los datos de la referencia de cache en mongo", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "deleteMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "geocache", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"referencia_geocache\": { \"$eq\": $flowContext(\"referencia_geocache\") }}]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1070, + "y": 3040, + "wires": [ + [ + "929680815ce51af8" + ] + ] + }, + { + "id": "d6116b226cfad9d6", + "type": "trigger", + "z": "a796bfad8ab76fe4", + "name": "", + "op1": "", + "op2": "0", + "op1type": "pay", + "op2type": "str", + "duration": "0", + "extend": false, + "overrideDelay": false, + "units": "ms", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 770, + "y": 2280, + "wires": [ + [] + ] + }, + { + "id": "5c95290ed28a98cc", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Pongo consulta calle", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "consulta_calle", + "tot": "msg" + }, + { + "t": "set", + "p": "referencia_geocache", + "pt": "flow", + "to": "referencia_geocache", + "tot": "msg" + }, + { + "t": "set", + "p": "tipovia_original", + "pt": "flow", + "to": "msg.direccion.TipoVia", + "tot": "msg" + }, + { + "t": "set", + "p": "calle_original", + "pt": "flow", + "to": "direccion.Calle", + "tot": "msg" + }, + { + "t": "set", + "p": "numero_retirada_original", + "pt": "flow", + "to": "direccion.numero_retirada", + "tot": "msg" + }, + { + "t": "set", + "p": "poblacion_original", + "pt": "flow", + "to": "direccion.Poblacion", + "tot": "msg" + }, + { + "t": "set", + "p": "cp_original", + "pt": "flow", + "to": "direccion.CP", + "tot": "msg" + }, + { + "t": "set", + "p": "ultima_validacion", + "pt": "flow", + "to": "msg", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 560, + "y": 2340, + "wires": [ + [ + "76d0610e0cf4a848" + ] + ] + }, + { + "id": "ee0c6a9d7d1aa05c", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "", + "rules": [ + { + "t": "set", + "p": "trigger", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 2620, + "wires": [ + [ + "0579fe31ed7de68e" + ] + ] + }, + { + "id": "237facc4aaef9d97", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "BORRADO CACHE", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1020, + "y": 1620, + "wires": [] + }, + { + "id": "065d8956ac11a589", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Copiamos la dirección en dirección para consultas posteriores", + "rules": [ + { + "t": "set", + "p": "direccion", + "pt": "msg", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 430, + "y": 120, + "wires": [ + [ + "3112772543b09bd9" + ] + ] + }, + { + "id": "039fe8c413696211", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Consulta referencia_geocache - No existe", + "mode": "link", + "links": [ + "362dad96d3acb433" + ], + "x": 995, + "y": 140, + "wires": [] + }, + { + "id": "ea5fca57029b791a", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Consulta referencia_geocache - Si existe", + "mode": "link", + "links": [ + "8e600a2622518a91" + ], + "x": 995, + "y": 180, + "wires": [] + }, + { + "id": "8e600a2622518a91", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Consulta referencia_geocache - Si existe", + "links": [ + "ea5fca57029b791a" + ], + "x": 215, + "y": 260, + "wires": [ + [ + "2432622b4a8371d9" + ] + ] + }, + { + "id": "a2728ad52fcd926b", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "IGUALES - VALIDADO", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1160, + "y": 540, + "wires": [] + }, + { + "id": "4320d2d03e53a85c", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "Si existe la referencia se actualiza", + "info": "", + "x": 340, + "y": 220, + "wires": [] + }, + { + "id": "45cf835dcdbd1a3a", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "No existe la referencia", + "info": "", + "x": 300, + "y": 380, + "wires": [] + }, + { + "id": "7e1ef1bd33f94522", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Consulta referencia_geocache - No existe", + "links": [], + "x": 215, + "y": 420, + "wires": [ + [ + "203e1085c0c47c13" + ] + ] + }, + { + "id": "203e1085c0c47c13", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Buscarmos la calle en la base de datos de consulta_calle", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "find", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "consulta_calle", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"consulta_calle \": { \"$eq\": msg.consulta_calle }}]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 470, + "y": 420, + "wires": [ + [ + "87e7bd9dc902fc8d" + ] + ] + }, + { + "id": "87e7bd9dc902fc8d", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 770, + "y": 420, + "wires": [ + [ + "5fc42487deb4834e" + ] + ] + }, + { + "id": "5fc42487deb4834e", + "type": "switch", + "z": "a796bfad8ab76fe4", + "name": "Existe la calle en consulta_calle?", + "property": "$count(payload)", + "propertyType": "jsonata", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 1000, + "y": 420, + "wires": [ + [ + "ed849af6a3bc7f94" + ], + [ + "3ef05c3f5e8cf598" + ] + ], + "outputLabels": [ + "NO", + "SI" + ] + }, + { + "id": "ed849af6a3bc7f94", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Consulta consulta_calle - No existe", + "mode": "link", + "links": [ + "362dad96d3acb433" + ], + "x": 1185, + "y": 400, + "wires": [] + }, + { + "id": "3ef05c3f5e8cf598", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Consulta consulta_calle - Si existe", + "mode": "link", + "links": [ + "34d799f171e47da5" + ], + "x": 1185, + "y": 440, + "wires": [] + }, + { + "id": "34d799f171e47da5", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Consulta consulta_calle - Si existe", + "links": [ + "3ef05c3f5e8cf598" + ], + "x": 215, + "y": 580, + "wires": [ + [ + "ea176a490b716f31" + ] + ] + }, + { + "id": "fa5477b702141436", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "Si existe la calle", + "info": "", + "x": 280, + "y": 520, + "wires": [] + }, + { + "id": "8a3bbd2c812a3210", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "No existe la calle", + "info": "", + "x": 280, + "y": 800, + "wires": [] + }, + { + "id": "362dad96d3acb433", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Consulta consulta_calle - No existe", + "links": [ + "ed849af6a3bc7f94", + "039fe8c413696211" + ], + "x": 215, + "y": 860, + "wires": [ + [ + "f824743db6a45636" + ] + ] + }, + { + "id": "8fea8c90dd9194ec", + "type": "inject", + "z": "a796bfad8ab76fe4", + "name": "", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": "1", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 710, + "y": 800, + "wires": [ + [ + "3105cb58919fe886" + ] + ] + }, + { + "id": "3105cb58919fe886", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "link out 2", + "mode": "link", + "links": [ + "5e1954f3ba4bce4b" + ], + "x": 835, + "y": 800, + "wires": [] + }, + { + "id": "ea176a490b716f31", + "type": "switch", + "z": "a796bfad8ab76fe4", + "name": "Accion que se hace según la consulta", + "property": "payload.accion", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "validado", + "vt": "str" + }, + { + "t": "eq", + "v": "eliminar", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 410, + "y": 580, + "wires": [ + [ + "1f77c5f90a3ffb63" + ], + [ + "a5a82ce094a9262a" + ], + [ + "22cab22ef894585c" + ] + ], + "outputLabels": [ + "Se actuliza el valor de la calle", + "Se borra la calle", + "Se estudia" + ] + }, + { + "id": "1f77c5f90a3ffb63", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP \t\t },\t {\t \"$set\": {\t \"latitud\": msg.payload.lat,\t \"longitud\": msg.payload.lon,\t \"geocodingProcesado\": true\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 820, + "y": 540, + "wires": [ + [ + "a2728ad52fcd926b" + ] + ] + }, + { + "id": "a5a82ce094a9262a", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "ELIMINAR", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1130, + "y": 580, + "wires": [] + }, + { + "id": "22cab22ef894585c", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "TRATAR", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1120, + "y": 620, + "wires": [] + }, + { + "id": "f824743db6a45636", + "type": "delay", + "z": "a796bfad8ab76fe4", + "name": "", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 340, + "y": 860, + "wires": [ + [ + "1fd044cbc45e1620" + ] + ] + }, + { + "id": "5d8fed0824f5d590", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Catociudad con datos", + "mode": "link", + "links": [ + "267efedbc42eb1dc" + ], + "x": 1345, + "y": 880, + "wires": [] + }, + { + "id": "b5d1699d2f623f08", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Cartociudad sin datos", + "mode": "link", + "links": [ + "629bb3d5189f7e53", + "37f1c5b138623383" + ], + "x": 1345, + "y": 840, + "wires": [] + }, + { + "id": "407bef05d919bd52", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "Cartociudad con datos", + "info": "", + "x": 300, + "y": 940, + "wires": [] + }, + { + "id": "412a0aa8b5a7a677", + "type": "comment", + "z": "a796bfad8ab76fe4", + "name": "Cartociudad sin datos", + "info": "", + "x": 480, + "y": 2240, + "wires": [] + }, + { + "id": "267efedbc42eb1dc", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Cartociudad con datos", + "links": [ + "5d8fed0824f5d590" + ], + "x": 215, + "y": 980, + "wires": [ + [ + "8f57171dbb68e9cc" + ] + ] + }, + { + "id": "629bb3d5189f7e53", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Cartociudad sin datos", + "links": [ + "b5d1699d2f623f08", + "f9145f1a463f19ec" + ], + "x": 405, + "y": 2280, + "wires": [ + [ + "0579fe31ed7de68e" + ] + ] + }, + { + "id": "dcc5a797823a45a1", + "type": "ui-text", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "order": 1, + "width": 0, + "height": 0, + "name": "consulta_calle", + "label": "Consulta Calle: ", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "consulta_calle", + "valueType": "msg", + "x": 900, + "y": 1060, + "wires": [] + }, + { + "id": "d0df21d0eea0830f", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Genera resultado_cartociudad", + "rules": [ + { + "t": "set", + "p": "resultado_cartociudad", + "pt": "msg", + "to": "payload.address& \" \" &payload.raw.portalNumber& \" \" &payload.muni& \" \" &payload.province& \" \" &payload.postalCode", + "tot": "jsonata" + }, + { + "t": "set", + "p": "actualizar", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "validando_direccion", + "pt": "flow", + "to": "msg", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 650, + "y": 1100, + "wires": [ + [ + "4255d678e6b1a913", + "dcc5a797823a45a1", + "bec1c77eb24511de", + "5ebdb2911c7f8cec", + "3dd3ba5f79fbf5a7" + ] + ] + }, + { + "id": "4255d678e6b1a913", + "type": "ui-text", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "order": 12, + "width": 0, + "height": 0, + "name": "resultado_cartociudad", + "label": "Resultado Cartociudad: ", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "resultado_cartociudad", + "valueType": "msg", + "x": 920, + "y": 1100, + "wires": [] + }, + { + "id": "bec1c77eb24511de", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "name": "Validar", + "label": "Validar", + "order": 11, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 870, + "y": 1140, + "wires": [ + [ + "36c4d29cd8bb931c" + ] + ] + }, + { + "id": "5ebdb2911c7f8cec", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "name": "Eliminar", + "label": "Eliminar", + "order": 9, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 880, + "y": 1180, + "wires": [ + [ + "282609e0a8a595e7" + ] + ] + }, + { + "id": "931dfde533b77924", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "reset", + "rules": [ + { + "t": "set", + "p": "trigger", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 330, + "y": 1160, + "wires": [ + [ + "1d6863142aee9387" + ] + ] + }, + { + "id": "36c4d29cd8bb931c", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Validado", + "mode": "link", + "links": [ + "9e2a81ef52b0c2d2", + "0f4165650f826238" + ], + "x": 955, + "y": 1140, + "wires": [] + }, + { + "id": "9e2a81ef52b0c2d2", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Validado", + "links": [ + "36c4d29cd8bb931c", + "c1a6d3e32d669058" + ], + "x": 285, + "y": 1420, + "wires": [ + [ + "2c1d536a860b099e", + "ee3b382fec9125f9" + ] + ] + }, + { + "id": "22e91d97b48287ac", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "GUARDA geocache", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1080, + "y": 1380, + "wires": [] + }, + { + "id": "183f81d1ad8abb3f", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "ACTUALIZA Calles", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1070, + "y": 1440, + "wires": [] + }, + { + "id": "f521d21d39f94c81", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "INSERTADO EN SIN DATOS", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1280, + "y": 2940, + "wires": [] + }, + { + "id": "be21eaa7c3594803", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "BORRADOS", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1530, + "y": 3040, + "wires": [] + }, + { + "id": "01486ff2b815efdc", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "CONSULTA CALLE", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1390, + "y": 3100, + "wires": [] + }, + { + "id": "45bf0a36274043c1", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "ELIMINAR CALLES", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1020, + "y": 1580, + "wires": [] + }, + { + "id": "a75d78af573442dc", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Actualizamos los datos de las calles mal codificadas", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": $uppercase($flowContext(\"tipovia_original\")),\t \"Calle\": $uppercase($flowContext(\"calle_original\")),\t \"numero_retirada\": $flowContext(\"numero_retirada_original\"),\t \"Poblacion\": $uppercase($flowContext(\"poblacion_original\")),\t \"CP\": $flowContext(\"cp_original\")\t },\t {\t \"$set\": {\t \"TipoVia\": $uppercase($flowContext(\"tipovia\")),\t \"Calle\": $uppercase($flowContext(\"calle\")),\t \"numero_retirada\": $flowContext(\"numero_retirada\"),\t \"extra_calle\": $uppercase($flowContext(\"extra_calle\")),\t \"geocodingProcesado\": \"false\"\t }\t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 2680, + "wires": [ + [ + "71e6a918e85cbd07", + "94f0347ee6f32d6b" + ] + ] + }, + { + "id": "71e6a918e85cbd07", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 970, + "y": 2680, + "wires": [ + [ + "19418aad3da76453" + ] + ] + }, + { + "id": "19418aad3da76453", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "ACTUALIZADOS", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1150, + "y": 2680, + "wires": [] + }, + { + "id": "282609e0a8a595e7", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Cartociudad Eliminar", + "mode": "link", + "links": [ + "c741abf63475207c", + "0f4165650f826238" + ], + "x": 975, + "y": 1180, + "wires": [] + }, + { + "id": "c741abf63475207c", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Eliminar", + "links": [ + "282609e0a8a595e7" + ], + "x": 225, + "y": 1580, + "wires": [ + [ + "e2ddb79b71bb9c44", + "4a449c21d82898f9" + ] + ] + }, + { + "id": "e2ddb79b71bb9c44", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "deleteMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP\t }\t]", + "tot": "jsonata" + }, + { + "t": "set", + "p": "consulta_realizada", + "pt": "msg", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 520, + "y": 1580, + "wires": [ + [ + "2246878e7d3d7af2" + ] + ] + }, + { + "id": "2246878e7d3d7af2", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 830, + "y": 1580, + "wires": [ + [ + "45bf0a36274043c1" + ] + ] + }, + { + "id": "4a449c21d82898f9", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Guardamos lo datos de la referencia de cache en mongo", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "insertOne", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "geocache", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\t \"referencia_geocache\": referencia_geocache,\t \"accion\" : \"eliminar\"\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 510, + "y": 1620, + "wires": [ + [ + "4eee84ac85459806" + ] + ] + }, + { + "id": "3dd3ba5f79fbf5a7", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "name": "Tratar", + "label": "Tratar", + "order": 10, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 870, + "y": 1220, + "wires": [ + [ + "f9145f1a463f19ec" + ] + ] + }, + { + "id": "f9145f1a463f19ec", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "link out 3", + "mode": "link", + "links": [ + "629bb3d5189f7e53", + "0f4165650f826238" + ], + "x": 975, + "y": 1220, + "wires": [] + }, + { + "id": "41c4984165a1b830", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "29e5d13e29bfbb4b", + "name": "Liberar", + "label": "Liberar", + "order": 8, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "date", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 880, + "y": 1260, + "wires": [ + [ + "3341669b8aca5958" + ] + ] + }, + { + "id": "3341669b8aca5958", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "OUT - Liberar", + "mode": "link", + "links": [ + "0f4165650f826238" + ], + "x": 975, + "y": 1260, + "wires": [] + }, + { + "id": "0f4165650f826238", + "type": "link in", + "z": "a796bfad8ab76fe4", + "name": "IN - Liberar siguiente", + "links": [ + "36c4d29cd8bb931c", + "282609e0a8a595e7", + "f9145f1a463f19ec", + "3341669b8aca5958" + ], + "x": 235, + "y": 1160, + "wires": [ + [ + "931dfde533b77924" + ] + ] + }, + { + "id": "2b215b7870143e56", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "Mostrar", + "label": "Mostrar", + "order": 8, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "ultima_validacion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 340, + "y": 2800, + "wires": [ + [ + "fbc6b6e11099f864", + "ee0c6a9d7d1aa05c" + ] + ] + }, + { + "id": "fbc6b6e11099f864", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "Mostrar datos", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 540, + "y": 2800, + "wires": [] + }, + { + "id": "f399ed6d081a0343", + "type": "ui-button", + "z": "a796bfad8ab76fe4", + "group": "2365cb156242b3e6", + "name": "Borrar", + "label": "Borrar", + "order": 1, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "ultima_validacion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 330, + "y": 2860, + "wires": [ + [ + "ee0c6a9d7d1aa05c", + "23d65be42ea9f363" + ] + ] + }, + { + "id": "23d65be42ea9f363", + "type": "change", + "z": "a796bfad8ab76fe4", + "name": "Borramos los datos de las calles mal codificadas", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "deleteMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": payload.direccion.TipoVia,\t \"Calle\": payload.direccion.Calle,\t \"numero_retirada\": payload.direccion.numero_retirada,\t \"Poblacion\": payload.direccion.Poblacion,\t \"CP\": payload.direccion.CP \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 640, + "y": 2860, + "wires": [ + [ + "95b1dd4f471bf039" + ] + ] + }, + { + "id": "95b1dd4f471bf039", + "type": "mongodb4", + "z": "a796bfad8ab76fe4", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 970, + "y": 2860, + "wires": [ + [ + "2d79b1d9949e3dd0" + ] + ] + }, + { + "id": "2d79b1d9949e3dd0", + "type": "debug", + "z": "a796bfad8ab76fe4", + "name": "BORRADOS", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1150, + "y": 2860, + "wires": [] + }, + { + "id": "94f0347ee6f32d6b", + "type": "file", + "z": "a796bfad8ab76fe4", + "name": "", + "filename": "actualizacion_direcciones", + "filenameType": "str", + "appendNewline": true, + "createDir": false, + "overwriteFile": "false", + "encoding": "none", + "x": 1010, + "y": 2640, + "wires": [ + [] + ] + }, + { + "id": "0579fe31ed7de68e", + "type": "simple-queue", + "z": "a796bfad8ab76fe4", + "name": "", + "firstMessageBypass": false, + "bypassInterval": "0", + "x": 250, + "y": 1020, + "wires": [ + [ + "5c95290ed28a98cc" + ] + ] + }, + { + "id": "1d6863142aee9387", + "type": "simple-queue", + "z": "a796bfad8ab76fe4", + "name": "", + "firstMessageBypass": false, + "bypassInterval": "0", + "x": 450, + "y": 1020, + "wires": [ + [ + "d0df21d0eea0830f" + ] + ] + }, + { + "id": "356eeecb9e7fc0e3", + "type": "trigger", + "z": "a796bfad8ab76fe4", + "name": "Solo uno a tratar a la vez", + "op1": "", + "op2": "0", + "op1type": "pay", + "op2type": "str", + "duration": "0", + "extend": false, + "overrideDelay": false, + "units": "ms", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 670, + "y": 1060, + "wires": [ + [] + ] + }, + { + "id": "8f57171dbb68e9cc", + "type": "function", + "z": "a796bfad8ab76fe4", + "name": "Eliminamos los que son coincidentes para no tener que tratarlos manualmente", + "func": "// Función para normalizar texto (elimina acentos y convierte a mayúsculas)\nfunction normalizarTexto(texto) {\n return texto.toString()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toUpperCase()\n .trim();\n}\n\n// Comparación con normalización de address y province\nconst addressCoincide = normalizarTexto(msg.payload.address) === normalizarTexto(msg.direccion.Calle);\nconst provinceCoincide = normalizarTexto(msg.payload.province) === normalizarTexto(msg.direccion.Poblacion);\n\nif (addressCoincide && provinceCoincide) {\n return [null, msg]; // Salida 2 - coinciden\n} else {\n return [msg, null]; // Salida 1 - no coinciden\n}", + "outputs": 2, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 540, + "y": 980, + "wires": [ + [ + "1d6863142aee9387" + ], + [ + "c1a6d3e32d669058" + ] + ] + }, + { + "id": "c1a6d3e32d669058", + "type": "link out", + "z": "a796bfad8ab76fe4", + "name": "link out 4", + "mode": "link", + "links": [ + "9e2a81ef52b0c2d2" + ], + "x": 895, + "y": 1020, + "wires": [] + }, + { + "id": "a66d44720bfed89d", + "type": "link in", + "z": "6e1ee0f06e75580d", + "name": "Entrada Cartociudad 2", + "links": [ + "d1035ff8c39cd84c" + ], + "x": 205, + "y": 40, + "wires": [ + [ + "88517c37afc36dd8" + ] + ] + }, + { + "id": "3bb66c22727588c3", + "type": "switch", + "z": "6e1ee0f06e75580d", + "name": "Accion que se hace según la consulta", + "property": "payload.accion", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "validado", + "vt": "str" + }, + { + "t": "eq", + "v": "eliminar", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 530, + "y": 500, + "wires": [ + [ + "a23bb95e94319218" + ], + [ + "3e23306582382edc" + ], + [ + "fd8b53ea98c67e93" + ] + ], + "outputLabels": [ + "Se actuliza el valor de la calle", + "Se borra la calle", + "Se estudia" + ] + }, + { + "id": "88517c37afc36dd8", + "type": "split", + "z": "6e1ee0f06e75580d", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "", + "property": "payload", + "x": 290, + "y": 40, + "wires": [ + [ + "022364dc0148870e" + ] + ] + }, + { + "id": "022364dc0148870e", + "type": "delay", + "z": "6e1ee0f06e75580d", + "name": "", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 440, + "y": 40, + "wires": [ + [ + "65d4baca6edf0fbd" + ] + ] + }, + { + "id": "65d4baca6edf0fbd", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Generamos referencia_geocache y consulta_calle", + "rules": [ + { + "t": "set", + "p": "referencia_geocache", + "pt": "msg", + "to": "$join(\t $filter(\t [\t payload.TipoVia,\t payload.Calle,\t payload.numero_retirada,\t payload.Poblacion,\t payload.CP\t ],\t function($v){ $v != null and $v != \"\" }\t ),\t \",\"\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "consulta_calle", + "pt": "msg", + "to": "$join(\t $filter(\t [\t payload.TipoVia,\t payload.Calle,\t (payload.numero_retirada = \"sn\" or payload.numero_retirada = \"SN\" or payload.numero_retirada = \"0\") ? undefined : payload.numero_retirada,\t payload.Poblacion,\t payload.extra_calle\t ],\t function($v){ $v != null and $v != \"\" }\t ),\t \" \"\t)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 430, + "y": 100, + "wires": [ + [ + "c106948998237652" + ] + ] + }, + { + "id": "c106948998237652", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Copiamos la dirección en dirección para consultas posteriores", + "rules": [ + { + "t": "set", + "p": "direccion", + "pt": "msg", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 470, + "y": 140, + "wires": [ + [ + "45144d8953fb168a" + ] + ] + }, + { + "id": "45144d8953fb168a", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Creamos la consulta de referencia_geocache", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "find", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "geocache", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"referencia_geocache\": { \"$eq\": msg.referencia_geocache }}]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 410, + "y": 180, + "wires": [ + [ + "d4531a5b62fccd5a" + ] + ] + }, + { + "id": "d4531a5b62fccd5a", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 670, + "y": 180, + "wires": [ + [ + "c6d1ee72149ef4da" + ] + ] + }, + { + "id": "c6d1ee72149ef4da", + "type": "switch", + "z": "6e1ee0f06e75580d", + "name": "Existe la calle en el cache?", + "property": "$count(payload)", + "propertyType": "jsonata", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 180, + "y": 240, + "wires": [ + [ + "fe421b6180fe2f15" + ], + [ + "f04f31bb7e647ab7" + ] + ], + "outputLabels": [ + "NO", + "SI" + ] + }, + { + "id": "ff1fa52c7fb6436d", + "type": "comment", + "z": "6e1ee0f06e75580d", + "name": "Si existe la referencia se actualiza", + "info": "", + "x": 480, + "y": 240, + "wires": [] + }, + { + "id": "f04f31bb7e647ab7", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": direccion.TipoVia,\t \"Calle\": direccion.Calle\t },\t {\t \"$set\": {\t \"latitud\": payload[0].lat,\t \"longitud\": payload[0].lon,\t \"geocodingProcesado\": true\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 560, + "y": 280, + "wires": [ + [ + "2142cf292ba4dece" + ] + ] + }, + { + "id": "2142cf292ba4dece", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 870, + "y": 280, + "wires": [ + [ + "1be09b79f432c626" + ] + ] + }, + { + "id": "1be09b79f432c626", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "CACHE", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1020, + "y": 280, + "wires": [] + }, + { + "id": "a5cf9bb1543ccbdf", + "type": "comment", + "z": "6e1ee0f06e75580d", + "name": "No existe la referencia", + "info": "", + "x": 440, + "y": 320, + "wires": [] + }, + { + "id": "fe421b6180fe2f15", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Buscarmos la calle en la base de datos de consulta_calle", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "find", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "consulta_calle", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[{ \"consulta_calle \": { \"$eq\": msg.consulta_calle }}]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 550, + "y": 360, + "wires": [ + [ + "f98d50aac4fce670" + ] + ] + }, + { + "id": "f98d50aac4fce670", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 850, + "y": 360, + "wires": [ + [ + "385b936f30611065" + ] + ] + }, + { + "id": "385b936f30611065", + "type": "switch", + "z": "6e1ee0f06e75580d", + "name": "Existe la calle en consulta_calle?", + "property": "$count(payload)", + "propertyType": "jsonata", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 200, + "y": 460, + "wires": [ + [ + "d6db349d1646634d" + ], + [ + "3bb66c22727588c3" + ] + ], + "outputLabels": [ + "NO", + "SI" + ] + }, + { + "id": "841cb88a7b666a63", + "type": "comment", + "z": "6e1ee0f06e75580d", + "name": "Si existe la calle", + "info": "", + "x": 460, + "y": 440, + "wires": [] + }, + { + "id": "a23bb95e94319218", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP \t\t },\t {\t \"$set\": {\t \"latitud\": msg.payload.lat,\t \"longitud\": msg.payload.lon,\t \"geocodingProcesado\": true\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 940, + "y": 460, + "wires": [ + [ + "041c57934c647e2c" + ] + ] + }, + { + "id": "041c57934c647e2c", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "IGUALES - VALIDADO", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1280, + "y": 460, + "wires": [] + }, + { + "id": "3e23306582382edc", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "ELIMINAR", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 790, + "y": 500, + "wires": [] + }, + { + "id": "fd8b53ea98c67e93", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "TRATAR", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 780, + "y": 540, + "wires": [] + }, + { + "id": "4d69a180d5f58f10", + "type": "comment", + "z": "6e1ee0f06e75580d", + "name": "No existe la calle", + "info": "", + "x": 140, + "y": 680, + "wires": [] + }, + { + "id": "d6db349d1646634d", + "type": "delay", + "z": "6e1ee0f06e75580d", + "name": "", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 140, + "y": 720, + "wires": [ + [ + "007603e6138d3767" + ] + ] + }, + { + "id": "007603e6138d3767", + "type": "function", + "z": "6e1ee0f06e75580d", + "name": "Generamos la consulta a Cartociudad", + "func": "// msg.payload debe contener la dirección, ej. \"Calle Gran Vía 28, Madrid\"\nconst direccion = msg.consulta_calle;\nconst encoded = encodeURIComponent(direccion);\n\nmsg.original = msg.payload\n// API de CartoCiudad (gratuita España)\nmsg.method = \"GET\";\nmsg.url = `https://www.cartociudad.es/geocoder/api/geocoder/findJsonp?q=${encoded}`;\nreturn msg;\n", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 390, + "y": 720, + "wires": [ + [ + "1eb4a654a71a42b1" + ] + ] + }, + { + "id": "1eb4a654a71a42b1", + "type": "http request", + "z": "6e1ee0f06e75580d", + "name": "", + "method": "use", + "ret": "txt", + "paytoqs": "ignore", + "url": "", + "tls": "", + "persist": false, + "proxy": "", + "insecureHTTPParser": false, + "authType": "", + "senderr": false, + "headers": [], + "x": 630, + "y": 720, + "wires": [ + [ + "ea87880ca13d9dcb" + ] + ] + }, + { + "id": "ea87880ca13d9dcb", + "type": "function", + "z": "6e1ee0f06e75580d", + "name": "Filtramos el resultado", + "func": "// Limpia la respuesta JSONP (callback(...))\nlet text = msg.payload.trim();\n\n// Detecta y elimina el formato \"callback(...)\" o \"callback123(...)\" u otros\ntext = text.replace(/^[a-zA-Z0-9_]+\\(/, '').replace(/\\);?$/, '');\n\nlet data;\ntry {\n data = JSON.parse(text);\n} catch (e) {\n node.error(\"Error al parsear JSON de CartoCiudad: \" + e.message);\n msg.payload = { error: \"Formato no válido de respuesta CartoCiudad\" };\n return msg;\n}\n\n// La API devuelve un solo objeto, no un array\nif (data && data.lat && data.lng) {\n msg.payload = {\n lat: data.lat,\n lon: data.lng,\n address: data.address || \"\",\n postalCode: data.postalCode || \"\",\n muni: data.muni || \"\",\n province: data.province || \"\",\n source: \"CartoCiudad\",\n raw: data\n };\n} else {\n msg.payload = { error: \"No se encontraron coordenadas en CartoCiudad\" };\n}\nreturn msg;\n", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 820, + "y": 720, + "wires": [ + [ + "6c45fdd52d5b4bd3" + ] + ] + }, + { + "id": "6c45fdd52d5b4bd3", + "type": "switch", + "z": "6e1ee0f06e75580d", + "name": "Existen datos?", + "property": "payload.lat", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "undefined", + "vt": "undefined" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 1020, + "y": 720, + "wires": [ + [ + "9c7e15d6d339c983" + ], + [ + "98b02584803dbcbb" + ] + ], + "outputLabels": [ + "NO", + "SI" + ] + }, + { + "id": "98b02584803dbcbb", + "type": "function", + "z": "6e1ee0f06e75580d", + "name": "Eliminamos los que son coincidentes para no tener que tratarlos manualmente", + "func": "// Función para normalizar texto (elimina acentos y convierte a mayúsculas)\nfunction normalizarTexto(texto) {\n return texto.toString()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toUpperCase()\n .trim();\n}\n\n// Comparación con normalización de address y province\nconst addressCoincide = normalizarTexto(msg.payload.address) === normalizarTexto(msg.direccion.Calle);\nconst provinceCoincide = normalizarTexto(msg.payload.province) === normalizarTexto(msg.direccion.Poblacion);\n\nif (addressCoincide && provinceCoincide) {\n return [null, msg]; // Salida 2 - coinciden\n} else {\n return [msg, null]; // Salida 1 - no coinciden\n}", + "outputs": 2, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 520, + "y": 840, + "wires": [ + [ + "5eccd6a9a750b549" + ], + [ + "3f24b62573b3963b", + "c3ce306882f3d6ab" + ] + ], + "outputLabels": [ + "NO ", + "SI" + ] + }, + { + "id": "3f24b62573b3963b", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Guardamos lo datos de la referencia de cache en mongo", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "insertOne", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "geocache", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\t \"referencia_geocache\": referencia_geocache,\t \"lat\": payload.lat,\t \"lon\": payload.lon,\t \"address\": payload.address,\t \"muni\": payload.muni,\t \"province\": payload.province\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1110, + "y": 860, + "wires": [ + [ + "78c4804a3d71aca2" + ] + ] + }, + { + "id": "78c4804a3d71aca2", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1430, + "y": 860, + "wires": [ + [ + "08ef481b73ada20e" + ] + ] + }, + { + "id": "ac3e7005ee6ca8b4", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1430, + "y": 920, + "wires": [ + [ + "27fbbc6c04034efc" + ] + ] + }, + { + "id": "c3ce306882f3d6ab", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle\t },\t {\t \"$set\": {\t \"latitud\": msg.payload.lat,\t \"longitud\": msg.payload.lon,\t \"geocodingProcesado\": true,\t \"cartociudad\": \"coincidente\"\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1120, + "y": 920, + "wires": [ + [ + "ac3e7005ee6ca8b4" + ] + ] + }, + { + "id": "08ef481b73ada20e", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "GUARDA geocache", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1620, + "y": 860, + "wires": [] + }, + { + "id": "27fbbc6c04034efc", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "ACTUALIZA Calles", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1610, + "y": 920, + "wires": [] + }, + { + "id": "5eccd6a9a750b549", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP\t },\t {\t \"$set\": {\t \"cartociudad\": \"no-coincidente\"\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1120, + "y": 800, + "wires": [ + [ + "31a9908c794f385c" + ] + ] + }, + { + "id": "31a9908c794f385c", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1430, + "y": 800, + "wires": [ + [ + "1fac0a438c4df552" + ] + ] + }, + { + "id": "1fac0a438c4df552", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "Pone no coincidente en cartociudad", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1660, + "y": 800, + "wires": [] + }, + { + "id": "9c7e15d6d339c983", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Actualizamos los datos de todas las calles que sean iguales", + "rules": [ + { + "t": "set", + "p": "operation", + "pt": "msg", + "to": "updateMany", + "tot": "str" + }, + { + "t": "set", + "p": "collection", + "pt": "msg", + "to": "servicios_consolidado_calle_filtrado", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[\t {\t \"TipoVia\": msg.direccion.TipoVia,\t \"Calle\": msg.direccion.Calle,\t \"numero_retirada\": msg.direccion.numero_retirada,\t \"Poblacion\": msg.direccion.Poblacion,\t \"CP\": msg.direccion.CP\t },\t {\t \"$set\": {\t \"cartociudad\": \"no-coincidente\"\t } \t }\t]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1360, + "y": 700, + "wires": [ + [ + "819f4993eed99959" + ] + ] + }, + { + "id": "819f4993eed99959", + "type": "mongodb4", + "z": "6e1ee0f06e75580d", + "clientNode": "648a51546e4dadc6", + "mode": "collection", + "collection": "", + "operation": "", + "output": "toArray", + "maxTimeMS": "0", + "handleDocId": false, + "name": "", + "x": 1670, + "y": 700, + "wires": [ + [ + "711cd5bb325a7107" + ] + ] + }, + { + "id": "711cd5bb325a7107", + "type": "debug", + "z": "6e1ee0f06e75580d", + "name": "Pone no coincidente en cartociudad", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1900, + "y": 700, + "wires": [] + }, + { + "id": "99e57e3e0c9feda3", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "reset", + "rules": [ + { + "t": "set", + "p": "trigger", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 590, + "y": 1080, + "wires": [ + [ + "c91b4ba4c01b3d11" + ] + ] + }, + { + "id": "c91b4ba4c01b3d11", + "type": "simple-queue", + "z": "6e1ee0f06e75580d", + "name": "", + "firstMessageBypass": false, + "bypassInterval": "0", + "x": 610, + "y": 1040, + "wires": [ + [ + "374eb1d0ce2a0c27" + ] + ] + }, + { + "id": "374eb1d0ce2a0c27", + "type": "change", + "z": "6e1ee0f06e75580d", + "name": "Genera resultado_cartociudad", + "rules": [ + { + "t": "set", + "p": "resultado_cartociudad", + "pt": "msg", + "to": "payload.address& \" \" &payload.raw.portalNumber& \" \" &payload.muni& \" \" &payload.province& \" \" &payload.postalCode", + "tot": "jsonata" + }, + { + "t": "set", + "p": "actualizar", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "validando_direccion", + "pt": "flow", + "to": "msg", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 830, + "y": 1040, + "wires": [ + [ + "dc1aec7696d95a97", + "843fbe4881603a6c", + "faacde234e5acc0e", + "abccb8a853c9f234", + "426c5e09624cff47" + ] + ] + }, + { + "id": "843fbe4881603a6c", + "type": "ui-text", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "order": 2, + "width": 0, + "height": 0, + "name": "consulta_calle", + "label": "Consulta Calle: ", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "consulta_calle", + "valueType": "msg", + "x": 1080, + "y": 1040, + "wires": [] + }, + { + "id": "dc1aec7696d95a97", + "type": "ui-text", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "order": 3, + "width": 0, + "height": 0, + "name": "resultado_cartociudad", + "label": "Resultado Cartociudad: ", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "resultado_cartociudad", + "valueType": "msg", + "x": 1100, + "y": 1080, + "wires": [] + }, + { + "id": "faacde234e5acc0e", + "type": "ui-button", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "name": "Validar", + "label": "Validar", + "order": 4, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 1050, + "y": 1120, + "wires": [ + [] + ] + }, + { + "id": "abccb8a853c9f234", + "type": "ui-button", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "name": "Eliminar", + "label": "Eliminar", + "order": 6, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 1060, + "y": 1160, + "wires": [ + [] + ] + }, + { + "id": "426c5e09624cff47", + "type": "ui-button", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "name": "Tratar", + "label": "Tratar", + "order": 5, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "validando_direccion", + "payloadType": "flow", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 1050, + "y": 1200, + "wires": [ + [] + ] + }, + { + "id": "5af76acc28d81750", + "type": "ui-button", + "z": "6e1ee0f06e75580d", + "group": "29e5d13e29bfbb4b", + "name": "Liberar", + "label": "Liberar", + "order": 7, + "width": 0, + "height": 0, + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "date", + "topic": "topic", + "topicType": "msg", + "buttonColor": "", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 1060, + "y": 1240, + "wires": [ + [] + ] + }, + { + "id": "0d6f32bdc24ffd32", + "type": "link in", + "z": "6e1ee0f06e75580d", + "name": "link in 2", + "links": [], + "x": 505, + "y": 1080, + "wires": [ + [ + "99e57e3e0c9feda3" ] ] } diff --git a/flows_cred.json b/flows_cred.json index d08285d..4b9a0b5 100644 --- a/flows_cred.json +++ b/flows_cred.json @@ -1,3 +1,3 @@ { - "$": "e91622fcf2f44192edf8de06370f8f7eJb5ePZ/ltz39/tWFXutlssGlZQYs92iEpmD4aExc1iAme5RltX3GvvG1nS3ISgMCacTA4OZgv3eUsQmsrX6rfnhpYlqynSW1wzrdj6QsRoCQ/YP5alCSqpnkbkXmj6x6B0Bh2j3NEV7G4uyOxhI/31KC5aJEdiSrY63M4pQ1mrFjPjXQ8SJh7TC+v2pGnic36g7R" + "$": "641bf374ff8390650b5f4c357f38db8fGkqji6Zj3U+gA3NLqrgOt171kyGZGWvclVDvlKxvLEsLfjn/ZZO9k2Ssjn+RC8WbixGMPUEYA+gRpphzwWapIXM2s+7bXuA9rFBcOULlDfCIqvmIZoR2F3LO85zn035uzFLuJnJ70vx+0c5swss8avrqk+NWKze4caDkIR/lYepjgpMPl4z2cM7K2qJ7RWKuIov7" } \ No newline at end of file