This commit is contained in:
llopis15 2021-03-18 11:51:28 +01:00
parent f0a9b6894f
commit e60599b5db
2 changed files with 1 additions and 8 deletions

View File

@ -19,11 +19,7 @@ function ticketCollection(collectionFk) {// parametro collectionFk
maxWagon.maxWagon(collectionFk, function(err, max) {
// aqui iria una función para pedir el numero de shelvings correspondientes
let shelving = ['ABC', 'DFG', 'HIJ'];
// if(filter.isShelving(shelving)){
insertTicket(data, shelving, max);
// }else{
// console.log("¡MATRICULA INCORRECTA!")
// }
});
});
}
@ -63,7 +59,6 @@ function insertTicket(consultaSql, shelving, max) {
}
});
return true;
// console.log(body,consultaSql[i].Ticket,shelving[consultaSql[i].Wagon-1],consultaSql[i].Level.toString().charAt(j))
}
}
})();

View File

@ -10,7 +10,7 @@ function insertTicket(consultaSql, shelving, max) {
for (let i = 0; i < consultaSql.length; i++) {
// for(var j=0;j<max;j++){
for (let j = 0; j < consultaSql[i].Level.toString().length; j++) {
const {body} = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', {
const {body} = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', { // eslint-disable-line
json: {
agencyId: currentUser.agencyId,
merchantId: currentUser.merchantId,
@ -33,9 +33,7 @@ function insertTicket(consultaSql, shelving, max) {
'Authorization': key
}
});
console.log(body);
}
// }
}
})();
})();