Herramientas de usuario

Herramientas del sitio


gom:doc:documentacion_integracion_gomez-neamaster

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Próxima revisión
Revisión previa
gom:doc:documentacion_integracion_gomez-neamaster [2022/01/25 12:31] – creado juanmagom:doc:documentacion_integracion_gomez-neamaster [2022/01/25 17:52] (actual) – [Generalidades] juanma
Línea 1: Línea 1:
 ====== Generalidades ====== ====== Generalidades ======
 +=== Documentación técnica ===
 +https://wiki.smartastur.com/doku.php?id=usu:smartweb:introduccion_a_smartwebdoc
 +
 === Método ===  === Método === 
 POST POST
Línea 11: Línea 14:
 Estas credenciales no son precisas para la interfaz, pero se indican aquí para que el administrador de Smart pueda establecer restricciones o privilegios de acceso a tablas y procedimientos. Estas credenciales no son precisas para la interfaz, pero se indican aquí para que el administrador de Smart pueda establecer restricciones o privilegios de acceso a tablas y procedimientos.
   - Id: PCOUSER   - Id: PCOUSER
-  - Contraseña: PCO2512+  - Contraseña: XXXXXXX
 === Otros === === Otros ===
-Para los ejemplos, se ha utilizado "Postman v8.0.4"+Para los ejemplos, se ha utilizado "Postman v9.10.0"
  
 ---- ----
Línea 36: Línea 39:
   "comandos" :   "comandos" :
   [   [
-    +   
-      "sql":"SELECT * FROM XATJ_UNY_RELACION_MAQUINARIA ROWS 10"+    "sql":"SELECT * FROM DOC_REGISTRA_DOC_EXTERNO(:NroDoc)", 
 +    "params": {"NroDoc" : "CT128233"}
     }     }
   ]   ]
 } }
 </code> </code>
-En el ejemplo, la cláusula "ROWS 10" limita el resultado a los primeros 10 registros. En "producción", podría omitirse. 
 == Resultado == == Resultado ==
 <code> <code>
Línea 51: Línea 54:
             "estado": "OK",             "estado": "OK",
             "metaData": {             "metaData": {
-                "S_NRO_SERIE": {+                "S_MENSAJE": {
                     "tipo": "ftString",                     "tipo": "ftString",
-                    "etiqueta": "+                    "etiqueta": "Mensaje"
-                }, +
-                "S_NOMBRE":+
-                    "tipo": "ftString", +
-                    "etiqueta": "" +
-                }, +
-                "S_ESTADO":+
-                    "tipo": "ftString", +
-                    "etiqueta": "" +
-                }, +
-                "S_TIMESTAMP":+
-                    "tipo": "ftDateTime", +
-                    "etiqueta": ""+
                 }                 }
             },             },
             "datos": [             "datos": [
                 {                 {
-                    "S_NRO_SERIE": "000272", +                    "S_MENSAJE": "OK"
-                    "S_NOMBRE": "VIBRADOR ENAR ELE.TRIFAS.", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "000273", +
-                    "S_NOMBRE": "VIBRADOR ENAR ELEC. MONF", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "000458", +
-                    "S_NOMBRE": "ROZADORA NEUMAC FR-07", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "001137", +
-                    "S_NOMBRE": "TALADRO PERCUTOR MARCA HITACHI MODELO DV18DV", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "001143", +
-                    "S_NOMBRE": "COMPRESOR ESTACIONARIO MARCA INGERSOLLRAND MODELO BD2-100P-1", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "000338", +
-                    "S_NOMBRE": "MINIAMOLADORA MARCA HITACHI MODELO G12SR2", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "000683", +
-                    "S_NOMBRE": "COMPRESOR INDUSTRIAL MARCA INGERSOLLRAND MODELO BD10/500F/3", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "001215", +
-                    "S_NOMBRE": "SAI", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "001216", +
-                    "S_NOMBRE": "SAI", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00" +
-                }, +
-                { +
-                    "S_NRO_SERIE": "001217", +
-                    "S_NOMBRE": "SAI", +
-                    "S_ESTADO": "RECOGIDA", +
-                    "S_TIMESTAMP": "2021-12-14T14:57:49.780+02:00"+
                 }                 }
             ]             ]
         }         }
     ]     ]
