is_tripartite function used to quickly determine if Market participant is a tripartite member or not. Used when determining things like whether AMR or certain types of jobs are available to users
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3244 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
CREATE OR REPLACE PACKAGE mip_parties AS
|
CREATE OR REPLACE PACKAGE mip_parties AS
|
||||||
|
|
||||||
/*
|
FUNCTION is_tripartite(p_mktp_ref IN VARCHAR2) RETURN BOOLEAN;
|
||||||
PROCEDURE add_party
|
|
||||||
- allows an admin user to create new parties for use in the system
|
|
||||||
%param p_username - the name of the user to create
|
|
||||||
%param p_password - the password of the party
|
|
||||||
%p_role - the party's role in the system
|
|
||||||
*/
|
|
||||||
FUNCTION get_user_id(p_username IN VARCHAR2) RETURN NUMBER;
|
FUNCTION get_user_id(p_username IN VARCHAR2) RETURN NUMBER;
|
||||||
FUNCTION get_user_role(p_username IN VARCHAR2) RETURN VARCHAR2;
|
FUNCTION get_user_role(p_username IN VARCHAR2) RETURN VARCHAR2;
|
||||||
--
|
--
|
||||||
@@ -192,6 +186,27 @@ CREATE OR REPLACE PACKAGE mip_parties AS
|
|||||||
END mip_parties;
|
END mip_parties;
|
||||||
/
|
/
|
||||||
CREATE OR REPLACE PACKAGE BODY mip_parties AS
|
CREATE OR REPLACE PACKAGE BODY mip_parties AS
|
||||||
|
/*
|
||||||
|
FUNCTION is_tripartite
|
||||||
|
- This function searches the parties table with the supplied
|
||||||
|
- mktp_ref and returns true if the tripartite member column is yes.
|
||||||
|
%param p_mktp_ref - the market participant (supplier) to check.
|
||||||
|
*/
|
||||||
|
FUNCTION is_tripartite(p_mktp_ref IN VARCHAR2) RETURN BOOLEAN AS
|
||||||
|
l_tripartite_status varchar2(3);
|
||||||
|
CURSOR c_tripartite IS
|
||||||
|
SELECT distinct tripartite_member FROM parties WHERE upper(mktp_ref) = upper(p_mktp_ref);
|
||||||
|
BEGIN
|
||||||
|
OPEN c_tripartite;
|
||||||
|
FETCH c_tripartite
|
||||||
|
INTO l_tripartite_status;
|
||||||
|
CLOSE c_tripartite;
|
||||||
|
if upper(l_tripartite_status) = 'YES' then
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
end if;
|
||||||
|
END is_tripartite;
|
||||||
/*
|
/*
|
||||||
FUNCTION get_user_id
|
FUNCTION get_user_id
|
||||||
- gets the primary key for a supplied username. This function searches the parties
|
- gets the primary key for a supplied username. This function searches the parties
|
||||||
|
|||||||
Reference in New Issue
Block a user