add selectTicket
This commit is contained in:
parent
cf8d51ddf9
commit
214aee2285
|
@ -0,0 +1,15 @@
|
|||
const con = require('./connect');
|
||||
|
||||
function select(ticket, callback) {
|
||||
let consSql = `SELECT st.ticketFk AS Ticket, st.shelvingFk AS Shelving, st.level AS Level, c.name AS Client, am.name AS Agency
|
||||
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;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
const express = require('express');
|
||||
const router = express.Router(); // eslint-disable-line
|
||||
const select = require('../db/selectDB');
|
||||
const select = require('../db/selectCollection');
|
||||
const filter = require('../utilities/filter');
|
||||
|
||||
router.get('/:collectionShelving&:collectionFk', async(req, res) => {
|
||||
|
|
Reference in New Issue