Merge pull request '6210-filterClient' (!1755) from 6210-filterClient into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1755
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Guillermo Bonet 2023-09-20 05:07:21 +00:00
commit d1e5b8e699
1 changed files with 9 additions and 4 deletions

View File

@ -80,10 +80,15 @@ module.exports = Self => {
Object.assign(myOptions, options);
if (args.zoneFk) {
query = `CALL vn.zone_getPostalCode(?)`;
const [geos] = await Self.rawSql(query, [args.zoneFk]);
for (let geo of geos)
postalCode.push(geo.name);
let stmts = [];
stmts.push(new ParameterizedSQL('CALL vn.zone_getPostalCode(?)', [args.zoneFk]));
stmts.push(`SELECT name FROM tmp.zoneNodes`);
stmts.push(`DROP TEMPORARY TABLE tmp.zoneNodes`);
const sql = ParameterizedSQL.join(stmts, ';');
const [results] = await conn.executeStmt(sql);
for (let result of results)
postalCode.push(result.name);
}
const where = buildFilter(ctx.args, (param, value) => {