commit
This commit is contained in:
parent
c846686ae5
commit
fc9deb6726
|
@ -1,13 +1,14 @@
|
|||
const insert = require('./insertTicket');
|
||||
const filter = require('./filter');
|
||||
const select = require('./db/selectDB')
|
||||
//const select = require('./db/selectDB');
|
||||
import select from './db/selectDB';
|
||||
|
||||
var barcode = "A0A3B820690F";
|
||||
var shelving = "BCD";///introducida por el usuario O en leida de la bbdd?
|
||||
var collectionFk = '254';
|
||||
|
||||
function ticketCollection(collectionFk, shelving){//parametro collectionFk
|
||||
select.select(collectionFk, function(err,data){
|
||||
select(collectionFk, function(err,data){
|
||||
if(filter.filterShelving(shelving)){
|
||||
insert.insertTicket(data, shelving)
|
||||
}
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
const con = require('./connect')
|
||||
|
||||
//ticket
|
||||
//cliente
|
||||
//agencia
|
||||
var x;
|
||||
function select(collectionFk, callback){
|
||||
|
||||
module.exports = function (collectionFk, callback){
|
||||
let consSql = `SELECT t.id AS Ticket, c.name AS Client, am.name AS Agency, tc.level AS Level
|
||||
FROM ticketCollection tc
|
||||
JOIN ticket t ON t.id = tc.ticketFk JOIN client c ON t.clientFk = c.id
|
||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||
WHERE tc.collectionFk = ${collectionFk}`;
|
||||
|
||||
con.con.query(consSql, function (err, result, fields) {
|
||||
console.log(result);
|
||||
callback(null,result);
|
||||
});
|
||||
}
|
||||
|
||||
exports.select = select;
|
||||
console.log("PROBA");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,3 @@ const encryptPassword = async(password) => {
|
|||
};
|
||||
|
||||
exports.encryptPassword = encryptPassword;
|
||||
|
||||
|
||||
////hofdsafads
|
||||
//sadasdas
|
Reference in New Issue