telsale-management/代码/oracle/项目//telsale_policy_check_pkg.~pck

101 lines
3.2 KiB
Plaintext
Raw Normal View History

2021-06-22 03:41:13 +00:00
CREATE OR REPLACE PACKAGE telsale_policy_check_pkg IS
-- Author : <20><><EFBFBD><EFBFBD>
-- Created : 2021/6/21 10:18:01
-- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤
--<2D><><EFBFBD><EFBFBD><EFBFBD>
--<2D><><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD><EFBFBD><EFBFBD>
POLICYNO_NOT_EXIST_EXCEPT_CODE CONSTANT INTEGER := -20000;
POLICYNO_NOT_EXIST_EXCEPT_TEXT CONSTANT VARCHAR2(100) := '<27><><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD><EFBFBD>ڡ<EFBFBD>';
FUNCTION policy_check(a_policy_no VARCHAR2) RETURN BOOLEAN;
FUNCTION staff_check(a_stuff_code VARCHAR2) RETURN BOOLEAN;
PROCEDURE save_policy
(
a_policy_no IN VARCHAR2,
a_operator_code IN VARCHAR2,
a_operator_name OUT VARCHAR2,
a_operator_sectionoffice_code OUT VARCHAR2,
a_operator_sectionoffice_name OUT VARCHAR2,
a_operator_department_code OUT VARCHAR2,
a_operator_department_name OUT VARCHAR2,
a_entry_staff_code IN VARCHAR2,
a_entry_staff_name OUT VARCHAR2,
a_entry_staff_sectionoffice_code OUT VARCHAR2,
a_entry_staff_sectionoffice_name OUT VARCHAR2,
a_entry_staff_department_code OUT VARCHAR2,
a_entry_staff_department_name OUT VARCHAR2
);
END telsale_policy_check_pkg;
/
CREATE OR REPLACE PACKAGE BODY telsale_policy_check_pkg IS
/*********************************************************************************/
FUNCTION staff_check(a_stuff_code VARCHAR2) RETURN BOOLEAN IS
l_count INTEGER;
BEGIN
SELECT COUNT(*)
INTO l_count
FROM idst0.rydm_t@xmcx1.cpicxm ry
WHERE ry.staff_code = a_stuff_code;
IF l_count = 0
THEN
RETURN FALSE;
END IF;
RETURN TRUE;
END;
/*********************************************************************************/
FUNCTION policy_check(a_policy_no VARCHAR2) RETURN BOOLEAN IS
l_count INTEGER;
BEGIN
SELECT COUNT(*)
INTO l_count
FROM idst0.auto_agreement_t@xmcx1.cpicxm a
WHERE a.policy_no = a_policy_no;
IF l_count = 0
THEN
RETURN FALSE;
END IF;
RETURN TRUE;
END;
/*********************************************************************************/
PROCEDURE save_policy
(
a_policy_no IN VARCHAR2,
a_operator_code IN VARCHAR2,
a_operator_name OUT VARCHAR2,
a_operator_sectionoffice_code OUT VARCHAR2,
a_operator_sectionoffice_name OUT VARCHAR2,
a_operator_department_code OUT VARCHAR2,
a_operator_department_name OUT VARCHAR2,
a_entry_staff_code IN VARCHAR2,
a_entry_staff_name OUT VARCHAR2,
a_entry_staff_sectionoffice_code OUT VARCHAR2,
a_entry_staff_sectionoffice_name OUT VARCHAR2,
a_entry_staff_department_code OUT VARCHAR2,
a_entry_staff_department_name OUT VARCHAR2
) IS
l_policy_section_code VARCHAR2(6);
l_policy_department_code VARCHAR2(6);
BEGIN
NULL;
--<2D>жϱ<D0B6><CFB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵĿ<C5B5><C4BF>Ҳ<EFBFBD><D2B2>ź;<C5BA><CDBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ͬ
END;
BEGIN
NULL;
END telsale_policy_check_pkg;
/