change filter product search
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -288,18 +288,29 @@ export default moduleFactory
|
||||
DIN_ABASTECIMENTO_PRODUTOS p
|
||||
WHERE
|
||||
1 = 1
|
||||
AND p.SEQPRODUTO LIKE '%' || ${args.filtro} || '%'
|
||||
AND (
|
||||
(
|
||||
${args.filtro} IS NOT NULL
|
||||
AND (
|
||||
p.SEQPRODUTO LIKE '%' || ${args.filtro} || '%'
|
||||
OR UPPER(p.DESCCOMPLETA) LIKE UPPER('%' || ${args.filtro} || '%')
|
||||
OR EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
CONSINCO.MAP_PRODCODIGO A
|
||||
WHERE
|
||||
A.SEQPRODUTO = p.SEQPRODUTO
|
||||
)
|
||||
)
|
||||
OR (
|
||||
${args.ean} IS NOT NULL
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM CONSINCO.MAP_PRODCODIGO A
|
||||
WHERE A.SEQPRODUTO = p.SEQPRODUTO
|
||||
AND ISNUMERIC(A.CODACESSO) = 'S'
|
||||
AND A.CODACESSO = ${args.ean}
|
||||
)
|
||||
)
|
||||
OR (
|
||||
${args.filtro} IS NULL
|
||||
AND ${args.ean} IS NULL
|
||||
)
|
||||
)
|
||||
ORDER BY
|
||||
2
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user