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.
2021-03-12 15:26:02 +00:00
|
|
|
const con = require('./connect')
|
|
|
|
|
|
|
|
//ticket
|
|
|
|
//cliente
|
|
|
|
//agencia
|
2021-03-12 15:58:15 +00:00
|
|
|
var x;
|
2021-03-15 08:42:05 +00:00
|
|
|
function select(collectionFk, callback){
|
|
|
|
|
|
|
|
let consSql = `SELECT t.id, t.clientFk, am.name
|
|
|
|
FROM ticketCollection tc
|
|
|
|
JOIN ticket t ON t.id = tc.ticketFk
|
|
|
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
|
|
|
WHERE tc.collectionFk = ${collectionFk}`;
|
|
|
|
con.con.query(consSql, function (err, result, fields) {
|
2021-03-12 15:26:02 +00:00
|
|
|
console.log(result);
|
2021-03-15 08:42:05 +00:00
|
|
|
callback(null,result);
|
2021-03-12 15:26:02 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
exports.select = select;
|
|
|
|
|