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-25 08:33:53 +00:00
|
|
|
const con = require('./connect');
|
|
|
|
|
|
|
|
function select(ticket, callback) {
|
2021-03-30 06:06:07 +00:00
|
|
|
let consSql = `SELECT st.ticketFk AS Ticket, st.shelvingFk AS Shelving, st.level AS Level, t.clientFk AS Client, am.name AS Agency
|
2021-03-25 08:33:53 +00:00
|
|
|
FROM smartTag st JOIN ticket t ON st.ticketFk = t.id JOIN client c ON t.clientFk = c.id
|
|
|
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
|
|
|
WHERE st.ticketFk = ${ticket}`;
|
|
|
|
|
|
|
|
con.con.query(consSql, function(err, result, fields) {
|
|
|
|
callback(null, result);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.select = select;
|
|
|
|
|