--数据锁定(地债)
create table UR_DW_CTRL  (
   DW_ID                VARCHAR2(36)                     not null,
   RPT_STATUS           VARCHAR2(1),
   RPT_DATE             VARCHAR2(20),
   RPT_USER_ID          VARCHAR2(36),
   LOCK_STATUS          VARCHAR2(1),
   LOCK_DATE            VARCHAR2(10),
   constraint PK_UR_DW_CTRL primary key (DW_ID)
);

create table UR_DW_CTRL_LOG  (
   LOG_ID               VARCHAR2(36)                     not null,
   DW_ID                VARCHAR2(36),
   RPT_DATE             VARCHAR2(20),
   RPT_USER_ID          VARCHAR2(36),
   IS_REG               VARCHAR2(1),
   REG_DATE             VARCHAR2(20),
   REG_USER_ID          VARCHAR2(36),
   constraint PK_UR_DW_CTRL_LOG primary key (LOG_ID)
);

create index IDX_UR_DW_CTRL_LOG on UR_DW_CTRL_LOG (
   DW_ID ASC,
   RPT_DATE ASC
);


--菜单
Insert into ur_sys_menu
   (mod_id, l_code, is_end, mod_code, mod_name, 
     mod_type, form_name, pack_name, param, mod_tag, user_id)
 Values
   ('SYS_DW_LOCK', '00100112', '1', 'SYS_DW_LOCK', '数据锁定', 
    'MOD', 'TFrmDwLock', 'RptProcess.exe', NULL, 3, 
    '*');

Insert into ur_sys_menu_reform
   (menu_id, l_code, is_end, disp_name, mod_type, mod_id, seq_no)
 Values
   ('SYS_DW_LOCK', '00090112', '1', '数据锁定', 'MOD', 
    'SYS_DW_LOCK', 10);

Insert into ur_sys_res
   (lang_type, mod_id, res_id, res_type, seq_no, org_name, disp_name, mark)
 Values
   ('chi', 'SYS_DW_LOCK', 'FUNC_EXP', 'F', 2, 
    '锁定处理', '锁定处理', '锁定处理');
Insert into ur_sys_res
   (lang_type, mod_id, res_id, res_type, seq_no, org_name, disp_name, mark)
 Values
   ('chi', 'SYS_DW_LOCK', 'MOD', 'R', 1, 
    '数据锁定', '数据锁定', '数据锁定');
Insert into ur_sys_res
   (lang_type, mod_id, res_id, res_type, seq_no, org_name, disp_name, mark)
 Values
   ('chi', 'SYS_DW_LOCK', 'FUNC_SEARCH', 'F', 1, 
    '查询', '查询', '查询');
