新功能上线
清除默认赋值权限, 仅有管理员可见
-- 功能定义
declare
o_function_id number;
begin
sys_function_pkg.sys_function_load(p_function_code => 'XX001',
p_function_name => '功能名称',
p_parent_code => null,
p_type => 'F', -- 功能
p_service_name => 'modules/xxx/XX001/xxx.lview',
p_squence => null,
p_icon_path => null,
p_language_code => userenv('lang'));
select s.function_id into o_function_id from sys_function s where s.function_code = 'XX001';
dbms_output.put_line('新功能ID >> ' || o_function_id);
-- 页面分配
delete from sys_function_service s where s.function_id = o_function_id;
insert into sys_function_service(function_id, service_id, creation_date, created_by, last_update_date, last_updated_by)
select o_function_id, s.service_id, sysdate, 1368, sysdate, 1368
from sys_service s
where s.service_name in
('modules/xxx/XX001/xxx.lview',
);
-- 分配BM
delete from sys_function_bm_access s where s.function_id = o_function_id;
insert into sys_function_bm_access(access_id, function_id, bm_name, insert_option, update_option, query_option, delete_option, execute_option, created_by, creation_date, last_updated_by, last_update_date)
values (sys_function_bm_access_s.nextval, o_function_id, 'xxx.XX001.xxx', 'Y','Y','Y','Y','Y',1368,sysdate,1368,sysdate);
end;
功能注册脚本
页面注册
-- 路径, URL, 是否需要权限控制, 是否需要登录, 系统级
sys_service_pkg.sys_service_load('modules/rating/RATING001/cs_rating_data_handle.lsc', '商业伙伴评级', 0, 0, 0);
系统Code导出
将当前系统代码导出, 并输出到控制台, 方便迁移.
declare
v_code varchar2(200);
begin
dbms_output.put_line('begin');
for c_sys_code in(select * from sys_code_values_v s where s.code in('FFM110_APPROVAL_STATUS')) loop
if v_code is null or v_code <> c_sys_code.code then
dbms_output.put_line('sys_code_pkg.insert_sys_code(p_code =>'|| hls_util_pkg.format_varchar2(c_sys_code.code)||',
p_code_name =>'||hls_util_pkg.format_varchar2(c_sys_code.code_name)||',
p_sys_flag =>'||hls_util_pkg.format_varchar2('N')||',
p_code_prompt =>' ||''''',
p_code_name_prompt =>'||''''',
p_language_code =>'|| hls_util_pkg.format_varchar2('ZHS')||');');
end if;
dbms_output.put_line('sys_code_pkg.insert_sys_code_value(p_code =>'||hls_util_pkg.format_varchar2(c_sys_code.code)||',
p_code_value =>'|| hls_util_pkg.format_varchar2(c_sys_code.code_value)||',
p_code_value_name => '||hls_util_pkg.format_varchar2(c_sys_code.code_value_name)||',
p_order_seq => '||hls_util_pkg.format_number(c_sys_code.order_seq)||',
p_language_code =>'|| hls_util_pkg.format_varchar2('ZHS')||');');
v_code := c_sys_code.code;
end loop;
dbms_output.put_line('end ;');
end;
功能定义
将已经注册的页面进行功能定义, 并定义分配页面和BM
-- 功能定义
declare
o_function_id number;
begin
sys_function_pkg.sys_function_load(p_function_code => 'XX001',
p_function_name => '功能名称',
p_parent_code => null,
p_type => 'F', -- 功能
p_service_name => 'modules/xxx/XX001/xxx.lview',
p_squence => null,
p_icon_path => null,
p_language_code => userenv('lang'));
select s.function_id into o_function_id from sys_function s where s.function_code = 'XX001';
dbms_output.put_line('新功能ID >> ' || o_function_id);
-- 页面分配
delete from sys_function_service s where s.function_id = o_function_id;
insert into sys_function_service(function_id, service_id, creation_date, created_by, last_update_date, last_updated_by)
select o_function_id, s.service_id, sysdate, 1368, sysdate, 1368
from sys_service s
where s.service_name in
('modules/xxx/XX001/xxx.lview',
);
-- 分配BM
delete from sys_function_bm_access s where s.function_id = o_function_id;
insert into sys_function_bm_access(access_id, function_id, bm_name, insert_option, update_option, query_option, delete_option, execute_option, created_by, creation_date, last_updated_by, last_update_date)
values (sys_function_bm_access_s.nextval, o_function_id, 'xxx.XX001.xxx', 'Y','Y','Y','Y','Y',1368,sysdate,1368,sysdate);
end;