if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_billfree]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_billfree]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_billnum]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_billnum]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_billrole]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_billrole]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_def_dir]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_def_dir]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_def_doc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_def_doc]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_errrpt]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_errrpt]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_errrpt_fj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_errrpt_fj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_field]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_field]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_form_act]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_form_act]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_form_colwidth]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_form_colwidth]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_form_dir]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_form_dir]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_form_field]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_form_field]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_joinmis]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_joinmis]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_jzr]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_jzr]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_mis]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_mis]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_table]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_table]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_ui]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_ui]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys_uifj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sys_uifj]
 
CREATE TABLE [sys_billfree] (
	[billfreeid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[billcode] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[billfree] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sys_billfree] PRIMARY KEY  CLUSTERED 
	(
		[billfreeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_billnum] (
	[billnumid] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[billcode] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[billvalue] [int] NULL ,
	[nyear] [int] NULL ,
	[billroleid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sys_billnum] PRIMARY KEY  CLUSTERED 
	(
		[billnumid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_billrole] (
	[billroleid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[bi_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_name] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_example] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_levels] [smallint] NULL ,
	[bi_no1_type] [smallint] NULL ,
	[bi_no1_len] [smallint] NULL ,
	[bi_no1_sep] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_no2_type] [smallint] NULL ,
	[bi_no2_len] [smallint] NULL ,
	[bi_no2_sep] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_no3_type] [smallint] NULL ,
	[bi_no3_len] [smallint] NULL ,
	[bi_no3_sep] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_no4_type] [smallint] NULL ,
	[bi_no4_len] [smallint] NULL ,
	[bi_no4_sep] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[bi_no5_type] [smallint] NULL ,
	[bi_no5_len] [smallint] NULL ,
	[bi_no5_sep] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[fc] [smallint] NULL ,
	[dr] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sys_billrole] PRIMARY KEY  CLUSTERED 
	(
		[billroleid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_def_dir] (
	[defdirid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[dir_code] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_name] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_type] [smallint] NULL ,
	[dir_jsname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	CONSTRAINT [PK_sys_def_dir] PRIMARY KEY  CLUSTERED 
	(
		[defdirid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_def_doc] (
	[docid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[defdirid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[doc_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[doc_name] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[doc_end] [smallint] NULL ,
	[doc_level] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	CONSTRAINT [PK_sys_def_doc] PRIMARY KEY  CLUSTERED 
	(
		[docid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_errrpt] (
	[errrptid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[username] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[err_type] [smallint] NULL ,
	[err_head] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[err_text] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[err_date] [datetime] NULL ,
	[mis] [smallint] NULL ,
	[misname] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[funcid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[funcname] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[work_userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[work_username] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[work_date] [datetime] NULL ,
	[work_text] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[work_flag] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sys_errrpt] PRIMARY KEY  CLUSTERED 
	(
		[errrptid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sys_errrpt_fj] (
	[mainid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[fj_type] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_rowpk] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_name] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_path] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_size] [int] NULL ,
	[fj_flag] [smallint] NULL ,
	[nrow] [smallint] NULL ,
	[locked] [smallint] NULL ,
	[pwd] [char] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[fj_sourceid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_sourcetype] [smallint] NULL ,
	CONSTRAINT [PK_errrpt_fj] PRIMARY KEY  CLUSTERED 
	(
		[fjid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_field] (
	[fieldid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tableid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_name] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_note] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_type] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[defdirid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_len] [smallint] NULL ,
	[fd_dec] [smallint] NULL ,
	[fd_bz] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_system] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[fd_crefs] [smallint] NULL ,
	CONSTRAINT [PK_sys_field] PRIMARY KEY  CLUSTERED 
	(
		[fieldid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_form_act] (
	[actid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[formid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_name] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[act_onblur] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[act_onchange] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[act_onclick] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[act_ondblclick] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sys_form_act] PRIMARY KEY  CLUSTERED 
	(
		[actid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sys_form_colwidth] (
	[colid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[formid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[cols] [smallint] NULL ,
	[ntype] [smallint] NULL ,
	[nwidth] [smallint] NULL ,
	CONSTRAINT [PK_sys_form_colwidth] PRIMARY KEY  CLUSTERED 
	(
		[colid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_form_dir] (
	[formid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tableid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[childid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ta_table] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_code] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_name] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_cols] [smallint] NULL ,
	[displine] [smallint] NULL ,
	[rowheight] [smallint] NULL ,
	[cellpadding] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[rpt_fmt] [image] NULL ,
	[dir_type] [smallint] NULL ,
        [rpt_text] [text] COLLATE Chinese_PRC_CI_AS NULL, 
	[dir_startrow] [smallint] NULL ,
	[dir_endrow] [smallint] NULL ,
	[dir_lb] [smallint] NULL ,
	[dir_share] [smallint] NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dir_system] [smallint] NULL ,
	CONSTRAINT [PK_sys_form_dir] PRIMARY KEY  CLUSTERED 
	(
		[formid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sys_form_field] (
	[fieldid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[formid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tab_fieldid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_name] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_null] [smallint] NULL ,
	[fd_row] [smallint] NULL ,
	[fd_col] [smallint] NULL ,
	[fd_colspan] [smallint] NULL ,
	[fd_size] [smallint] NULL ,
	[fd_inputbz] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[fd_coldisp] [smallint] NULL ,
	[fd_dec] [smallint] NULL ,
	[fd_align] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_width] [smallint] NULL ,
	[fd_height] [smallint] NULL ,
	[fd_ctrtype] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_color] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_bgcolor] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_fontname] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_fontsize] [smallint] NULL ,
	[fd_default] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd_ref] [smallint] NULL ,
	[fd_own] [smallint] NULL ,
	CONSTRAINT [PK_sys_form_field] PRIMARY KEY  CLUSTERED 
	(
		[fieldid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_joinmis] (
	[joinmisid] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[mis_id] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[join_userid] [char] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[join_passwd] [varchar] (256) COLLATE Chinese_PRC_CI_AS NULL ,
	[join_pro1] [varchar] (256) COLLATE Chinese_PRC_CI_AS NULL ,
	[join_pro2] [varchar] (256) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sys_joinmis] PRIMARY KEY  CLUSTERED 
	(
		[joinmisid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_jzr] (
	[jzrid] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[mis] [smallint] NOT NULL ,
	[jzr_year] [smallint] NULL ,
	[jzr_month] [smallint] NULL ,
	[jzr_start] [datetime] NULL ,
	[jzr_end] [datetime] NULL ,
	[jzr_flag] [smallint] NULL ,
	CONSTRAINT [PK_sys_jzr] PRIMARY KEY  CLUSTERED 
	(
		[jzrid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_mis] (
	[mis] [smallint] NOT NULL ,
	[mis_name] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[fc] [smallint] NULL ,
	CONSTRAINT [PK_sys_mis] PRIMARY KEY  CLUSTERED 
	(
		[mis]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_table] (
	[tableid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ta_name] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ta_code] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ta_table] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ta_bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ismain] [smallint] NULL ,
	[main_tableid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ta_system] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[dr] [smallint] NULL ,
	[ta_lb] [smallint] NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sys_table] PRIMARY KEY  CLUSTERED 
	(
		[tableid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sys_ui] (
	[pk_ui] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ui_type] [smallint] NULL ,
	[ui_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_name] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_xml] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_jsppath] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_own] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_width] [smallint] NULL ,
	[ui_bg] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_style] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[ui_default] [smallint] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ui_system] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[ui_autosize] [smallint] NULL ,
	CONSTRAINT [PK_SYS_UI] PRIMARY KEY  CLUSTERED 
	(
		[pk_ui]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sys_uifj] (
	[mainid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[fj_type] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_rowpk] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_name] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_path] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_size] [int] NULL ,
	[fj_flag] [smallint] NULL ,
	[nrow] [smallint] NULL ,
	[locked] [smallint] NULL ,
	[pwd] [char] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[fj_sourceid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[fj_sourcetype] [smallint] NULL ,
	CONSTRAINT [PK_uifj] PRIMARY KEY  CLUSTERED 
	(
		[fjid]
	)  ON [PRIMARY] 
) ON [PRIMARY]





INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('1','2010','100101',3,2010,'TEMP92480000000051');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('2','2010','100101',1,2010,'TEMP21340000000059');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('3','2010','100101',2,2010,'TEMP620000000053');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('4','2010','100101',2,2010,'6');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('5','BM2010','100101',6,2010,'16');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('6','2010','100101',2,2010,'15');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('7','2010','100101',2,2010,'TEMP96060000000043');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('8a9881102cbf3102012cbfaa62110010','2010','100101',2,2010,'TEMP3010000000040');
INSERT INTO sys_billnum (billnumid,billcode,deptid,billvalue,nyear,billroleid) VALUES ('ff8080812cc125ee012cc129420f0002','2010','100101',2,2010,'TEMP69020000000052');

INSERT INTO sys_billrole (billroleid,bi_code,bi_name,bi_example,bi_levels,bi_no1_type,bi_no1_len,bi_no1_sep,bi_no2_type,bi_no2_len,bi_no2_sep,bi_no3_type,bi_no3_len,bi_no3_sep,bi_no4_type,bi_no4_len,bi_no4_sep,bi_no5_type,bi_no5_len,bi_no5_sep,fc,dr,ts) VALUES ('SYS000000000060','02','合同编号','[单位代码]-[部门代码]-[流水号]',3,2,4,'-',3,4,'-',90,4,'',1,1,'',1,1,'',0,0,'2010-10-21 11:36:10');
INSERT INTO sys_billrole (billroleid,bi_code,bi_name,bi_example,bi_levels,bi_no1_type,bi_no1_len,bi_no1_sep,bi_no2_type,bi_no2_len,bi_no2_sep,bi_no3_type,bi_no3_len,bi_no3_sep,bi_no4_type,bi_no4_len,bi_no4_sep,bi_no5_type,bi_no5_len,bi_no5_sep,fc,dr,ts) VALUES ('SYS000000000456','03','收文编号规则','[单据代码][年（4位）][流水号]',3,1,4,'',4,4,'',90,4,'',90,4,'',1,1,'',0,0,'2010-10-21 11:52:53');
INSERT INTO sys_billrole (billroleid,bi_code,bi_name,bi_example,bi_levels,bi_no1_type,bi_no1_len,bi_no1_sep,bi_no2_type,bi_no2_len,bi_no2_sep,bi_no3_type,bi_no3_len,bi_no3_sep,bi_no4_type,bi_no4_len,bi_no4_sep,bi_no5_type,bi_no5_len,bi_no5_sep,fc,dr,ts) VALUES ('SYS99420000003005','01','审批单编号','[单据代码][部门代码][年月（4位）][流水号]',4,1,4,'',3,2,'',6,4,'',90,3,'',1,1,'',0,0,'2010-11-14 13:53:34');

INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS001','BAS001','单位档案',9,'refCorp','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS002','BAS002','部门档案',9,'refDept','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS003','BAS003','操作用户档案',9,'refUser','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS004','BAS004','收文类别档案',9,'refSwlb','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS005','BAS005','文件类别档案',9,'refWjtype','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS006','BAS006','文件缓急档案',9,'refWjhj','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS007','BAS007','文件密级档案',9,'refWjmj','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS008','BAS008','合同类型',9,'refHttype','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS009','BAS009','业务类型档案',9,'refBusimode','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS010','BAS010','支付方式档案',9,'refPaymode','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS011','BAS011','地区分类档案',9,'refArea','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS012','BAS012','客商档案',9,'refCustdoc','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS013','BAS013','经济类型档案',9,'refEconomy','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS014','BAS014','行业分类',9,'refTrade','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS015','BAS015','工作报告分类',9,'refRpttype','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS016','BAS016','会议类别',9,'refHylb','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS017','BAS017','费用类别',9,'refFytype','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('BAS018','BAS018','会议室',9,'refHyhouse','2009-01-01',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('SYS000000000001','BASE20','合同起草',1,NULL,'2010-10-12 11:11:17',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('SYS40690000002731','BASE05','民族',1,'','2010-10-12 10:53:40',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('SYS80650000001709','BASE03','性别',1,'','2010-10-12 10:53:07',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('SYS8460000002089','BASE01','时',1,'','2010-10-07 22:52:46',0,0);
INSERT INTO sys_def_dir (defdirid,dir_code,dir_name,dir_type,dir_jsname,ts,dr,fc) VALUES ('SYS93070000002090','BASE02','分',1,'','2010-10-07 22:53:03',0,0);
 
INSERT INTO sys_mis (mis,mis_name,fc) VALUES (80,'设备管理',0);
 
INSERT INTO sys_uifj (mainid,fjid,fj_type,fj_rowpk,fj_name,fj_path,fj_size,fj_flag,nrow,locked,pwd,ts,fj_sourceid,fj_sourcetype) VALUES ('admin','HTFJ8660000014790   ','GIF       ','admin               ','分隔条','/wj/2011_07/uigif/PATH78940000031172.gif',2802,1,1,NULL,'DF5CA10190087BF63861FA987A627328                  ','2011-07-15 10:31:14','                    ',0);
 
