From 662d44c1378c4babbf9140fd3769736cdcf1f327 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 18 Mar 2026 11:29:27 -0300 Subject: [PATCH] fix error --- src/products/products.module.ts | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/products/products.module.ts b/src/products/products.module.ts index 4df0d22..c1b23b3 100644 --- a/src/products/products.module.ts +++ b/src/products/products.module.ts @@ -288,25 +288,18 @@ export default moduleFactory DIN_ABASTECIMENTO_PRODUTOS p WHERE 1 = 1 - AND ( - ( - ${args.filtro} IS NOT NULL - AND ( - p.SEQPRODUTO LIKE '%' || ${args.filtro} || '%' + AND p.SEQPRODUTO LIKE '%' || ${args.filtro} || '%' OR UPPER(p.DESCCOMPLETA) LIKE UPPER('%' || ${args.filtro} || '%') - ) - ) - OR ( - ${args.ean} IS NOT NULL - AND EXISTS ( - SELECT 1 - FROM CONSINCO.MAP_PRODCODIGO A - WHERE A.SEQPRODUTO = p.SEQPRODUTO + OR EXISTS ( + SELECT + 1 + FROM + CONSINCO.MAP_PRODCODIGO A + WHERE + A.SEQPRODUTO = p.SEQPRODUTO AND ISNUMERIC(A.CODACESSO) = 'S' AND A.CODACESSO = ${args.ean} ) - ) - ) ORDER BY 2 `,