This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
smart-tag/bindTicketShelving.js

24 lines
871 B
JavaScript
Raw Normal View History

2021-03-17 14:27:09 +00:00
const insert = require('./methods/insertTicket');
2021-03-17 08:11:55 +00:00
const filter = require('./utilities/filter');
2021-03-16 11:25:32 +00:00
const select = require('./db/selectDB');
2021-03-17 08:11:55 +00:00
const maxWagon = require('./db/maxWagon');
2021-03-11 15:38:22 +00:00
2021-03-11 14:41:03 +00:00
var barcode = "A0A3B820690F";
2021-03-17 08:11:55 +00:00
//var shelving = "BCD";///introducida por el usuario O en leida de la bbdd?
var collectionFk = '273449';
2021-03-11 14:41:03 +00:00
2021-03-16 11:25:32 +00:00
function ticketCollection(collectionFk){//parametro collectionFk
2021-03-15 09:13:16 +00:00
select.select(collectionFk, function(err,data){
2021-03-17 08:11:55 +00:00
maxWagon.maxWagon(collectionFk,function(err,max){
//aqui iria una función para pedir el numero de shelvings correspondientes
var shelving = ['ABC','DFG','HIJ']
//if(filter.isShelving(shelving)){
insert.insertTicket(data, shelving, max)
//}else{
//console.log("¡MATRICULA INCORRECTA!")
//}
});
2021-03-15 09:13:16 +00:00
});
2021-03-11 14:41:03 +00:00
}
2021-03-16 11:25:32 +00:00
ticketCollection(collectionFk);