--是否加总计列
alter table UR_ARPT_DS add IS_SUM_COL varchar(1) default '0';
alter table UR_ARPT_DS add SUM_COL_POSI varchar(1) default 'L';

--任务权限
update ur_sys_res set org_name='修改任务',disp_name='修改任务',mark='修改任务'
  where mod_id='SYS_RPT_DESIGN' and res_id='FUNC_SAVE';

Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_ADD', 'F', 3, '新增任务', 
    '新增任务', '新增任务', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_IMP', 'F', 9, '加载', 
    '加载', '加载', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_EXP', 'F', 8, '发布', 
    '发布', '发布', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_ADD_F', 'F', 7, '新增公式', 
    '新增公式', '新增公式', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_SAVE_F', 'F', 6, '修改公式', 
    '修改公式', '修改公式', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_ADD_RPT', 'F', 5, '新增报表', 
    '新增报表', '新增报表', 'chi');
Insert into ur_sys_res
   (mod_id, res_id, res_type, seq_no, org_name, disp_name, mark, lang_type)
 Values
   ('SYS_RPT_DESIGN', 'FUNC_SAVE_RPT', 'F', 4, '修改报表', 
    '修改报表', '修改报表', 'chi');

--预制角色的权限
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_CHECK', 'FUNC_SAVE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_CHECK', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_PRINT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_REPORT', 'FUNC_AUDIT');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_REPORT', 'FUNC_REPORT');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_REPORT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_BAT_REPORT_STATUS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_DATA_INPUT', 'FUNC_SAVE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('AUDIT_ALL', 'SYS_DATA_INPUT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_ANA_MAP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_CHECK', 'FUNC_SAVE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_CHECK', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_PRINT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_PROCESS', 'FUNC_COPY');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_PROCESS', 'FUNC_DEL');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_PROCESS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_PROCESS', 'FUNC_UPDATE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_REPORT', 'FUNC_AUDIT');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_REPORT', 'FUNC_REPORT');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_REPORT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_BAT_REPORT_STATUS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_EXP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_IMP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_IMP_COMP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_INPUT', 'FUNC_FORMULA');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_INPUT', 'FUNC_KZS');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_INPUT', 'FUNC_SAVE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_DATA_INPUT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('DW_SYS_ADMIN', 'SYS_MAP_GPS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('IANA_ALL', 'SYS_ANA_MAP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('IANA_ALL', 'SYS_MAP_GPS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_BAT_PRINT', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_BAT_PROCESS', 'FUNC_COPY');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_BAT_PROCESS', 'FUNC_DEL');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_BAT_PROCESS', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_BAT_PROCESS', 'FUNC_UPDATE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_DATA_EXP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_DATA_IMP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_DATA_IMP_COMP', 'FUNC_SEARCH');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_DATA_INPUT', 'FUNC_SAVE');
Insert into ur_sys_role_func
   (role_id, mod_id, res_id)
 Values
   ('INPUT_ALL', 'SYS_DATA_INPUT', 'FUNC_SEARCH');
