Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RONALDO RODRIGUES DE OLIVEIRA
/
simec-scripts-banco
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2ca41bfb
authored
Jan 27, 2025
by
RONALDO RODRIGUES DE OLIVEIRA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update PLpgSQLFunction-etiqNaturezaInteresse-REQ000000329189.sql
parent
5e65c2ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
PLpgSQLFunction-etiqNaturezaInteresse-REQ000000329189.sql
PLpgSQLFunction-etiqNaturezaInteresse-REQ000000329189.sql
View file @
2ca41bfb
CREATE
OR
REPLACE
FUNCTION
par
.
naturezainteresse
(
CREATE
OR
REPLACE
FUNCTION
par
.
naturezainteresse
(
iniciomandato
date
,
iniciomandato
date
,
fimmandato
date
,
fimmandato
date
,
...
@@ -29,7 +30,7 @@ BEGIN
...
@@ -29,7 +30,7 @@ BEGIN
ELSE
ELSE
data_final_pc
:
=
fimvigencia
+
60
;
data_final_pc
:
=
fimvigencia
+
60
;
END
IF
;
END
IF
;
raise
notice
'data_final_pc %'
,
data_final_pc
;
IF
fimmandato
IS
NULL
THEN
IF
fimmandato
IS
NULL
THEN
natureza
:
=
'Atual Gestor /'
;
natureza
:
=
'Atual Gestor /'
;
IF
((
iniciomandato
>=
iniciovigencia
)
AND
(
iniciomandato
<=
fimvigencia
))
THEN
IF
((
iniciomandato
>=
iniciovigencia
)
AND
(
iniciomandato
<=
fimvigencia
))
THEN
...
@@ -37,7 +38,7 @@ BEGIN
...
@@ -37,7 +38,7 @@ BEGIN
ELSEIF
iniciovigencia
>=
iniciomandato
THEN
ELSEIF
iniciovigencia
>=
iniciomandato
THEN
natureza
:
=
concat
(
natureza
,
'Responsável /'
);
natureza
:
=
concat
(
natureza
,
'Responsável /'
);
END
IF
;
END
IF
;
IF
data_final_pc
>=
iniciomandato
THEN
IF
data_
corte
>=
iniciomandato
OR
data_
final_pc
>=
iniciomandato
THEN
natureza
:
=
concat
(
natureza
,
'Corresponsável /'
);
natureza
:
=
concat
(
natureza
,
'Corresponsável /'
);
END
IF
;
END
IF
;
ELSE
ELSE
...
@@ -58,7 +59,7 @@ BEGIN
...
@@ -58,7 +59,7 @@ BEGIN
END
IF
;
END
IF
;
END
;
END
;
IF
data_final_pc
>=
iniciomandato
AND
data_final_pc
<=
fimmandato
THEN
IF
data_final_pc
>=
iniciomandato
AND
data_final_pc
<=
fimmandato
and
data_corte
<=
fimmandato
THEN
natureza
:
=
concat
(
natureza
,
'Corresponsável /'
);
natureza
:
=
concat
(
natureza
,
'Corresponsável /'
);
END
IF
;
END
IF
;
...
@@ -88,4 +89,3 @@ drop FUNCTION par.naturezainteresse(
...
@@ -88,4 +89,3 @@ drop FUNCTION par.naturezainteresse(
fimvigencia date,
fimvigencia date,
programa varchar(10)
programa varchar(10)
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment