delete console.log

This commit is contained in:
alexmorenograu 2021-03-18 11:51:40 +01:00
parent e60599b5db
commit 796653580c
6 changed files with 2 additions and 13 deletions

View File

@ -6,6 +6,5 @@ con.con.connect(function(err) {
let sql = 'CREATE TABLE smartTag2 (code VARCHAR(100) PRIMARY KEY, shelvingFk VARCHAR(10) FOREIGN KEY REFERENCES vn.shelving(code), level INT(11))';
con.con.query(sql, function(err, result) {
if (err) throw err;
console.log('Table created');
});
});

View File

@ -3,7 +3,6 @@ const con = require('./connect');
function insertDB(barcode, shelving, level) {
con.con.connect(function(err) {
if (err) throw err;
// console.log("Connected!");
let sql = `IF EXISTS(SELECT * FROM vn.smartTag WHERE code='${barcode}')
THEN
UPDATE vn.smartTag
@ -16,7 +15,6 @@ function insertDB(barcode, shelving, level) {
END IF;`;
con.con.query(sql, function(err, result) {
if (err) throw err;
// console.log("1 record inserted");
});
});
}

View File

@ -5,7 +5,6 @@ function maxWagon(collectionFk, callback) {
FROM ticketCollection tc
WHERE tc.collectionFk = ${collectionFk}`;
con.con.query(consSql, function(err, result, fields) {
console.log(result);
callback(null, result);
});
}

View File

@ -2,7 +2,6 @@ const con = require('./connect');
con.con.connect(function(err) {
if (err) throw err;
console.log('Connected!');
let sql = `INSERT INTO vn.smartTag (code, shelvingFk, level) VALUES
('A0A3B8288AB1', 'ABC', 1),
('A0A3B8288AB2', 'ABC', 2),
@ -15,6 +14,5 @@ con.con.connect(function(err) {
;`;
con.con.query(sql, function(err, result) {
if (err) throw err;
console.log('records inserted');
});
});

View File

@ -9,7 +9,6 @@ function select(collectionFk, callback) {
ORDER BY tc.wagon, tc.level`;
con.con.query(consSql, function(err, result, fields) {
console.log(result);
callback(null, result);
});
}

View File

@ -30,14 +30,10 @@ function bindShelvingTag(barcode, shelving, level) {
insertShelving(shelvingId);
bindShelving(barcode, shelvingId);
insertDB.insertDB(barcode, shelving, level);
} else {
// console.log("¡MATRICULA INCORRECTA!");
} else
return 'INVALID_PLATE';
}
} else {
// console.log("¡CODIGO DE ETIQUETA INCORRECTO!")
} else
return 'INVALID_TAG_CODE';
}
}
function insertShelving(shelvingId) {