create table UR_SYS_ONLINE_UPLOAD
(
  ID            VARCHAR2(50) not null,
  YEAR          VARCHAR2(4),
  MONTH         VARCHAR2(2),
  DW_CODE       VARCHAR2(100),
  TYPE          VARCHAR2(2),
  USER_ID       VARCHAR2(50),
  BEGINDATE     VARCHAR2(20),
  ENDDATE       VARCHAR2(20),
  IMP_BEGINDATE VARCHAR2(20),
  IMP_ENDDATE   VARCHAR2(20),
  FILE_NAME     VARCHAR2(200),
  FILESIZE      NUMBER,
  TRANFILESIZE  NUMBER,
  STATUS        VARCHAR2(1),
  MEMO          VARCHAR2(200),
  add constraint URSYSONLINEUPLOADPID primary key (ID);
);

-- Create table
create table UR_SYS_ONLINE_UP
(
  ID          VARCHAR2(50) not null,
  USER_ID     VARCHAR2(50) not null,
  DATE_CREATE VARCHAR2(36),
  UPLOAD_FLAG VARCHAR2(1),
  constraint PK_UR_SYS_ONLINE_UP primary key (ID, USER_ID)
);

create or replace view v_download_pack as
select (to_char(valid_date,'YYYY-MM-DD ')||r.doc_title||r.object_name) as rw_name, r.object_name as rw_code, '' as p_code
from UR_DOC r where r.object_name like 'gdms%' or r.object_name like 'task%' order by valid_date desc;

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_OnLine_Up', '00100115', '1', 'SYS_BASE', '在线系统升级', 'MOD', 'Tfrm_SysOnLineUp', '', '', 3, '*');

insert into ur_sys_res (LANG_TYPE, MOD_ID, RES_ID, RES_TYPE, SEQ_NO, ORG_NAME, DISP_NAME, MARK)
values ('chi', 'Sys_OnLine_Up', '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_OnLine_Up', 'FUNC_SEARCH', 'F', 1, '查询', '查询', '查询');

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_AUTO_IMPDATA', '00100111', '1', 'SYS_AUTO_IMPDATA', '启动停止接收服务', 'MOD', 'TfrmAutoImpData', 'RptProcess.exe', '', 3, '*');

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_SET_TRANS_PARAM', '00100117', '1', 'SYS_SET_TRANS_PARAM', '网络数据传输设置', 'MOD', 'TMag4DataTrans', 'RptProcess.exe', '', 3, '*');

insert into ur_sys_res (LANG_TYPE, MOD_ID, RES_ID, RES_TYPE, SEQ_NO, ORG_NAME, DISP_NAME, MARK)
values ('chi', 'SYS_SET_TRANS_PARAM', 'FUNC_SEARCH', 'F', 30, '查询', '查询', '查询');

insert into ur_sys_res (LANG_TYPE, MOD_ID, RES_ID, RES_TYPE, SEQ_NO, ORG_NAME, DISP_NAME, MARK)
values ('chi', 'SYS_AUTO_IMPDATA', 'SYS_AUTO_IMPDATA', 'F', 1, '启动停止接收服务', '启动停止接收服务', '启动停止接收服务');

update ur_sys_opt set opt_value = 'gdms1.20.00' where opt_code = 'VERSION';