feat(salix): refs #6321 #6321 TODO

This commit is contained in:
Javier Segarra 2024-09-13 09:44:09 +02:00
parent 09a7918ab3
commit e76e2a15f2
1 changed files with 12 additions and 1 deletions

View File

@ -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;