--初次上报单位
alter table UR_TASK_DW add RPT_DW_ID varchar2(36);

--导入卡片
Insert into ur_sys_res
(mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
select mod_id, 'BTN_IMP_PROJ' as res_id, 'B' as res_type, 35 as seq_no, '导入卡片' as org_name
, '' as disp_name,'' as mark, 'chi' as lang_type
from ur_sys_menu m where mod_code='SYS_DATA_INPUT' and not exists 
(select * from ur_sys_res r where r.mod_id=m.mod_id and r.res_id='BTN_IMP_PROJ');


--批量计算菜单
Insert into ur_sys_menu
   (mod_id, l_code, is_end, mod_code, mod_name, mod_type, form_name, pack_name, param, user_id, mod_tag)
 Values
   ('SYS_BAT_CALC', '00100011', '1', 'SYS_BAT_CALC', '批量计算', 
    'MOD', 'TFrmBatchCalc', '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_BAT_CALC', '00040011', '1', '批量计算', 'MOD', 
    'SYS_BAT_CALC', 11);


Insert into ur_sys_res
   (lang_type, mod_id, res_id, res_type, seq_no, org_name, disp_name, mark)
 Values
   ('chi', 'SYS_BAT_CALC', 'FUNC_SAVE', '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_BAT_CALC', 'FUNC_SEARCH', 'F', 1, 
    '查询', '查询', '查询');
Insert into ur_sys_res
   (lang_type, mod_id, res_id, res_type, seq_no, org_name, disp_name, mark)
 Values
   ('chi', 'SYS_BAT_CALC', 'MOD', 'R', 1, 
    '批量计算', '批量计算', '批量计算');


--批量插入
Insert into ur_sys_res
(mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
select mod_id, 'BTN_INSERT_BAT' as res_id, 'B' as res_type, 265 as seq_no, '批量插入' as org_name
, '' as disp_name,'' as mark, 'chi' as lang_type
from ur_sys_menu m where mod_code='SYS_DATA_INPUT' and not exists 
(select * from ur_sys_res r where r.mod_id=m.mod_id and r.res_id='BTN_INSERT_BAT');
