diff --git a/modules/ticket/back/methods/ticket/itemLackDetail.js b/modules/ticket/back/methods/ticket/itemLackDetail.js index 6409951f1..ab6e904c4 100644 --- a/modules/ticket/back/methods/ticket/itemLackDetail.js +++ b/modules/ticket/back/methods/ticket/itemLackDetail.js @@ -10,6 +10,12 @@ module.exports = Self => { type: 'number', description: 'The item id', }, + { + arg: 'filter', + type: 'object', + description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', + http: {source: 'query'} + } ], returns: [ { @@ -24,7 +30,7 @@ module.exports = Self => { }, }); - Self.itemLackDetail = async(itemFk, options) => { + Self.itemLackDetail = async(itemFk, filter, options) => { const conn = Self.dataSource.connector; const myOptions = {}; @@ -80,6 +86,11 @@ module.exports = Self => { `, [itemFk, 2]); + // if (filter.where.alertLevel) { + // stmt.merge({ + // sql: `AND ts.alertLevel=?`, params: ['FREE']}); + // } + // stmt.merge(conn.makeWhere(filter)); const sql = ParameterizedSQL.join([stmt], ';'); const result = await conn.executeStmt(sql, myOptions); return result;