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){
|
2021-03-16 11:25:32 +00:00
|
|
|
if(filter.isBarcode(barcode)){
|
|
|
|
if(filter.isShelving(shelving)){
|
2021-03-11 15:58:34 +00:00
|
|
|
bindShelving.bindShelving(barcode, shelving, level);
|
2021-03-15 09:56:07 +00:00
|
|
|
insertShelving.insertShelving(shelving, level);
|
2021-03-16 11:25:32 +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-16 11:25:47 +00:00
|
|
|
var barcode = "A0A3B8224DFF"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
|
|
|
|
var shelving = "ABC"; //valido = 3 CARACTERES LETRAS (A-Z)
|
|
|
|
var level = "4";
|
2021-03-11 15:39:10 +00:00
|
|
|
//////////////////////////////////////
|
|
|
|
|
2021-03-16 07:58:58 +00:00
|
|
|
bindShelvingTag(barcode, shelving, level);
|
|
|
|
|
|
|
|
|