Merge branch 'dev' into 6184-externalCmr
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
b449da28ef
|
@ -1,5 +1,5 @@
|
|||
|
||||
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
|
||||
const {ParameterizedSQL} = require('loopback-connector');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('getTickets', {
|
||||
|
@ -83,13 +83,15 @@ module.exports = Self => {
|
|||
|
||||
const where = filter.where;
|
||||
where['r.id'] = filter.id;
|
||||
where.and = [{or: [
|
||||
{'t.packages': {gt: 0}},
|
||||
{and: [{'ot.code': 'delivery'}, {'tob.observationTypeFk': {neq: null}}]}
|
||||
]}];
|
||||
|
||||
stmt.merge(conn.makeWhere(filter.where));
|
||||
stmt.merge(conn.makeGroupBy('t.id'));
|
||||
stmt.merge(conn.makeOrderBy(filter.order));
|
||||
|
||||
const tickets = await conn.executeStmt(stmt, myOptions);
|
||||
|
||||
return tickets;
|
||||
return conn.executeStmt(stmt, myOptions);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue