--单位、用户的栏目
update UR_SYS_BASE_COL_SET set IS_EXT_FLD='1'
where 
(INF_TYPE='D' and FLD_CODE in ('DW_TYPE','ORG_CODE','DW_MAN','FIN_MAN','PHONE_NO','FAX_NO','DW_ADDR','POST_CODE'))
or 
(INF_TYPE='U' and FLD_CODE in ('DEPT_NAME','ADDR','FIX_PHONE','MOB_NO','EMAIL'));


--单位属性：主管单位本级
Insert into ur_sys_base_col_set
   (fld_id, inf_type, seq_no, fld_code, idx_code, fld_name, is_ext_fld, data_type, data_len, dict_id
   , is_not_null, is_valid, is_man_filter)
 Values
   ('D_IS_SELF', 'D', 13, 'IS_SELF', 'IS_SELF', 
    '主管单位本级', '1', 'E', 1, 'SYS_01', 
    '0', '0', '1');

alter table ur_sys_dw add IS_SELF varchar2(1) default '0';

--系统选项
Insert into ur_sys_opt
   (opt_code, user_id, opt_name, opt_value)
 Values
   ('ARPT_AUTO_QUERY', '*', '自动查询分析报表首页', '0');
