oracle_ry_workflow.sql 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. -- ----------------------------
  2. -- 0、warm-flow-all.sql,地址:https://gitee.com/dromara/warm-flow/blob/master/sql/oracle/oracle-wram-flow-all.sql
  3. -- ----------------------------
  4. create table FLOW_DEFINITION
  5. (
  6. ID NUMBER(20) not null,
  7. FLOW_CODE VARCHAR2(40) not null,
  8. FLOW_NAME VARCHAR2(100) not null,
  9. CATEGORY VARCHAR2(100),
  10. VERSION VARCHAR2(20) not null,
  11. IS_PUBLISH NUMBER(1) default 0 not null,
  12. FORM_CUSTOM VARCHAR2(1) default 'N',
  13. FORM_PATH VARCHAR2(100),
  14. ACTIVITY_STATUS NUMBER(1) default 1,
  15. LISTENER_TYPE VARCHAR2(100),
  16. LISTENER_PATH VARCHAR2(500),
  17. EXT VARCHAR2(500),
  18. CREATE_TIME DATE,
  19. UPDATE_TIME DATE,
  20. DEL_FLAG VARCHAR2(1) default '0',
  21. TENANT_ID VARCHAR2(40)
  22. );
  23. alter table FLOW_DEFINITION
  24. add constraint PK_FLOW_DEFINITION primary key (ID);
  25. comment on table FLOW_DEFINITION is '流程定义表';
  26. comment on column FLOW_DEFINITION.ID is '主键id';
  27. comment on column FLOW_DEFINITION.FLOW_CODE is '流程编码';
  28. comment on column FLOW_DEFINITION.FLOW_NAME is '流程名称';
  29. comment on column FLOW_DEFINITION.CATEGORY is '流程类别';
  30. comment on column FLOW_DEFINITION.VERSION is '流程版本';
  31. comment on column FLOW_DEFINITION.IS_PUBLISH is '是否发布 (0未发布 1已发布 9失效)';
  32. comment on column FLOW_DEFINITION.FORM_CUSTOM is '审批表单是否自定义 (Y是 N否)';
  33. comment on column FLOW_DEFINITION.FORM_PATH is '审批表单路径';
  34. comment on column FLOW_DEFINITION.ACTIVITY_STATUS is '流程激活状态(0挂起 1激活)';
  35. comment on column FLOW_DEFINITION.LISTENER_TYPE is '监听器类型';
  36. comment on column FLOW_DEFINITION.LISTENER_PATH is '监听器路径';
  37. comment on column FLOW_DEFINITION.EXT is '扩展字段,预留给业务系统使用';
  38. comment on column FLOW_DEFINITION.CREATE_TIME is '创建时间';
  39. comment on column FLOW_DEFINITION.UPDATE_TIME is '更新时间';
  40. comment on column FLOW_DEFINITION.DEL_FLAG is '删除标志';
  41. comment on column FLOW_DEFINITION.TENANT_ID is '租户id';
  42. create table FLOW_NODE
  43. (
  44. ID NUMBER(20) not null,
  45. NODE_TYPE NUMBER(1) not null,
  46. DEFINITION_ID NUMBER(20) not null,
  47. NODE_CODE VARCHAR2(100) not null,
  48. NODE_NAME VARCHAR2(100),
  49. NODE_RATIO NUMBER(6, 3),
  50. COORDINATE VARCHAR2(100),
  51. ANY_NODE_SKIP VARCHAR2(100),
  52. LISTENER_TYPE VARCHAR2(100),
  53. LISTENER_PATH VARCHAR2(500),
  54. HANDLER_TYPE VARCHAR2(100),
  55. HANDLER_PATH VARCHAR2(400),
  56. FORM_CUSTOM VARCHAR2(1) default 'N',
  57. FORM_PATH VARCHAR2(100),
  58. VERSION VARCHAR2(20),
  59. CREATE_TIME DATE,
  60. UPDATE_TIME DATE,
  61. EXT CLOB,
  62. DEL_FLAG VARCHAR2(1) default '0',
  63. TENANT_ID VARCHAR2(40),
  64. PERMISSION_FLAG VARCHAR2(200)
  65. );
  66. alter table FLOW_NODE
  67. add constraint PK_FLOW_NODE primary key (ID);
  68. comment on table FLOW_NODE is '流程节点表';
  69. comment on column FLOW_NODE.ID is '主键id';
  70. comment on column FLOW_NODE.NODE_TYPE is '节点类型(0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  71. comment on column FLOW_NODE.DEFINITION_ID is '对应flow_definition表的id';
  72. comment on column FLOW_NODE.NODE_CODE is '流程节点编码';
  73. comment on column FLOW_NODE.NODE_NAME is '流程节点名称';
  74. comment on column FLOW_NODE.NODE_RATIO is '流程签署比例值';
  75. comment on column FLOW_NODE.COORDINATE is '坐标';
  76. comment on column FLOW_NODE.ANY_NODE_SKIP is '任意结点跳转';
  77. comment on column FLOW_NODE.LISTENER_TYPE is '监听器类型';
  78. comment on column FLOW_NODE.LISTENER_PATH is '监听器路径';
  79. comment on column FLOW_NODE.HANDLER_TYPE is '处理器类型';
  80. comment on column FLOW_NODE.HANDLER_PATH is '处理器路径';
  81. comment on column FLOW_NODE.FORM_CUSTOM is '审批表单是否自定义 (Y是 N否)';
  82. comment on column FLOW_NODE.FORM_PATH is '审批表单路径';
  83. comment on column FLOW_NODE.VERSION is '版本';
  84. comment on column FLOW_NODE.CREATE_TIME is '创建时间';
  85. comment on column FLOW_NODE.UPDATE_TIME is '更新时间';
  86. comment on column FLOW_NODE.EXT is '节点扩展属性';
  87. comment on column FLOW_NODE.DEL_FLAG is '删除标志';
  88. comment on column FLOW_NODE.TENANT_ID is '租户id';
  89. comment on column FLOW_NODE.PERMISSION_FLAG is '权限标识(权限类型:权限标识,可以多个,用@@隔开)';
  90. create table FLOW_SKIP
  91. (
  92. ID NUMBER(20) not null,
  93. DEFINITION_ID NUMBER(20) not null,
  94. NOW_NODE_CODE VARCHAR2(100) not null,
  95. NOW_NODE_TYPE NUMBER(1),
  96. NEXT_NODE_CODE VARCHAR2(100) not null,
  97. NEXT_NODE_TYPE NUMBER(1),
  98. SKIP_NAME VARCHAR2(100),
  99. SKIP_TYPE VARCHAR2(40),
  100. SKIP_CONDITION VARCHAR2(200),
  101. COORDINATE VARCHAR2(100),
  102. CREATE_TIME DATE,
  103. UPDATE_TIME DATE,
  104. DEL_FLAG VARCHAR2(1) default '0',
  105. TENANT_ID VARCHAR2(40)
  106. );
  107. alter table FLOW_SKIP
  108. add constraint PK_FLOW_SKIP primary key (ID);
  109. comment on table FLOW_SKIP is '节点跳转关联表';
  110. comment on column FLOW_SKIP.ID is '主键id';
  111. comment on column FLOW_SKIP.DEFINITION_ID is '流程定义id';
  112. comment on column FLOW_SKIP.NOW_NODE_CODE is '当前流程节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  113. comment on column FLOW_SKIP.NOW_NODE_TYPE is '下一个流程节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  114. comment on column FLOW_SKIP.NEXT_NODE_CODE is '下一个流程节点编码';
  115. comment on column FLOW_SKIP.NEXT_NODE_TYPE is '下一个流程节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  116. comment on column FLOW_SKIP.SKIP_NAME is '跳转名称';
  117. comment on column FLOW_SKIP.SKIP_TYPE is '跳转类型 (PASS审批通过 REJECT退回)';
  118. comment on column FLOW_SKIP.SKIP_CONDITION is '跳转条件';
  119. comment on column FLOW_SKIP.COORDINATE is '坐标';
  120. comment on column FLOW_SKIP.CREATE_TIME is '创建时间';
  121. comment on column FLOW_SKIP.UPDATE_TIME is '更新时间';
  122. comment on column FLOW_SKIP.DEL_FLAG is '删除标志';
  123. comment on column FLOW_SKIP.TENANT_ID is '租户id';
  124. create table FLOW_INSTANCE
  125. (
  126. ID NUMBER not null,
  127. DEFINITION_ID NUMBER not null,
  128. BUSINESS_ID VARCHAR2(40) not null,
  129. NODE_TYPE NUMBER(1),
  130. NODE_CODE VARCHAR2(100),
  131. NODE_NAME VARCHAR2(100),
  132. VARIABLE CLOB,
  133. FLOW_STATUS VARCHAR2(20),
  134. ACTIVITY_STATUS NUMBER(1) default 1,
  135. DEF_JSON CLOB,
  136. CREATE_BY VARCHAR2(64) default '',
  137. CREATE_TIME DATE,
  138. UPDATE_TIME DATE,
  139. EXT VARCHAR2(500),
  140. DEL_FLAG VARCHAR2(1) default '0',
  141. TENANT_ID VARCHAR2(40)
  142. );
  143. alter table FLOW_INSTANCE
  144. add constraint PK_FLOW_INSTANCE primary key (ID);
  145. comment on table FLOW_INSTANCE is '流程实例表';
  146. comment on column FLOW_INSTANCE.ID is '主键id';
  147. comment on column FLOW_INSTANCE.DEFINITION_ID is '对应flow_definition表的id';
  148. comment on column FLOW_INSTANCE.BUSINESS_ID is '业务id';
  149. comment on column FLOW_INSTANCE.NODE_TYPE is '开始节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  150. comment on column FLOW_INSTANCE.NODE_CODE is '开始节点编码';
  151. comment on column FLOW_INSTANCE.NODE_NAME is '开始节点名称';
  152. comment on column FLOW_INSTANCE.VARIABLE is '任务变量';
  153. comment on column FLOW_INSTANCE.FLOW_STATUS is '流程状态(0待提交 1审批中 2审批通过 4终止 5作废 6撤销 8已完成 9已退回 10失效 11拿回)';
  154. comment on column FLOW_INSTANCE.ACTIVITY_STATUS is '流程激活状态(0挂起 1激活)';
  155. comment on column FLOW_INSTANCE.DEF_JSON is '流程定义json';
  156. comment on column FLOW_INSTANCE.CREATE_BY is '创建者';
  157. comment on column FLOW_INSTANCE.CREATE_TIME is '创建时间';
  158. comment on column FLOW_INSTANCE.UPDATE_TIME is '更新时间';
  159. comment on column FLOW_INSTANCE.EXT is '扩展字段,预留给业务系统使用';
  160. comment on column FLOW_INSTANCE.DEL_FLAG is '删除标志';
  161. comment on column FLOW_INSTANCE.TENANT_ID is '租户id';
  162. create table FLOW_TASK
  163. (
  164. ID NUMBER(20) not null,
  165. DEFINITION_ID NUMBER(20) not null,
  166. INSTANCE_ID NUMBER(20) not null,
  167. NODE_CODE VARCHAR2(100),
  168. NODE_NAME VARCHAR2(100),
  169. NODE_TYPE NUMBER(1),
  170. FLOW_STATUS VARCHAR2(20),
  171. FORM_CUSTOM VARCHAR2(1) default 'N',
  172. FORM_PATH VARCHAR2(100),
  173. CREATE_TIME DATE,
  174. UPDATE_TIME DATE,
  175. DEL_FLAG VARCHAR2(1) default '0',
  176. TENANT_ID VARCHAR2(40)
  177. );
  178. alter table FLOW_TASK
  179. add constraint PK_FLOW_TASK primary key (ID);
  180. comment on table FLOW_TASK is '待办任务表';
  181. comment on column FLOW_TASK.ID is '主键id';
  182. comment on column FLOW_TASK.DEFINITION_ID is '对应flow_definition表的id';
  183. comment on column FLOW_TASK.INSTANCE_ID is '对应flow_instance表的id';
  184. comment on column FLOW_TASK.NODE_CODE is '节点编码';
  185. comment on column FLOW_TASK.NODE_NAME is '节点名称';
  186. comment on column FLOW_TASK.NODE_TYPE is '节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  187. comment on column FLOW_TASK.FLOW_STATUS is '流程状态(0待提交 1审批中 2审批通过 4终止 5作废 6撤销 8已完成 9已退回 10失效 11拿回)';
  188. comment on column FLOW_TASK.FORM_CUSTOM is '审批表单是否自定义 (Y是 N否)';
  189. comment on column FLOW_TASK.FORM_PATH is '审批表单路径';
  190. comment on column FLOW_TASK.CREATE_TIME is '创建时间';
  191. comment on column FLOW_TASK.UPDATE_TIME is '更新时间';
  192. comment on column FLOW_TASK.DEL_FLAG is '删除标志';
  193. comment on column FLOW_TASK.TENANT_ID is '租户id';
  194. create table FLOW_HIS_TASK
  195. (
  196. ID NUMBER(20) not null,
  197. DEFINITION_ID NUMBER(20) not null,
  198. INSTANCE_ID NUMBER(20) not null,
  199. TASK_ID NUMBER(20) not null,
  200. NODE_CODE VARCHAR2(100),
  201. NODE_NAME VARCHAR2(100),
  202. NODE_TYPE NUMBER(1),
  203. TARGET_NODE_CODE VARCHAR2(200),
  204. TARGET_NODE_NAME VARCHAR2(200),
  205. APPROVER VARCHAR2(40),
  206. COOPERATE_TYPE NUMBER(1) default 0,
  207. COLLABORATOR VARCHAR2(40),
  208. SKIP_TYPE VARCHAR2(10),
  209. FLOW_STATUS VARCHAR2(20),
  210. FORM_CUSTOM VARCHAR2(1) default 'N',
  211. FORM_PATH VARCHAR2(100),
  212. MESSAGE VARCHAR2(500),
  213. VARIABLE CLOB,
  214. EXT CLOB,
  215. CREATE_TIME DATE,
  216. UPDATE_TIME DATE,
  217. DEL_FLAG VARCHAR2(1) default '0',
  218. TENANT_ID VARCHAR2(40)
  219. );
  220. alter table FLOW_HIS_TASK
  221. add constraint PK_FLOW_HIS_TASK primary key (ID);
  222. comment on table FLOW_HIS_TASK is '历史任务记录表';
  223. comment on column FLOW_HIS_TASK.ID is '主键id';
  224. comment on column FLOW_HIS_TASK.DEFINITION_ID is '对应flow_definition表的id';
  225. comment on column FLOW_HIS_TASK.INSTANCE_ID is '对应flow_instance表的id';
  226. comment on column FLOW_HIS_TASK.TASK_ID is '对应flow_task表的id';
  227. comment on column FLOW_HIS_TASK.NODE_CODE is '开始节点编码';
  228. comment on column FLOW_HIS_TASK.NODE_NAME is '开始节点名称';
  229. comment on column FLOW_HIS_TASK.NODE_TYPE is '开始节点类型 (0开始节点 1中间节点 2结束节点 3互斥网关 4并行网关)';
  230. comment on column FLOW_HIS_TASK.TARGET_NODE_CODE is '目标节点编码';
  231. comment on column FLOW_HIS_TASK.TARGET_NODE_NAME is '目标节点名称';
  232. comment on column FLOW_HIS_TASK.SKIP_TYPE is '流转类型(PASS通过 REJECT退回 NONE无动作)';
  233. comment on column FLOW_HIS_TASK.FLOW_STATUS is '流程状态(0待提交 1审批中 2审批通过 4终止 5作废 6撤销 8已完成 9已退回 10失效 11拿回)';
  234. comment on column FLOW_HIS_TASK.FORM_CUSTOM is '审批表单是否自定义 (Y是 N否)';
  235. comment on column FLOW_HIS_TASK.FORM_PATH is '审批表单路径';
  236. comment on column FLOW_HIS_TASK.MESSAGE is '审批意见';
  237. comment on column FLOW_HIS_TASK.VARIABLE is '任务变量';
  238. comment on column FLOW_HIS_TASK.EXT is '扩展字段,预留给业务系统使用';
  239. comment on column FLOW_HIS_TASK.CREATE_TIME is '任务开始时间';
  240. comment on column FLOW_HIS_TASK.UPDATE_TIME is '审批完成时间';
  241. comment on column FLOW_HIS_TASK.DEL_FLAG is '删除标志';
  242. comment on column FLOW_HIS_TASK.TENANT_ID is '租户id';
  243. comment on column FLOW_HIS_TASK.APPROVER is '审批者';
  244. comment on column FLOW_HIS_TASK.COOPERATE_TYPE is '协作方式(1审批 2转办 3委派 4会签 5票签 6加签 7减签)';
  245. comment on column FLOW_HIS_TASK.COLLABORATOR is '协作人';
  246. create table FLOW_USER
  247. (
  248. ID NUMBER(20) not null,
  249. TYPE VARCHAR2(1) not null,
  250. PROCESSED_BY VARCHAR2(80),
  251. ASSOCIATED NUMBER(20) not null,
  252. CREATE_TIME DATE,
  253. CREATE_BY VARCHAR2(80),
  254. UPDATE_TIME DATE,
  255. DEL_FLAG VARCHAR2(1) default '0',
  256. TENANT_ID VARCHAR2(40)
  257. );
  258. alter table FLOW_USER
  259. add constraint PK_FLOW_USER primary key (ID);
  260. comment on table FLOW_USER is '待办任务表';
  261. comment on column FLOW_USER.ID is '主键id';
  262. comment on column FLOW_USER.TYPE is '人员类型(1待办任务的审批人权限 2待办任务的转办人权限 3待办任务的委托人权限)';
  263. comment on column FLOW_USER.PROCESSED_BY is '权限人)';
  264. comment on column FLOW_USER.ASSOCIATED is '任务表id';
  265. comment on column FLOW_USER.CREATE_TIME is '创建时间';
  266. comment on column FLOW_USER.CREATE_BY is '节点名称';
  267. comment on column FLOW_USER.UPDATE_TIME is '更新时间';
  268. comment on column FLOW_USER.DEL_FLAG is '删除标志';
  269. comment on column FLOW_USER.TENANT_ID is '租户id';
  270. create index USER_PROCESSED_TYPE on FLOW_USER (PROCESSED_BY, TYPE);
  271. create index USER_ASSOCIATED_IDX on FLOW_USER (ASSOCIATED);
  272. -- ----------------------------
  273. -- 流程分类表
  274. -- ----------------------------
  275. CREATE TABLE flow_category
  276. (
  277. category_id NUMBER (20) NOT NULL,
  278. tenant_id VARCHAR2 (20) DEFAULT '000000',
  279. parent_id NUMBER (20) DEFAULT 0,
  280. ancestors VARCHAR2 (500) DEFAULT '',
  281. category_name VARCHAR2 (30) NOT NULL,
  282. order_num NUMBER (4) DEFAULT 0,
  283. del_flag CHAR(1) DEFAULT '0',
  284. create_dept NUMBER (20),
  285. create_by NUMBER (20),
  286. create_time DATE,
  287. update_by NUMBER (20),
  288. update_time DATE
  289. );
  290. alter table flow_category add constraint pk_flow_category primary key (category_id);
  291. COMMENT ON TABLE flow_category IS '流程分类';
  292. COMMENT ON COLUMN flow_category.category_id IS '流程分类ID';
  293. COMMENT ON COLUMN flow_category.tenant_id IS '租户编号';
  294. COMMENT ON COLUMN flow_category.parent_id IS '父流程分类id';
  295. COMMENT ON COLUMN flow_category.ancestors IS '祖级列表';
  296. COMMENT ON COLUMN flow_category.category_name IS '流程分类名称';
  297. COMMENT ON COLUMN flow_category.order_num IS '显示顺序';
  298. COMMENT ON COLUMN flow_category.del_flag IS '删除标志(0代表存在 1代表删除)';
  299. COMMENT ON COLUMN flow_category.create_dept IS '创建部门';
  300. COMMENT ON COLUMN flow_category.create_by IS '创建者';
  301. COMMENT ON COLUMN flow_category.create_time IS '创建时间';
  302. COMMENT ON COLUMN flow_category.update_by IS '更新者';
  303. COMMENT ON COLUMN flow_category.update_time IS '更新时间';
  304. INSERT INTO flow_category VALUES (100, '000000', 0, '0', 'OA审批', 0, '0', 103, 1, SYSDATE, NULL, NULL);
  305. INSERT INTO flow_category VALUES (101, '000000', 100, '0,100', '假勤管理', 0, '0', 103, 1, SYSDATE, NULL, NULL);
  306. INSERT INTO flow_category VALUES (102, '000000', 100, '0,100', '人事管理', 1, '0', 103, 1, SYSDATE, NULL, NULL);
  307. INSERT INTO flow_category VALUES (103, '000000', 101, '0,100,101', '请假', 0, '0', 103, 1, SYSDATE, NULL, NULL);
  308. INSERT INTO flow_category VALUES (104, '000000', 101, '0,100,101', '出差', 1, '0', 103, 1, SYSDATE, NULL, NULL);
  309. INSERT INTO flow_category VALUES (105, '000000', 101, '0,100,101', '加班', 2, '0', 103, 1, SYSDATE, NULL, NULL);
  310. INSERT INTO flow_category VALUES (106, '000000', 101, '0,100,101', '换班', 3, '0', 103, 1, SYSDATE, NULL, NULL);
  311. INSERT INTO flow_category VALUES (107, '000000', 101, '0,100,101', '外出', 4, '0', 103, 1, SYSDATE, NULL, NULL);
  312. INSERT INTO flow_category VALUES (108, '000000', 102, '0,100,102', '转正', 1, '0', 103, 1, SYSDATE, NULL, NULL);
  313. INSERT INTO flow_category VALUES (109, '000000', 102, '0,100,102', '离职', 2, '0', 103, 1, SYSDATE, NULL, NULL);
  314. -- ----------------------------
  315. -- 请假单信息
  316. -- ----------------------------
  317. CREATE TABLE test_leave
  318. (
  319. id NUMBER (20) NOT NULL,
  320. tenant_id VARCHAR2 (20) DEFAULT '000000',
  321. leave_type VARCHAR2 (255) NOT NULL,
  322. start_date DATE NOT NULL,
  323. end_date DATE NOT NULL,
  324. leave_days NUMBER (10) NOT NULL,
  325. remark VARCHAR2 (255),
  326. status VARCHAR2 (255),
  327. create_dept NUMBER (20),
  328. create_by NUMBER (20),
  329. create_time DATE,
  330. update_by NUMBER (20),
  331. update_time DATE
  332. );
  333. alter table test_leave add constraint pk_test_leave primary key (id);
  334. COMMENT ON TABLE test_leave IS '请假申请表';
  335. COMMENT ON COLUMN test_leave.id IS 'ID';
  336. COMMENT ON COLUMN test_leave.tenant_id IS '租户编号';
  337. COMMENT ON COLUMN test_leave.leave_type IS '请假类型';
  338. COMMENT ON COLUMN test_leave.start_date IS '开始时间';
  339. COMMENT ON COLUMN test_leave.end_date IS '结束时间';
  340. COMMENT ON COLUMN test_leave.leave_days IS '请假天数';
  341. COMMENT ON COLUMN test_leave.remark IS '请假原因';
  342. COMMENT ON COLUMN test_leave.status IS '状态';
  343. COMMENT ON COLUMN test_leave.create_dept IS '创建部门';
  344. COMMENT ON COLUMN test_leave.create_by IS '创建者';
  345. COMMENT ON COLUMN test_leave.create_time IS '创建时间';
  346. COMMENT ON COLUMN test_leave.update_by IS '更新者';
  347. COMMENT ON COLUMN test_leave.update_time IS '更新时间';
  348. INSERT INTO sys_menu VALUES ('11616', '工作流', '0', '6', 'workflow', '', '', '1', '0', 'M', '0', '0', '', 'workflow', 103, 1, SYSDATE, NULL, NULL, '');
  349. INSERT INTO sys_menu VALUES ('11618', '我的任务', '0', '7', 'task', '', '', '1', '0', 'M', '0', '0', '', 'my-task', 103, 1, SYSDATE, NULL, NULL, '');
  350. INSERT INTO sys_menu VALUES ('11619', '我的待办', '11618', '2', 'taskWaiting', 'workflow/task/taskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, SYSDATE, NULL, NULL, '');
  351. INSERT INTO sys_menu VALUES ('11632', '我的已办', '11618', '3', 'taskFinish', 'workflow/task/taskFinish', '', '1', '1', 'C', '0', '0', '', 'finish', 103, 1, SYSDATE, NULL, NULL, '');
  352. INSERT INTO sys_menu VALUES ('11633', '我的抄送', '11618', '4', 'taskCopyList', 'workflow/task/taskCopyList', '', '1', '1', 'C', '0', '0', '', 'my-copy', 103, 1, SYSDATE, NULL, NULL, '');
  353. INSERT INTO sys_menu VALUES ('11620', '流程定义', '11616', '3', 'processDefinition', 'workflow/processDefinition/index', '', '1', '1', 'C', '0', '0', '', 'process-definition', 103, 1, SYSDATE, NULL, NULL, '');
  354. INSERT INTO sys_menu VALUES ('11621', '流程实例', '11630', '1', 'processInstance', 'workflow/processInstance/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, SYSDATE, NULL, NULL, '');
  355. INSERT INTO sys_menu VALUES ('11622', '流程分类', '11616', '1', 'category', 'workflow/category/index', '', '1', '0', 'C', '0', '0', 'workflow:category:list', 'category', 103, 1, SYSDATE, NULL, NULL, '');
  356. INSERT INTO sys_menu VALUES ('11629', '我发起的', '11618', '1', 'myDocument', 'workflow/task/myDocument', '', '1', '1', 'C', '0', '0', '', 'guide', 103, 1, SYSDATE, NULL, NULL, '');
  357. INSERT INTO sys_menu VALUES ('11630', '流程监控', '11616', '4', 'monitor', '', '', '1', '0', 'M', '0', '0', '', 'monitor', 103, 1, SYSDATE, NULL, NULL, '');
  358. INSERT INTO sys_menu VALUES ('11631', '待办任务', '11630', '2', 'allTaskWaiting', 'workflow/task/allTaskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, SYSDATE, NULL, NULL, '');
  359. INSERT INTO sys_menu VALUES ('11700', '流程设计', '11616', '5', 'design/index', 'workflow/processDefinition/design', '', '1', '1', 'C', '1', '0', 'workflow:leave:edit', '#', 103, 1, SYSDATE, NULL, NULL, '');
  360. INSERT INTO sys_menu VALUES ('11701', '请假申请', '11616', '6', 'leaveEdit/index', 'workflow/leave/leaveEdit', '', '1', '1', 'C', '1', '0', 'workflow:leave:edit', '#', 103, 1, SYSDATE, NULL, NULL, '');
  361. INSERT INTO sys_menu VALUES ('11623', '流程分类查询', '11622', '1', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:query', '#', 103, 1, SYSDATE, NULL, NULL, '');
  362. INSERT INTO sys_menu VALUES ('11624', '流程分类新增', '11622', '2', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:add', '#', 103, 1, SYSDATE, NULL, NULL, '');
  363. INSERT INTO sys_menu VALUES ('11625', '流程分类修改', '11622', '3', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:edit', '#', 103, 1, SYSDATE, NULL, NULL, '');
  364. INSERT INTO sys_menu VALUES ('11626', '流程分类删除', '11622', '4', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:remove', '#', 103, 1, SYSDATE, NULL, NULL, '');
  365. INSERT INTO sys_menu VALUES ('11627', '流程分类导出', '11622', '5', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:export', '#', 103, 1, SYSDATE, NULL, NULL, '');
  366. INSERT INTO sys_menu VALUES ('11638', '请假申请', '5', '1', 'leave', 'workflow/leave/index', '', '1', '0', 'C', '0', '0', 'workflow:leave:list', '#', 103, 1, SYSDATE, NULL, NULL, '请假申请菜单');
  367. INSERT INTO sys_menu VALUES ('11639', '请假申请查询', '11638', '1', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:query', '#', 103, 1, SYSDATE, NULL, NULL, '');
  368. INSERT INTO sys_menu VALUES ('11640', '请假申请新增', '11638', '2', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:add', '#', 103, 1, SYSDATE, NULL, NULL, '');
  369. INSERT INTO sys_menu VALUES ('11641', '请假申请修改', '11638', '3', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:edit', '#', 103, 1, SYSDATE, NULL, NULL, '');
  370. INSERT INTO sys_menu VALUES ('11642', '请假申请删除', '11638', '4', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:remove', '#', 103, 1, SYSDATE, NULL, NULL, '');
  371. INSERT INTO sys_menu VALUES ('11643', '请假申请导出', '11638', '5', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:export', '#', 103, 1, SYSDATE, NULL, NULL, '');
  372. INSERT INTO sys_dict_type VALUES (13, '000000', '业务状态', 'wf_business_status', 103, 1, SYSDATE, NULL, NULL, '业务状态列表');
  373. INSERT INTO sys_dict_type VALUES (14, '000000', '表单类型', 'wf_form_type', 103, 1, SYSDATE, NULL, NULL, '表单类型列表');
  374. INSERT INTO sys_dict_type VALUES (15, '000000', '任务状态', 'wf_task_status', 103, 1, SYSDATE, NULL, NULL, '任务状态');
  375. INSERT INTO sys_dict_data VALUES (39, '000000', 1, '已撤销', 'cancel', 'wf_business_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '已撤销');
  376. INSERT INTO sys_dict_data VALUES (40, '000000', 2, '草稿', 'draft', 'wf_business_status', '', 'info', 'N', 103, 1, SYSDATE, NULL, NULL, '草稿');
  377. INSERT INTO sys_dict_data VALUES (41, '000000', 3, '待审核', 'waiting', 'wf_business_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '待审核');
  378. INSERT INTO sys_dict_data VALUES (42, '000000', 4, '已完成', 'finish', 'wf_business_status', '', 'success', 'N', 103, 1, SYSDATE, NULL, NULL, '已完成');
  379. INSERT INTO sys_dict_data VALUES (43, '000000', 5, '已作废', 'invalid', 'wf_business_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '已作废');
  380. INSERT INTO sys_dict_data VALUES (44, '000000', 6, '已退回', 'back', 'wf_business_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '已退回');
  381. INSERT INTO sys_dict_data VALUES (45, '000000', 7, '已终止', 'termination', 'wf_business_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '已终止');
  382. INSERT INTO sys_dict_data VALUES (46, '000000', 1, '自定义表单', 'static', 'wf_form_type', '', 'success', 'N', 103, 1, SYSDATE, NULL, NULL, '自定义表单');
  383. INSERT INTO sys_dict_data VALUES (47, '000000', 2, '动态表单', 'dynamic', 'wf_form_type', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '动态表单');
  384. INSERT INTO sys_dict_data VALUES (48, '000000', 1, '撤销', 'cancel', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '撤销');
  385. INSERT INTO sys_dict_data VALUES (49, '000000', 2, '通过', 'pass', 'wf_task_status', '', 'success', 'N', 103, 1, SYSDATE, NULL, NULL, '通过');
  386. INSERT INTO sys_dict_data VALUES (50, '000000', 3, '待审核', 'waiting', 'wf_task_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '待审核');
  387. INSERT INTO sys_dict_data VALUES (51, '000000', 4, '作废', 'invalid', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '作废');
  388. INSERT INTO sys_dict_data VALUES (52, '000000', 5, '退回', 'back', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '退回');
  389. INSERT INTO sys_dict_data VALUES (53, '000000', 6, '终止', 'termination', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '终止');
  390. INSERT INTO sys_dict_data VALUES (54, '000000', 7, '转办', 'transfer', 'wf_task_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '转办');
  391. INSERT INTO sys_dict_data VALUES (55, '000000', 8, '委托', 'depute', 'wf_task_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '委托');
  392. INSERT INTO sys_dict_data VALUES (56, '000000', 9, '抄送', 'copy', 'wf_task_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '抄送');
  393. INSERT INTO sys_dict_data VALUES (57, '000000', 10, '加签', 'sign', 'wf_task_status', '', 'primary', 'N', 103, 1, SYSDATE, NULL, NULL, '加签');
  394. INSERT INTO sys_dict_data VALUES (58, '000000', 11, '减签', 'sign_off', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '减签');
  395. INSERT INTO sys_dict_data VALUES (59, '000000', 11, '超时', 'timeout', 'wf_task_status', '', 'danger', 'N', 103, 1, SYSDATE, NULL, NULL, '超时');