-}</code> 
- 
----- 
-====== Consulta de activos ====== 
-=== Procedimiento === 
-XATJ_UNY_RELACION_ACTIVOS 
-=== Parámetros === 
-  - P_NROS_SERIE VARCHAR(4096) 
-=== Resultados === 
-  - S_NRO_SERIE VARCHAR(20), 
-  - S_NOMBRE VARCHAR(60), 
-  - S_ITO VARCHAR(1) 
-=== Comportamiento === 
-  - El procedimiento recibe una lista de números de serie de maquinaria separados por una coma en el parámetro P_NROS_SERIE. 
-  - Devuelve una lista compuesta de los siguientes campos: 
-    - S_NRO_SERIE: el mismo que el recibido como parámetro. 
-    - S_NOMBRE: el nombre correspondiente al número de serie obtenido, en su caso, de la ficha de "activo". En caso de que el número de serie no estuviera registrado en Smart, en este campo se devolverá el valor: INEXISTENTE 
-    - S_ITO: En caso de que el producto asociado al activo figure en la colección "ITO", se devolverá el valor "S", y nada en cualquier otro caso. 
- 
- 
- 
-=== Ejemplo === 
-== Cuerpo del método post == 
-<code> 
-{ 
-  "version"  : "1.2", 
-  "metodo"   : "Raw", 
-  "opciones" : { "metaData":true }, 
-  "comandos" : 
-  [ 
-   { 
-    "sql":"SELECT * FROM XATJ_UNY_RELACION_ACTIVOS(:P_NROS_SERIE)", 
-    "params": { "P_NROS_SERIE" : "000001,012383,949343"} 
-    }    
-  ] 
 } }
 </code> </code>
  
-== Resultado == 
-<code> 
-{ 
-    "version": "1.2", 
-    "resultados": [ 
-        { 
-            "estado": "OK", 
-            "metaData": { 
-                "S_NRO_SERIE": { 
-                    "tipo": "ftString", 
-                    "etiqueta": "" 
-                }, 
-                "S_NOMBRE": { 
-                    "tipo": "ftString", 
-                    "etiqueta": "" 
-                }, 
-                "S_ITO": { 
-                    "tipo": "ftString", 
-                    "etiqueta": "" 
-                } 
-            }, 
-            "datos": [ 
-                { 
-                    "S_NRO_SERIE": "000001", 
-                    "S_NOMBRE": "FRATASADORA MARCA ARTEL MODELO F90GE", 
-                    "S_ITO": null 
-                }, 
-                { 
-                    "S_NRO_SERIE": "012383", 
-                    "S_NOMBRE": "MINIRETROEXCAVADORA MARCA TAKEUCHI MODELO TB015 CON CANOPI", 
-                    "S_ITO": "S" 
-                }, 
-                { 
-                    "S_NRO_SERIE": "949343", 
-                    "S_NOMBRE": "INEXISTENTE", 
-                    "S_ITO": null 
-                } 
-            ] 
-        } 
-    ] 
-} 
- 
-</code> 
 ---- ----
  
 == Control de cambios del documento == == Control de cambios del documento ==
- --- //[[juanma@smartastur.com|Juanma]] 2022/01/14 14:26// Consulta de activos + --- //[[juanma@smartastur.com|Juanma]] 2022/01/25 12:32// Documento inicial
- +
- --- //[[juanma@smartastur.com|Juanma]] 2021/12/15 09:26// Documento inicial +
  
gom/doc/documentacion_integracion_gomez-neamaster.1643110305.txt.gz · Última modificación: 2022/01/25 12:31 por juanma

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki