Merge branch 'dev' of https://repositorio.acatlan.unam.mx/CIDWA/censo2020Back into dev
This commit is contained in:
@@ -9,7 +9,7 @@ const get = async(req, res) => {
|
||||
// });
|
||||
//console.log(req["tipo"].value);
|
||||
await sequelize.query(`
|
||||
SELECT I.noInventario, AF.activoFijo, E.modelo, M.marca, E.noSerie, E.procesador, E.hdd, E.memoriasz, E.memoria, E.vMemoria, E.graficos, OS.osname, UR.uResponsable, UR.nombreResponsable, Ub.ubicacion, U.uso, I.noResguardo
|
||||
SELECT I.noInventario, AF.activoFijo, E.modelo, M.marca, E.noSerie, E.procesador, E.vProcesador, E.hdd, E.memoriasz, E.memoria, E.vMemoria, E.graficos, OS.osname, I.noResguardo, UR.uResponsable, UR.nombreResponsable, Ub.ubicacion, U.uso
|
||||
FROM inventario I
|
||||
INNER JOIN activoFijo AF ON AF.idActivoFijo = I.idActivoFijo
|
||||
INNER JOIN equipo E ON E.noInventario = I.noInventario
|
||||
@@ -19,11 +19,9 @@ const get = async(req, res) => {
|
||||
INNER JOIN ubicacion Ub ON Ub.idUbicacion = I.idUbicacion
|
||||
INNER JOIN uso U ON U.idUso = I.idUso
|
||||
ORDER BY E.createdAt DESC`, { type: QueryTypes.SELECT })
|
||||
.then(equipo => {
|
||||
return res.json({
|
||||
equipo
|
||||
})
|
||||
})
|
||||
.then(equipo => res.json({
|
||||
equipo
|
||||
}))
|
||||
.catch(error => res.status(500).json({
|
||||
error
|
||||
}));
|
||||
|
||||
@@ -5,11 +5,14 @@ const { QueryTypes } = require('sequelize');
|
||||
const get = async(req, res) => {
|
||||
|
||||
await sequelize.query(`
|
||||
SELECT I.noInventario, T.tipo, P.modelo, M.marca, P.noSerie, P. descripcion
|
||||
SELECT I.noInventario, T.tipo, P.modelo, M.marca, P.noSerie, P. descripcion, I.noResguardo, UR.uResponsable, UR.nombreResponsable, Ub.ubicacion, U.uso
|
||||
FROM inventario I
|
||||
INNER JOIN printers P ON P.noInventario = I.noInventario
|
||||
INNER JOIN marca M ON M.idMarca = P.idMarca
|
||||
INNER JOIN tipo T ON T.idTipo = P.idTipo
|
||||
INNER JOIN uResponsable UR ON UR.idUnidadResponsable = I.idUnidadResponsable
|
||||
INNER JOIN ubicacion Ub ON Ub.idUbicacion = I.idUbicacion
|
||||
INNER JOIN uso U ON U.idUso = I.idUso
|
||||
ORDER BY P.createdAt DESC
|
||||
`, { type: QueryTypes.SELECT })
|
||||
.then(printers => {
|
||||
|
||||
Reference in New Issue
Block a user