2021-03-11 15:39:10 +00:00
|
|
|
const insertShelving = require('./insertShelving');
|
|
|
|
const bindShelving = require('./bindShelving');
|
2021-03-11 15:58:34 +00:00
|
|
|
const filter = require('./filter');
|
2021-03-12 12:54:21 +00:00
|
|
|
const insertDB = require('./db/insertDB')
|
2021-03-11 15:39:10 +00:00
|
|
|
|
2021-03-11 15:58:34 +00:00
|
|
|
function bindShelvingTag(barcode, shelving, level){
|
|
|
|
if(filter.filterBarcode(barcode)){
|
|
|
|
if(filter.filterShelving(shelving)){
|
|
|
|
bindShelving.bindShelving(barcode, shelving, level);
|
2021-03-15 09:56:07 +00:00
|
|
|
insertShelving.insertShelving(shelving, level);
|
2021-03-12 12:54:21 +00:00
|
|
|
insertDB.insertDB(barcode, shelving, level);
|
2021-03-11 15:58:34 +00:00
|
|
|
}else{
|
2021-03-15 10:43:42 +00:00
|
|
|
console.log("¡MATRICULA INCORRECTA!")
|
2021-03-11 15:58:34 +00:00
|
|
|
}
|
|
|
|
}else{
|
|
|
|
console.log("¡CODIGO DE ETIQUETA INCORRECTO!")
|
|
|
|
}
|
2021-03-11 15:39:10 +00:00
|
|
|
}
|
|
|
|
///DATOS INTRODUCIDOS POR EL USUARIO////
|
2021-03-15 16:35:41 +00:00
|
|
|
var barcode = "A0A3B8224DBF"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
|
|
|
|
var shelving = "BCD"; //valido = 3 CARACTERES LETRAS (A-Z)
|
2021-03-11 15:39:10 +00:00
|
|
|
var level = "1";
|
2021-03-11 15:58:34 +00:00
|
|
|
bindShelvingTag(barcode, shelving, level);
|
2021-03-11 15:39:10 +00:00
|
|
|
//////////////////////////////////////
|
|
|
|
|