CREATE TABLE `flow_base_button` (
  `ID` varchar(8) NOT NULL,
  `NAME` varchar(50) default NULL,
  `TYPE` varchar(1) default NULL,
  `PROPERTY` varchar(300) default NULL,
  `ICO` varchar(300) default NULL,
  `POSITION` varchar(1) default NULL,
  `BNAME` varchar(50) default NULL,
  `CODE` varchar(4) default NULL,
  `ROLEIDS` varchar(1000) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_activity` (
  `ID` varchar(10) NOT NULL,
  `FID` varchar(10) default NULL,
  `IDENTIFICATION` varchar(12) default NULL,
  `NAME` varchar(100) default NULL,
  `DESC1` varchar(300) default NULL,
  `TYPE` varchar(1) default NULL,
  `ORDER1` decimal(10,0) default NULL,
  `ISSIGN` varchar(1) default NULL,
  `ASTRATEGY` varchar(1) default NULL,
  `CSTRATEGY` varchar(1) default NULL,
  `CNUM` decimal(10,0) default NULL,
  `OPENHELP` varchar(1) default NULL,
  `XYCSS` varchar(500) default NULL,
  `ATTTYPE` varchar(1) default NULL,
  `ATTNUM` smallint(6) default NULL,
  `ISNOTE` varchar(1) default NULL,
  `FORMPATH` varchar(500) default NULL,
  `ISMESSAGE` varchar(1) default NULL,
  `MESSAGE` varchar(1000) default NULL,
  `ISSAVE1` varchar(1) default NULL,
  `ISSAVE2` varchar(1) default NULL,
  `ISLEAVE1` varchar(1) default NULL,
  `ISLEAVE2` varchar(1) default NULL,
  `ADDFORMPATH` varchar(500) default NULL,
  `ADDFORMWIDTH` varchar(10) default NULL,
  `ADDFORMHEIGHT` varchar(10) default NULL,
  `ADDFORMMESSAGE` varchar(500) default NULL,
  `ISBRANCH` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_activity_button` (
  `ID` varchar(12) NOT NULL,
  `FID` varchar(10) default NULL,
  `BUTTONID` varchar(8) default NULL,
  `BWHERE` varchar(1000) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_activity_conne` (
  `ID` varchar(10) NOT NULL,
  `FID` varchar(10) default NULL,
  `CID` varchar(10) default NULL,
  `SID` varchar(10) default NULL,
  `EID` varchar(10) default NULL,
  `NAME` varchar(100) default NULL,
  `DESC1` varchar(300) default NULL,
  `WHERE1` varchar(1000) default NULL,
  `TYPE` varchar(2) default NULL,
  `ISNEED` varchar(1) default NULL,
  `ISATT` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `flow_config_activity_group` (
  `ID` varchar(10) NOT NULL,
  `ACTIVITYID` varchar(10) default NULL,
  `GROUPID` varchar(8) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_conn_author` (
  `ID` varchar(8) NOT NULL,
  `CONNTYPE` varchar(1) default NULL,
  `CONNID` varchar(10) default NULL,
  `AAID` varchar(10) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_entrust` (
  `ID` varchar(8) NOT NULL,
  `SUSERNO` varchar(16) default NULL,
  `IUSERNO` varchar(16) default NULL,
  `SDATE` datetime default NULL,
  `EDATE` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_package` (
  `ID` varchar(3) NOT NULL,
  `IDENTIFICATION` varchar(11) default NULL,
  `NAME` varchar(100) default NULL,
  `DESC1` varchar(300) default NULL,
  `STATUS` varchar(1) default NULL,
  `ICO` varchar(3) default NULL,
  `CREATEPSN` varchar(16) default NULL,
  `CREATEDATE` date default NULL,
  `FID` varchar(3) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `flow_config_process` (
  `ID` varchar(10) NOT NULL,
  `IDENTIFICATION` varchar(10) default NULL,
  `NAME` varchar(100) default NULL,
  `DESC1` varchar(300) default NULL,
  `FLOWPACKAGE` varchar(3) default NULL,
  `DOCID` varchar(8) default NULL,
  `STATUS` varchar(1) default NULL,
  `CREATEPSN` varchar(16) default NULL,
  `CREATEDATE` date default NULL,
  `CODE` varchar(4) default NULL,
  `ICO` varchar(2) default NULL,
  `TYPE` varchar(1) default NULL,
  `CNUM` smallint(6) default NULL,
  `FORMTYPE` varchar(1) default NULL,
  `ISDELETEFORM` varchar(1) default NULL,
  `DCODE` varchar(64) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `flow_config_process_connection` (
  `ID` varchar(10) NOT NULL,
  `FID` varchar(10) default NULL,
  `CID` varchar(10) default NULL,
  `EID` varchar(10) default NULL,
  `NAME` varchar(100) default NULL,
  `FDESC` varchar(300) default NULL,
  `FWHERE` varchar(1000) default NULL,
  `TYPE` varchar(2) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_config_prosess_group` (
  `ID` varchar(10) NOT NULL,
  `PROSESSID` varchar(10) default NULL,
  `GROUPID` varchar(8) default NULL,
  `TYPE` varchar(1) default NULL,
  `ISDEPT` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `flow_config_time` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(10) default NULL,
  `DAY` decimal(10,0) default NULL,
  `NAME` varchar(50) default NULL,
  `ABNORMITYID` varchar(2) default NULL,
  `FREQUENCY` decimal(10,0) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_manage_note` (
  `ID` varchar(20) NOT NULL,
  `FLOWRUNID` varchar(20) default NULL,
  `CONNID` varchar(100) default NULL,
  `FLOWNAME` varchar(500) default NULL,
  `USERID` varchar(16) default NULL,
  `OPERATETIME` datetime default NULL,
  `OPERATEIP` varchar(50) default NULL,
  `OPERATETYPE` varchar(50) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_runtime_activity` (
  `ID` varchar(20) NOT NULL,
  `FID` varchar(20) default NULL,
  `SACTIVITY` varchar(10) default NULL,
  `EACTIVITY` varchar(10) default NULL,
  `NAME` varchar(300) default NULL,
  `DOPSN` varchar(16) default NULL,
  `DODATE` datetime default NULL,
  `DOIDEA` varchar(1000) default NULL,
  `DOFLAG` varchar(1) default NULL,
  `SENDPSN` varchar(16) default NULL,
  `SENDDATE` datetime default NULL,
  `FORMPATH` varchar(500) default NULL,
  `DOIP` varchar(30) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `flow_runtime_entrustlog` (
  `ID` varchar(8) NOT NULL,
  `SUSERNO` varchar(16) default NULL,
  `IUSERNO` varchar(16) default NULL,
  `SDATE` datetime default NULL,
  `EDATE` datetime default NULL,
  `TYPE` varchar(1) default NULL,
  `FLOWNAME` varchar(150) default NULL,
  `FLOWID` varchar(20) default NULL,
  `FLOWNODE` varchar(50) default NULL,
  `LOGDATE` datetime default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `flow_runtime_process` (
  `ID` varchar(20) NOT NULL,
  `FLOWID` varchar(10) default NULL,
  `FLOWPATH` varchar(1000) default NULL,
  `NAME` varchar(1000) default NULL,
  `CREATEPSN` varchar(16) default NULL,
  `CREATEDATE` datetime default NULL,
  `ACCEPTPSN` varchar(3000) default NULL,
  `ACCEPTDATE` datetime default NULL,
  `CURRACTIVITY` varchar(10) default NULL,
  `READCOUNT` double default NULL,
  `STATE` varchar(1) default NULL,
  `FORMTABLE` varchar(50) default NULL,
  `FORMID` varchar(50) default NULL,
  `OTHERID` varchar(500) default NULL,
  `ACCEPTPSNNUM` bigint(20) default NULL,
  `FACCEPTPSN` varchar(3000) default NULL,
  `FDATE` datetime default NULL,
  `ISABNORMITY` varchar(1) default NULL,
  `ABNORMITYDATE` datetime default NULL,
  `PARENTID` varchar(100) default NULL,
  `PARENTID1` varchar(100) default NULL,
  `RID` varchar(50) default NULL,
  `RECORDID` varchar(30) default NULL,
  `FUID` varchar(2500) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;




insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000011', '删除', '1', 'doDelete();', 'buttonDelete.gif', '2', '删除', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000012', '初始化流程', '1', 'doInit();', 'buttonReturn.gif', '2', '初始化流程', null, null);

insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000014', '下一步', '1', 'doNext();', 'PuBtnNext.gif', '2', '下一步', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000010', '移交', '1', 'devolve();', 'IcoAdd.gif', '2', '移交', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000001', '处理返回', '1', 'doReturn();', 'buttonReturn.gif', '2', '处理返回', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000004', '办结', '1', 'doFinish();', 'IcoEdit.gif', '2', '办结', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000002', '退回', '1', 'doUntread();', 'buttonReturn.gif', '2', '退回', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000003', '完成', '1', 'doFinish();', 'IcoEdit.gif', '2', '完成', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000005', '打印', '5', 'Openprint(''../../ZrCollEngine/Print/DoPrint.jsp'')', 'IcoPrint.gif', '2', '打印', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000007', '保存', '1', 'saveColl(''1'');', 'buttonSave.gif', '2', '保存', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000008', '提交', '1', 'saveColl(''2'');', 'IcoAdd.gif', '2', '提交', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000009', '关闭', '4', 'doClose();', 'buttonClose.gif', '3', '关闭', '02', null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000035', '送部门承办', '1', 'dodept();', 'IcoAdd.gif', '2', '送部门承办', null, '321,304');
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000040', '分送', '1', 'dosend(''0000000006'','''',''2'','''',''0'');//说明：第一个参数为指定显示传阅的活动id,第二个参数为待选择传阅人的角色编号，多个编号间用,号隔开,第三个参数为单位编号左包含的编码位数,第四个参数为是否是本部门的人,1表示本部门的人员，参数为空时表示选择所有的人员,第五个参数为是否发送短信。', 'office4.gif', '2', '分送(不受流程流转影响)', null, null);
insert into FLOW_BASE_BUTTON (ID, NAME, TYPE, PROPERTY, ICO, POSITION, BNAME, CODE, ROLEIDS)
values ('00000041', '已阅', '1', 'dosendFinish();', 'office5.gif', '2', '分送(已阅)', null, null);




