From 3c8d864b5f68af5167199e0d5c9ff6c0c5852638 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 20 一月 2025 11:35:45 +0800 Subject: [PATCH] !639 发布 5.3.0-BETA 公测版本 Merge pull request !639 from 疯狂的狮子Li/dev --- script/sql/postgres/postgres_ry_workflow.sql | 660 +++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 394 insertions(+), 266 deletions(-) diff --git a/script/sql/postgres/postgres_ry_workflow.sql b/script/sql/postgres/postgres_ry_workflow.sql index 8a6078d..9bcf2cf 100644 --- a/script/sql/postgres/postgres_ry_workflow.sql +++ b/script/sql/postgres/postgres_ry_workflow.sql @@ -1,275 +1,403 @@ -insert into sys_menu values('11616', '宸ヤ綔娴�' , '0', '6', 'workflow', '', '', '1', '0', 'M', '0', '0', '', 'workflow', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11617', '妯″瀷绠$悊', '11616', '2', 'model', 'workflow/model/index', '', '1', '1', 'C', '0', '0', 'workflow:model:list', 'model', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11618', '鎴戠殑浠诲姟', '0', '7', 'task', '', '', '1', '0', 'M', '0', '0', '', 'my-task', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11619', '鎴戠殑寰呭姙', '11618', '2', 'taskWaiting', 'workflow/task/taskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11632', '鎴戠殑宸插姙', '11618', '3', 'taskFinish', 'workflow/task/taskFinish', '', '1', '1', 'C', '0', '0', '', 'finish', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11633', '鎴戠殑鎶勯��', '11618', '4', 'taskCopyList', 'workflow/task/taskCopyList', '', '1', '1', 'C', '0', '0', '', 'my-copy', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11620', '娴佺▼瀹氫箟', '11616', '3', 'processDefinition', 'workflow/processDefinition/index', '', '1', '1', 'C', '0', '0', '', 'process-definition', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11621', '娴佺▼瀹炰緥', '11630', '1', 'processInstance', 'workflow/processInstance/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11622', '娴佺▼鍒嗙被', '11616', '1', 'category', 'workflow/category/index', '', '1', '0', 'C', '0', '0', 'workflow:category:list', 'category', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11629', '鎴戝彂璧风殑', '11618', '1', 'myDocument', 'workflow/task/myDocument', '', '1', '1', 'C', '0', '0', '', 'guide', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11630', '娴佺▼鐩戞帶', '11616', '4', 'monitor', '', '', '1', '0', 'M', '0', '0', '', 'monitor', 103, 1, now(), NULL, NULL, ''); -insert into sys_menu values('11631', '寰呭姙浠诲姟', '11630', '2', 'allTaskWaiting', 'workflow/task/allTaskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, now(), NULL, NULL, ''); +-- ---------------------------- +-- 0銆亀arm-flow-all.sql锛屽湴鍧�锛歨ttps://gitee.com/dromara/warm-flow/blob/master/sql/postgresql/postgresql-warm-flow-all.sql +-- ---------------------------- +CREATE TABLE flow_definition +( + id int8 NOT NULL, -- 涓婚敭id + flow_code varchar(40) NOT NULL, -- 娴佺▼缂栫爜 + flow_name varchar(100) NOT NULL, -- 娴佺▼鍚嶇О + category varchar(100) NULL, -- 娴佺▼绫诲埆 + "version" varchar(20) NOT NULL, -- 娴佺▼鐗堟湰 + is_publish int2 NOT NULL DEFAULT 0, -- 鏄惁鍙戝竷锛�0鏈彂甯� 1宸插彂甯� 9澶辨晥锛� + form_custom bpchar(1) NULL DEFAULT 'N':: character varying, -- 瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級 + form_path varchar(100) NULL, -- 瀹℃壒琛ㄥ崟璺緞 + activity_status int2 NOT NULL DEFAULT 1, -- 娴佺▼婵�娲荤姸鎬侊紙0鎸傝捣 1婵�娲伙級 + listener_type varchar(100) NULL, -- 鐩戝惉鍣ㄧ被鍨� + listener_path varchar(400) NULL, -- 鐩戝惉鍣ㄨ矾寰� + ext varchar(500) NULL, -- 鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤 + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_definition_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_definition IS '娴佺▼瀹氫箟琛�'; + +COMMENT ON COLUMN flow_definition.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_definition.flow_code IS '娴佺▼缂栫爜'; +COMMENT ON COLUMN flow_definition.flow_name IS '娴佺▼鍚嶇О'; +COMMENT ON COLUMN flow_definition.category IS '娴佺▼绫诲埆'; +COMMENT ON COLUMN flow_definition."version" IS '娴佺▼鐗堟湰'; +COMMENT ON COLUMN flow_definition.is_publish IS '鏄惁鍙戝竷锛�0鏈彂甯� 1宸插彂甯� 9澶辨晥锛�'; +COMMENT ON COLUMN flow_definition.form_custom IS '瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級'; +COMMENT ON COLUMN flow_definition.form_path IS '瀹℃壒琛ㄥ崟璺緞'; +COMMENT ON COLUMN flow_definition.activity_status IS '娴佺▼婵�娲荤姸鎬侊紙0鎸傝捣 1婵�娲伙級'; +COMMENT ON COLUMN flow_definition.listener_type IS '鐩戝惉鍣ㄧ被鍨�'; +COMMENT ON COLUMN flow_definition.listener_path IS '鐩戝惉鍣ㄨ矾寰�'; +COMMENT ON COLUMN flow_definition.ext IS '鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤'; +COMMENT ON COLUMN flow_definition.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_definition.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_definition.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_definition.tenant_id IS '绉熸埛id'; + +CREATE TABLE flow_node +( + id int8 NOT NULL, -- 涓婚敭id + node_type int2 NOT NULL, -- 鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + definition_id int8 NOT NULL, -- 娴佺▼瀹氫箟id + node_code varchar(100) NOT NULL, -- 娴佺▼鑺傜偣缂栫爜 + node_name varchar(100) NULL, -- 娴佺▼鑺傜偣鍚嶇О + permission_flag varchar(200) NULL, -- 鏉冮檺鏍囪瘑锛堟潈闄愮被鍨�:鏉冮檺鏍囪瘑锛屽彲浠ュ涓紝鐢ㄩ�楀彿闅斿紑) + node_ratio numeric(6, 3) NULL, -- 娴佺▼绛剧讲姣斾緥鍊� + coordinate varchar(100) NULL, -- 鍧愭爣 + skip_any_node varchar(100) NULL DEFAULT 'N':: character varying, -- 鏄惁鍙互閫�鍥炰换鎰忚妭鐐癸紙Y鏄� N鍚︼級鍗冲皢鍒犻櫎 + any_node_skip varchar(100) NULL, -- 浠绘剰缁撶偣璺宠浆 + listener_type varchar(100) NULL, -- 鐩戝惉鍣ㄧ被鍨� + listener_path varchar(400) NULL, -- 鐩戝惉鍣ㄨ矾寰� + handler_type varchar(100) NULL, -- 澶勭悊鍣ㄧ被鍨� + handler_path varchar(400) NULL, -- 澶勭悊鍣ㄨ矾寰� + form_custom bpchar(1) NULL DEFAULT 'N':: character varying, -- 瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級 + form_path varchar(100) NULL, -- 瀹℃壒琛ㄥ崟璺緞 + "version" varchar(20) NOT NULL, -- 鐗堟湰 + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_node_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_node IS '娴佺▼鑺傜偣琛�'; + +COMMENT ON COLUMN flow_node.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_node.node_type IS '鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_node.definition_id IS '娴佺▼瀹氫箟id'; +COMMENT ON COLUMN flow_node.node_code IS '娴佺▼鑺傜偣缂栫爜'; +COMMENT ON COLUMN flow_node.node_name IS '娴佺▼鑺傜偣鍚嶇О'; +COMMENT ON COLUMN flow_node.permission_flag IS '鏉冮檺鏍囪瘑锛堟潈闄愮被鍨�:鏉冮檺鏍囪瘑锛屽彲浠ュ涓紝鐢ㄩ�楀彿闅斿紑)'; +COMMENT ON COLUMN flow_node.node_ratio IS '娴佺▼绛剧讲姣斾緥鍊�'; +COMMENT ON COLUMN flow_node.coordinate IS '鍧愭爣'; +COMMENT ON COLUMN flow_node.skip_any_node IS '鏄惁鍙互閫�鍥炰换鎰忚妭鐐癸紙Y鏄� N鍚︼級鍗冲皢鍒犻櫎'; +COMMENT ON COLUMN flow_node.any_node_skip IS '浠绘剰缁撶偣璺宠浆'; +COMMENT ON COLUMN flow_node.listener_type IS '鐩戝惉鍣ㄧ被鍨�'; +COMMENT ON COLUMN flow_node.listener_path IS '鐩戝惉鍣ㄨ矾寰�'; +COMMENT ON COLUMN flow_node.handler_type IS '澶勭悊鍣ㄧ被鍨�'; +COMMENT ON COLUMN flow_node.handler_path IS '澶勭悊鍣ㄨ矾寰�'; +COMMENT ON COLUMN flow_node.form_custom IS '瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級'; +COMMENT ON COLUMN flow_node.form_path IS '瀹℃壒琛ㄥ崟璺緞'; +COMMENT ON COLUMN flow_node."version" IS '鐗堟湰'; +COMMENT ON COLUMN flow_node.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_node.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_node.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_node.tenant_id IS '绉熸埛id'; --- 娴佺▼鍒嗙被绠$悊鐩稿叧鎸夐挳 -insert into sys_menu values ('11623', '娴佺▼鍒嗙被鏌ヨ', '11622', '1', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:query', '#', 103, 1, now(), null, null, ''); -insert into sys_menu values ('11624', '娴佺▼鍒嗙被鏂板', '11622', '2', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:add', '#', 103, 1, now(), null, null, ''); -insert into sys_menu values ('11625', '娴佺▼鍒嗙被淇敼', '11622', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:edit', '#', 103, 1, now(), null, null, ''); -insert into sys_menu values ('11626', '娴佺▼鍒嗙被鍒犻櫎', '11622', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:remove','#', 103, 1, now(), null, null, ''); -insert into sys_menu values ('11627', '娴佺▼鍒嗙被瀵煎嚭', '11622', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:export','#', 103, 1, now(), null, null, ''); +CREATE TABLE flow_skip +( + id int8 NOT NULL, -- 涓婚敭id + definition_id int8 NOT NULL, -- 娴佺▼瀹氫箟id + now_node_code varchar(100) NOT NULL, -- 褰撳墠娴佺▼鑺傜偣鐨勭紪鐮� + now_node_type int2 NULL, -- 褰撳墠鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + next_node_code varchar(100) NOT NULL, -- 涓嬩竴涓祦绋嬭妭鐐圭殑缂栫爜 + next_node_type int2 NULL, -- 涓嬩竴涓妭鐐圭被鍨嬶紙0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + skip_name varchar(100) NULL, -- 璺宠浆鍚嶇О + skip_type varchar(40) NULL, -- 璺宠浆绫诲瀷锛圥ASS瀹℃壒閫氳繃 REJECT閫�鍥烇級 + skip_condition varchar(200) NULL, -- 璺宠浆鏉′欢 + coordinate varchar(100) NULL, -- 鍧愭爣 + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_skip_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_skip IS '鑺傜偣璺宠浆鍏宠仈琛�'; + +COMMENT ON COLUMN flow_skip.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_skip.definition_id IS '娴佺▼瀹氫箟id'; +COMMENT ON COLUMN flow_skip.now_node_code IS '褰撳墠娴佺▼鑺傜偣鐨勭紪鐮�'; +COMMENT ON COLUMN flow_skip.now_node_type IS '褰撳墠鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_skip.next_node_code IS '涓嬩竴涓祦绋嬭妭鐐圭殑缂栫爜'; +COMMENT ON COLUMN flow_skip.next_node_type IS '涓嬩竴涓妭鐐圭被鍨嬶紙0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_skip.skip_name IS '璺宠浆鍚嶇О'; +COMMENT ON COLUMN flow_skip.skip_type IS '璺宠浆绫诲瀷锛圥ASS瀹℃壒閫氳繃 REJECT閫�鍥烇級'; +COMMENT ON COLUMN flow_skip.skip_condition IS '璺宠浆鏉′欢'; +COMMENT ON COLUMN flow_skip.coordinate IS '鍧愭爣'; +COMMENT ON COLUMN flow_skip.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_skip.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_skip.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_skip.tenant_id IS '绉熸埛id'; + +CREATE TABLE flow_instance +( + id int8 NOT NULL, -- 涓婚敭id + definition_id int8 NOT NULL, -- 瀵瑰簲flow_definition琛ㄧ殑id + business_id varchar(40) NOT NULL, -- 涓氬姟id + node_type int2 NOT NULL, -- 鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + node_code varchar(40) NOT NULL, -- 娴佺▼鑺傜偣缂栫爜 + node_name varchar(100) NULL, -- 娴佺▼鑺傜偣鍚嶇О + variable text NULL, -- 浠诲姟鍙橀噺 + flow_status varchar(20) NOT NULL, -- 娴佺▼鐘舵�侊紙0寰呮彁浜� 1瀹℃壒涓� 2 瀹℃壒閫氳繃 8宸插畬鎴� 9宸查��鍥� 10澶辨晥锛� + activity_status int2 NOT NULL DEFAULT 1, -- 娴佺▼婵�娲荤姸鎬侊紙0鎸傝捣 1婵�娲伙級 + create_by varchar(64) NULL DEFAULT '':: character varying, -- 鍒涘缓鑰� + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + ext varchar(500) NULL, -- 鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_instance_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_instance IS '娴佺▼瀹炰緥琛�'; + +COMMENT ON COLUMN flow_instance.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_instance.definition_id IS '瀵瑰簲flow_definition琛ㄧ殑id'; +COMMENT ON COLUMN flow_instance.business_id IS '涓氬姟id'; +COMMENT ON COLUMN flow_instance.node_type IS '鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_instance.node_code IS '娴佺▼鑺傜偣缂栫爜'; +COMMENT ON COLUMN flow_instance.node_name IS '娴佺▼鑺傜偣鍚嶇О'; +COMMENT ON COLUMN flow_instance.variable IS '浠诲姟鍙橀噺'; +COMMENT ON COLUMN flow_instance.flow_status IS '娴佺▼鐘舵�侊紙0寰呮彁浜� 1瀹℃壒涓� 2 瀹℃壒閫氳繃 3鑷姩閫氳繃 4缁堟 5浣滃簾 6鎾ら攢 7鍙栧洖 8宸插畬鎴� 9宸查��鍥� 10澶辨晥锛�'; +COMMENT ON COLUMN flow_instance.activity_status IS '娴佺▼婵�娲荤姸鎬侊紙0鎸傝捣 1婵�娲伙級'; +COMMENT ON COLUMN flow_instance.create_by IS '鍒涘缓鑰�'; +COMMENT ON COLUMN flow_instance.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_instance.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_instance.ext IS '鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤'; +COMMENT ON COLUMN flow_instance.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_instance.tenant_id IS '绉熸埛id'; + +CREATE TABLE flow_task +( + id int8 NOT NULL, -- 涓婚敭id + definition_id int8 NOT NULL, -- 瀵瑰簲flow_definition琛ㄧ殑id + instance_id int8 NOT NULL, -- 瀵瑰簲flow_instance琛ㄧ殑id + node_code varchar(100) NOT NULL, -- 鑺傜偣缂栫爜 + node_name varchar(100) NULL, -- 鑺傜偣鍚嶇О + node_type int2 NOT NULL, -- 鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + form_custom bpchar(1) NULL DEFAULT 'N':: character varying, -- 瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級 + form_path varchar(100) NULL, -- 瀹℃壒琛ㄥ崟璺緞 + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_task_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_task IS '寰呭姙浠诲姟琛�'; + +COMMENT ON COLUMN flow_task.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_task.definition_id IS '瀵瑰簲flow_definition琛ㄧ殑id'; +COMMENT ON COLUMN flow_task.instance_id IS '瀵瑰簲flow_instance琛ㄧ殑id'; +COMMENT ON COLUMN flow_task.node_code IS '鑺傜偣缂栫爜'; +COMMENT ON COLUMN flow_task.node_name IS '鑺傜偣鍚嶇О'; +COMMENT ON COLUMN flow_task.node_type IS '鑺傜偣绫诲瀷锛�0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_task.form_custom IS '瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級'; +COMMENT ON COLUMN flow_task.form_path IS '瀹℃壒琛ㄥ崟璺緞'; +COMMENT ON COLUMN flow_task.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_task.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_task.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_task.tenant_id IS '绉熸埛id'; + +CREATE TABLE flow_his_task +( + id int8 NOT NULL, -- 涓婚敭id + definition_id int8 NOT NULL, -- 瀵瑰簲flow_definition琛ㄧ殑id + instance_id int8 NOT NULL, -- 瀵瑰簲flow_instance琛ㄧ殑id + task_id int8 NOT NULL, -- 瀵瑰簲flow_task琛ㄧ殑id + node_code varchar(100) NULL, -- 寮�濮嬭妭鐐圭紪鐮� + node_name varchar(100) NULL, -- 寮�濮嬭妭鐐瑰悕绉� + node_type int2 NULL, -- 寮�濮嬭妭鐐圭被鍨嬶紙0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛� + target_node_code varchar(200) NULL, -- 鐩爣鑺傜偣缂栫爜 + target_node_name varchar(200) NULL, -- 缁撴潫鑺傜偣鍚嶇О + approver varchar(40) NULL, -- 瀹℃壒鑰� + cooperate_type int2 NOT NULL DEFAULT 0, -- 鍗忎綔鏂瑰紡(1瀹℃壒 2杞姙 3濮旀淳 4浼氱 5绁ㄧ 6鍔犵 7鍑忕) + collaborator varchar(40) NULL, -- 鍗忎綔浜�(鍙湁杞姙銆佷細绛俱�佺エ绛俱�佸娲�) + skip_type varchar(10) NULL, -- 娴佽浆绫诲瀷锛圥ASS閫氳繃 REJECT閫�鍥� NONE鏃犲姩浣滐級 + flow_status varchar(20) NOT NULL, -- 娴佺▼鐘舵�侊紙0寰呮彁浜� 1瀹℃壒涓� 2 瀹℃壒閫氳繃 8宸插畬鎴� 9宸查��鍥� 10澶辨晥锛� + form_custom bpchar(1) NULL DEFAULT 'N':: character varying, -- 瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級 + form_path varchar(100) NULL, -- 瀹℃壒琛ㄥ崟璺緞 + ext varchar(500) NULL, -- 鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤 + message varchar(500) NULL, -- 瀹℃壒鎰忚 + variable text NULL, -- 浠诲姟鍙橀噺 + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_his_task_pkey PRIMARY KEY (id) +); +COMMENT ON TABLE flow_his_task IS '鍘嗗彶浠诲姟璁板綍琛�'; + +COMMENT ON COLUMN flow_his_task.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_his_task.definition_id IS '瀵瑰簲flow_definition琛ㄧ殑id'; +COMMENT ON COLUMN flow_his_task.instance_id IS '瀵瑰簲flow_instance琛ㄧ殑id'; +COMMENT ON COLUMN flow_his_task.task_id IS '瀵瑰簲flow_task琛ㄧ殑id'; +COMMENT ON COLUMN flow_his_task.node_code IS '寮�濮嬭妭鐐圭紪鐮�'; +COMMENT ON COLUMN flow_his_task.node_name IS '寮�濮嬭妭鐐瑰悕绉�'; +COMMENT ON COLUMN flow_his_task.node_type IS '寮�濮嬭妭鐐圭被鍨嬶紙0寮�濮嬭妭鐐� 1涓棿鑺傜偣 2缁撴潫鑺傜偣 3浜掓枼缃戝叧 4骞惰缃戝叧锛�'; +COMMENT ON COLUMN flow_his_task.target_node_code IS '鐩爣鑺傜偣缂栫爜'; +COMMENT ON COLUMN flow_his_task.target_node_name IS '缁撴潫鑺傜偣鍚嶇О'; +COMMENT ON COLUMN flow_his_task.approver IS '瀹℃壒鑰�'; +COMMENT ON COLUMN flow_his_task.cooperate_type IS '鍗忎綔鏂瑰紡(1瀹℃壒 2杞姙 3濮旀淳 4浼氱 5绁ㄧ 6鍔犵 7鍑忕)'; +COMMENT ON COLUMN flow_his_task.collaborator IS '鍗忎綔浜�'; +COMMENT ON COLUMN flow_his_task.skip_type IS '娴佽浆绫诲瀷锛圥ASS閫氳繃 REJECT閫�鍥� NONE鏃犲姩浣滐級'; +COMMENT ON COLUMN flow_his_task.flow_status IS '娴佺▼鐘舵�侊紙1瀹℃壒涓� 2 瀹℃壒閫氳繃 9宸查��鍥� 10澶辨晥锛�'; +COMMENT ON COLUMN flow_his_task.form_custom IS '瀹℃壒琛ㄥ崟鏄惁鑷畾涔夛紙Y鏄� N鍚︼級'; +COMMENT ON COLUMN flow_his_task.form_path IS '瀹℃壒琛ㄥ崟璺緞'; +COMMENT ON COLUMN flow_his_task.message IS '瀹℃壒鎰忚'; +COMMENT ON COLUMN flow_his_task.variable IS '浠诲姟鍙橀噺'; +COMMENT ON COLUMN flow_his_task.ext IS '鎵╁睍瀛楁锛岄鐣欑粰涓氬姟绯荤粺浣跨敤'; +COMMENT ON COLUMN flow_his_task.create_time IS '浠诲姟寮�濮嬫椂闂�'; +COMMENT ON COLUMN flow_his_task.update_time IS '瀹℃壒瀹屾垚鏃堕棿'; +COMMENT ON COLUMN flow_his_task.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_his_task.tenant_id IS '绉熸埛id'; + +CREATE TABLE flow_user +( + id int8 NOT NULL, -- 涓婚敭id + "type" bpchar(1) NOT NULL, -- 浜哄憳绫诲瀷锛�1寰呭姙浠诲姟鐨勫鎵逛汉鏉冮檺 2寰呭姙浠诲姟鐨勮浆鍔炰汉鏉冮檺 3娴佺▼瀹炰緥鐨勬妱閫佷汉鏉冮檺 4寰呭姙浠诲姟鐨勫鎵樹汉鏉冮檺锛� + processed_by varchar(80) NULL, -- 鏉冮檺浜� + associated int8 NOT NULL, -- 浠诲姟琛╥d + create_time timestamp NULL, -- 鍒涘缓鏃堕棿 + create_by varchar(80) NULL, -- 鍒涘缓浜� + update_time timestamp NULL, -- 鏇存柊鏃堕棿 + del_flag bpchar(1) NULL DEFAULT '0':: character varying, -- 鍒犻櫎鏍囧織 + tenant_id varchar(40) NULL, -- 绉熸埛id + CONSTRAINT flow_user_pk PRIMARY KEY (id) +); +CREATE INDEX user_processed_type ON flow_user USING btree (processed_by, type); +COMMENT ON TABLE flow_user IS '娴佺▼鐢ㄦ埛琛�'; + +COMMENT ON COLUMN flow_user.id IS '涓婚敭id'; +COMMENT ON COLUMN flow_user."type" IS '浜哄憳绫诲瀷锛�1寰呭姙浠诲姟鐨勫鎵逛汉鏉冮檺 2寰呭姙浠诲姟鐨勮浆鍔炰汉鏉冮檺 3寰呭姙浠诲姟鐨勫鎵樹汉鏉冮檺锛�'; +COMMENT ON COLUMN flow_user.processed_by IS '鏉冮檺浜�'; +COMMENT ON COLUMN flow_user.associated IS '浠诲姟琛╥d'; +COMMENT ON COLUMN flow_user.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_user.create_by IS '鍒涘缓浜�'; +COMMENT ON COLUMN flow_user.update_time IS '鏇存柊鏃堕棿'; +COMMENT ON COLUMN flow_user.del_flag IS '鍒犻櫎鏍囧織'; +COMMENT ON COLUMN flow_user.tenant_id IS '绉熸埛id'; + +-- ---------------------------- +-- 娴佺▼鍒嗙被琛� +-- ---------------------------- +CREATE TABLE flow_category +( + category_id int8 NOT NULL, + tenant_id VARCHAR(20) DEFAULT '000000'::varchar, + parent_id int8 DEFAULT 0, + ancestors VARCHAR(500) DEFAULT ''::varchar, + category_name VARCHAR(30) NOT NULL, + order_num INT DEFAULT 0, + del_flag CHAR DEFAULT '0'::bpchar, + create_dept int8, + create_by int8, + create_time TIMESTAMP, + update_by int8, + update_time TIMESTAMP, + PRIMARY KEY (category_id) +); + +COMMENT ON TABLE flow_category IS '娴佺▼鍒嗙被'; +COMMENT ON COLUMN flow_category.category_id IS '娴佺▼鍒嗙被ID'; +COMMENT ON COLUMN flow_category.tenant_id IS '绉熸埛缂栧彿'; +COMMENT ON COLUMN flow_category.parent_id IS '鐖舵祦绋嬪垎绫籭d'; +COMMENT ON COLUMN flow_category.ancestors IS '绁栫骇鍒楄〃'; +COMMENT ON COLUMN flow_category.category_name IS '娴佺▼鍒嗙被鍚嶇О'; +COMMENT ON COLUMN flow_category.order_num IS '鏄剧ず椤哄簭'; +COMMENT ON COLUMN flow_category.del_flag IS '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�'; +COMMENT ON COLUMN flow_category.create_dept IS '鍒涘缓閮ㄩ棬'; +COMMENT ON COLUMN flow_category.create_by IS '鍒涘缓鑰�'; +COMMENT ON COLUMN flow_category.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN flow_category.update_by IS '鏇存柊鑰�'; +COMMENT ON COLUMN flow_category.update_time IS '鏇存柊鏃堕棿'; + +INSERT INTO flow_category VALUES (100, '000000', 0, '0', 'OA瀹℃壒', 0, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (101, '000000', 100, '0,100', '鍋囧嫟绠$悊', 0, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (102, '000000', 100, '0,100', '浜轰簨绠$悊', 1, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (103, '000000', 101, '0,100,101', '璇峰亣', 0, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (104, '000000', 101, '0,100,101', '鍑哄樊', 1, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (105, '000000', 101, '0,100,101', '鍔犵彮', 2, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (106, '000000', 101, '0,100,101', '鎹㈢彮', 3, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (107, '000000', 101, '0,100,101', '澶栧嚭', 4, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (108, '000000', 102, '0,100,102', '杞', 1, '0', 103, 1, now(), NULL, NULL); +INSERT INTO flow_category VALUES (109, '000000', 102, '0,100,102', '绂昏亴', 2, '0', 103, 1, now(), NULL, NULL); + +-- ---------------------------- -- 璇峰亣鍗曚俊鎭� -create table test_leave +-- ---------------------------- +CREATE TABLE test_leave ( - id bigint not null - constraint test_leave_pk - primary key, - leave_type varchar(255), - start_date timestamp, - end_date timestamp, - leave_days bigint, - remark varchar(255), - status varchar(255), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp, - tenant_id varchar(20) + id int8 NOT NULL, + tenant_id VARCHAR(20) DEFAULT '000000'::varchar, + leave_type VARCHAR(255) NOT NULL, + start_date TIMESTAMP NOT NULL, + end_date TIMESTAMP NOT NULL, + leave_days int2 NOT NULL, + remark VARCHAR(255), + status VARCHAR(255), + create_dept int8, + create_by int8, + create_time TIMESTAMP, + update_by int8, + update_time TIMESTAMP, + PRIMARY KEY (id) ); -comment on table test_leave is '璇峰亣鐢宠琛�'; -comment on column test_leave.id is '涓婚敭'; -comment on column test_leave.leave_type is '璇峰亣绫诲瀷'; -comment on column test_leave.start_date is '寮�濮嬫椂闂�'; -comment on column test_leave.end_date is '缁撴潫鏃堕棿'; -comment on column test_leave.remark is '璇峰亣鍘熷洜'; -comment on column test_leave.status is '鐘舵��'; -comment on column test_leave.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column test_leave.create_by is '鍒涘缓鑰�'; -comment on column test_leave.create_time is '鍒涘缓鏃堕棿'; -comment on column test_leave.update_by is '鏇存柊鑰�'; -comment on column test_leave.update_time is '鏇存柊鏃堕棿'; -comment on column test_leave.tenant_id is '绉熸埛缂栫爜'; +COMMENT ON TABLE test_leave IS '璇峰亣鐢宠琛�'; +COMMENT ON COLUMN test_leave.id IS 'id'; +COMMENT ON COLUMN test_leave.tenant_id IS '绉熸埛缂栧彿'; +COMMENT ON COLUMN test_leave.leave_type IS '璇峰亣绫诲瀷'; +COMMENT ON COLUMN test_leave.start_date IS '寮�濮嬫椂闂�'; +COMMENT ON COLUMN test_leave.end_date IS '缁撴潫鏃堕棿'; +COMMENT ON COLUMN test_leave.leave_days IS '璇峰亣澶╂暟'; +COMMENT ON COLUMN test_leave.remark IS '璇峰亣鍘熷洜'; +COMMENT ON COLUMN test_leave.status IS '鐘舵��'; +COMMENT ON COLUMN test_leave.create_dept IS '鍒涘缓閮ㄩ棬'; +COMMENT ON COLUMN test_leave.create_by IS '鍒涘缓鑰�'; +COMMENT ON COLUMN test_leave.create_time IS '鍒涘缓鏃堕棿'; +COMMENT ON COLUMN test_leave.update_by IS '鏇存柊鑰�'; +COMMENT ON COLUMN test_leave.update_time IS '鏇存柊鏃堕棿'; -alter table test_leave - owner to postgres; +INSERT INTO sys_menu VALUES ('11616', '宸ヤ綔娴�', '0', '6', 'workflow', '', '', '1', '0', 'M', '0', '0', '', 'workflow', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11618', '鎴戠殑浠诲姟', '0', '7', 'task', '', '', '1', '0', 'M', '0', '0', '', 'my-task', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11619', '鎴戠殑寰呭姙', '11618', '2', 'taskWaiting', 'workflow/task/taskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11632', '鎴戠殑宸插姙', '11618', '3', 'taskFinish', 'workflow/task/taskFinish', '', '1', '1', 'C', '0', '0', '', 'finish', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11633', '鎴戠殑鎶勯��', '11618', '4', 'taskCopyList', 'workflow/task/taskCopyList', '', '1', '1', 'C', '0', '0', '', 'my-copy', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11620', '娴佺▼瀹氫箟', '11616', '3', 'processDefinition', 'workflow/processDefinition/index', '', '1', '1', 'C', '0', '0', '', 'process-definition', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11621', '娴佺▼瀹炰緥', '11630', '1', 'processInstance', 'workflow/processInstance/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11622', '娴佺▼鍒嗙被', '11616', '1', 'category', 'workflow/category/index', '', '1', '0', 'C', '0', '0', 'workflow:category:list', 'category', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11629', '鎴戝彂璧风殑', '11618', '1', 'myDocument', 'workflow/task/myDocument', '', '1', '1', 'C', '0', '0', '', 'guide', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11630', '娴佺▼鐩戞帶', '11616', '4', 'monitor', '', '', '1', '0', 'M', '0', '0', '', 'monitor', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11631', '寰呭姙浠诲姟', '11630', '2', 'allTaskWaiting', 'workflow/task/allTaskWaiting', '', '1', '1', 'C', '0', '0', '', 'waiting', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11623', '娴佺▼鍒嗙被鏌ヨ', '11622', '1', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:query', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11624', '娴佺▼鍒嗙被鏂板', '11622', '2', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:add', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11625', '娴佺▼鍒嗙被淇敼', '11622', '3', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:edit', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11626', '娴佺▼鍒嗙被鍒犻櫎', '11622', '4', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:remove', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11627', '娴佺▼鍒嗙被瀵煎嚭', '11622', '5', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:category:export', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11638', '璇峰亣鐢宠', '5', '1', 'leave', 'workflow/leave/index', '', '1', '0', 'C', '0', '0', 'workflow:leave:list', '#', 103, 1, now(), NULL, NULL, '璇峰亣鐢宠鑿滃崟'); +INSERT INTO sys_menu VALUES ('11639', '璇峰亣鐢宠鏌ヨ', '11638', '1', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:query', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11640', '璇峰亣鐢宠鏂板', '11638', '2', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:add', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11641', '璇峰亣鐢宠淇敼', '11638', '3', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:edit', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11642', '璇峰亣鐢宠鍒犻櫎', '11638', '4', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:remove', '#', 103, 1, now(), NULL, NULL, ''); +INSERT INTO sys_menu VALUES ('11643', '璇峰亣鐢宠瀵煎嚭', '11638', '5', '#', '', '', '1', '0', 'F', '0', '0', 'workflow:leave:export', '#', 103, 1, now(), NULL, NULL, ''); --- 娴佺▼鍒嗙被淇℃伅琛� -create table wf_category -( - id bigint not null - constraint wf_category_pk - primary key, - category_name varchar(255), - category_code varchar(255), - parent_id bigint, - sort_num bigint, - tenant_id varchar(20), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp -); +INSERT INTO sys_dict_type VALUES (13, '000000', '涓氬姟鐘舵��', 'wf_business_status', 103, 1, now(), NULL, NULL, '涓氬姟鐘舵�佸垪琛�'); +INSERT INTO sys_dict_type VALUES (14, '000000', '琛ㄥ崟绫诲瀷', 'wf_form_type', 103, 1, now(), NULL, NULL, '琛ㄥ崟绫诲瀷鍒楄〃'); +INSERT INTO sys_dict_type VALUES (15, '000000', '浠诲姟鐘舵��', 'wf_task_status', 103, 1, now(), NULL, NULL, '浠诲姟鐘舵��'); +INSERT INTO sys_dict_data VALUES (39, '000000', 1, '宸叉挙閿�', 'cancel', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸叉挙閿�'); +INSERT INTO sys_dict_data VALUES (40, '000000', 2, '鑽夌', 'draft', 'wf_business_status', '', 'info', 'N', 103, 1, now(), NULL, NULL, '鑽夌'); +INSERT INTO sys_dict_data VALUES (41, '000000', 3, '寰呭鏍�', 'waiting', 'wf_business_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '寰呭鏍�'); +INSERT INTO sys_dict_data VALUES (42, '000000', 4, '宸插畬鎴�', 'finish', 'wf_business_status', '', 'success', 'N', 103, 1, now(), NULL, NULL, '宸插畬鎴�'); +INSERT INTO sys_dict_data VALUES (43, '000000', 5, '宸蹭綔搴�', 'invalid', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸蹭綔搴�'); +INSERT INTO sys_dict_data VALUES (44, '000000', 6, '宸查��鍥�', 'back', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸查��鍥�'); +INSERT INTO sys_dict_data VALUES (45, '000000', 7, '宸茬粓姝�', 'termination', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸茬粓姝�'); +INSERT INTO sys_dict_data VALUES (46, '000000', 1, '鑷畾涔夎〃鍗�', 'static', 'wf_form_type', '', 'success', 'N', 103, 1, now(), NULL, NULL, '鑷畾涔夎〃鍗�'); +INSERT INTO sys_dict_data VALUES (47, '000000', 2, '鍔ㄦ�佽〃鍗�', 'dynamic', 'wf_form_type', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '鍔ㄦ�佽〃鍗�'); +INSERT INTO sys_dict_data VALUES (48, '000000', 1, '鎾ら攢', 'cancel', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '鎾ら攢'); +INSERT INTO sys_dict_data VALUES (49, '000000', 2, '閫氳繃', 'pass', 'wf_task_status', '', 'success', 'N', 103, 1, now(), NULL, NULL, '閫氳繃'); +INSERT INTO sys_dict_data VALUES (50, '000000', 3, '寰呭鏍�', 'waiting', 'wf_task_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '寰呭鏍�'); +INSERT INTO sys_dict_data VALUES (51, '000000', 4, '浣滃簾', 'invalid', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '浣滃簾'); +INSERT INTO sys_dict_data VALUES (52, '000000', 5, '閫�鍥�', 'back', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '閫�鍥�'); +INSERT INTO sys_dict_data VALUES (53, '000000', 6, '缁堟', 'termination', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '缁堟'); +INSERT INTO sys_dict_data VALUES (54, '000000', 7, '杞姙', 'transfer', 'wf_task_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '杞姙'); +INSERT INTO sys_dict_data VALUES (55, '000000', 8, '濮旀墭', 'depute', 'wf_task_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '濮旀墭'); +INSERT INTO sys_dict_data VALUES (56, '000000', 9, '鎶勯��', 'copy', 'wf_task_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '鎶勯��'); +INSERT INTO sys_dict_data VALUES (57, '000000', 10, '鍔犵', 'sign', 'wf_task_status', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '鍔犵'); +INSERT INTO sys_dict_data VALUES (58, '000000', 11, '鍑忕', 'sign_off', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '鍑忕'); +INSERT INTO sys_dict_data VALUES (59, '000000', 11, '瓒呮椂', 'timeout', 'wf_task_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '瓒呮椂'); -comment on table wf_category is '娴佺▼鍒嗙被'; -comment on column wf_category.id is '涓婚敭'; -comment on column wf_category.category_name is '鍒嗙被鍚嶇О'; -comment on column wf_category.category_code is '鍒嗙被缂栫爜'; -comment on column wf_category.parent_id is '鐖剁骇id'; -comment on column wf_category.sort_num is '鎺掑簭'; -comment on column wf_category.tenant_id is '绉熸埛id'; -comment on column wf_category.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column wf_category.create_by is '鍒涘缓鑰�'; -comment on column wf_category.create_time is '鍒涘缓鏃堕棿'; -comment on column wf_category.update_by is '淇敼鑰�'; -comment on column wf_category.update_time is '淇敼鏃堕棿'; - -alter table wf_category - owner to postgres; - -create unique index uni_category_code - on wf_category (category_code); - -INSERT INTO wf_category values (1, 'OA', 'OA', 0, 0, '000000', 103, 1, now(), 1, now()); - -create table wf_task_back_node -( - id bigint not null - constraint pk_wf_task_back_node - primary key, - node_id varchar(255) not null, - node_name varchar(255) not null, - order_no bigint not null, - instance_id varchar(255) not null, - task_type varchar(255) not null, - assignee varchar(2000) not null, - tenant_id varchar(20), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp -); - -comment on table wf_task_back_node is '鑺傜偣瀹℃壒璁板綍'; -comment on column wf_task_back_node.id is '涓婚敭'; -comment on column wf_task_back_node.node_id is '鑺傜偣id'; -comment on column wf_task_back_node.node_name is '鑺傜偣鍚嶇О'; -comment on column wf_task_back_node.order_no is '鎺掑簭'; -comment on column wf_task_back_node.instance_id is '娴佺▼瀹炰緥id'; -comment on column wf_task_back_node.task_type is '鑺傜偣绫诲瀷'; -comment on column wf_task_back_node.assignee is '瀹℃壒浜�'; -comment on column wf_task_back_node.tenant_id is '绉熸埛id'; -comment on column wf_task_back_node.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column wf_task_back_node.create_by is '鍒涘缓鑰�'; -comment on column wf_task_back_node.create_time is '鍒涘缓鏃堕棿'; -comment on column wf_task_back_node.update_by is '淇敼鑰�'; -comment on column wf_task_back_node.update_time is '淇敼鏃堕棿'; - -alter table wf_task_back_node - owner to postgres; - -create table wf_definition_config -( - id bigint not null - constraint pk_wf_definition_config - primary key, - table_name varchar(255) not null, - definition_id varchar(255) not null, - process_key varchar(255) not null, - version bigint not null, - tenant_id varchar(20), - remark varchar(500), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp -); - -comment on table wf_definition_config is '娴佺▼瀹氫箟閰嶇疆'; -comment on column wf_definition_config.id is '涓婚敭'; -comment on column wf_definition_config.table_name is '琛ㄥ悕'; -comment on column wf_definition_config.definition_id is '娴佺▼瀹氫箟ID'; -comment on column wf_definition_config.process_key is '娴佺▼KEY'; -comment on column wf_definition_config.version is '娴佺▼鐗堟湰'; -comment on column wf_definition_config.tenant_id is '绉熸埛id'; -comment on column wf_definition_config.remark is '澶囨敞'; -comment on column wf_definition_config.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column wf_definition_config.create_by is '鍒涘缓鑰�'; -comment on column wf_definition_config.create_time is '鍒涘缓鏃堕棿'; -comment on column wf_definition_config.update_by is '淇敼鑰�'; -comment on column wf_definition_config.update_time is '淇敼鏃堕棿'; - -alter table wf_definition_config - owner to postgres; -create unique index uni_definition_id - on wf_definition_config (definition_id); - -create table wf_form_manage -( - id bigint not null - constraint pk_wf_form_manage - primary key, - form_name varchar(255) not null, - form_type varchar(255) not null, - router varchar(255) not null, - remark varchar(500), - tenant_id varchar(20), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp -); - -comment on table wf_form_manage is '琛ㄥ崟绠$悊'; -comment on column wf_form_manage.id is '涓婚敭'; -comment on column wf_form_manage.form_name is '琛ㄥ崟鍚嶇О'; -comment on column wf_form_manage.form_type is '琛ㄥ崟绫诲瀷'; -comment on column wf_form_manage.router is '璺敱鍦板潃/琛ㄥ崟ID'; -comment on column wf_form_manage.remark is '澶囨敞'; -comment on column wf_form_manage.tenant_id is '绉熸埛id'; -comment on column wf_form_manage.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column wf_form_manage.create_by is '鍒涘缓鑰�'; -comment on column wf_form_manage.create_time is '鍒涘缓鏃堕棿'; -comment on column wf_form_manage.update_by is '淇敼鑰�'; -comment on column wf_form_manage.update_time is '淇敼鏃堕棿'; - -insert into wf_form_manage(id, form_name, form_type, router, remark, tenant_id, create_dept, create_by, create_time, update_by, update_time) VALUES (1, '璇峰亣鐢宠', 'static', '/workflow/leaveEdit/index', NULL, '000000', 103, 1, now(), 1, now()); - -create table wf_node_config -( - id bigint not null - constraint pk_wf_node_config - primary key, - form_id bigint, - form_type varchar(255), - node_name varchar(255) not null, - node_id varchar(255) not null, - definition_id varchar(255) not null, - apply_user_task char(1) default '0', - tenant_id varchar(20), - create_dept bigint, - create_by bigint, - create_time timestamp, - update_by bigint, - update_time timestamp -); - -comment on table wf_node_config is '鑺傜偣閰嶇疆'; -comment on column wf_node_config.id is '涓婚敭'; -comment on column wf_node_config.form_id is '琛ㄥ崟id'; -comment on column wf_node_config.form_type is '琛ㄥ崟绫诲瀷'; -comment on column wf_node_config.node_id is '鑺傜偣id'; -comment on column wf_node_config.node_name is '鑺傜偣鍚嶇О'; -comment on column wf_node_config.definition_id is '娴佺▼瀹氫箟id'; -comment on column wf_node_config.apply_user_task is '鏄惁涓虹敵璇蜂汉鑺傜偣 锛�0鏄� 1鍚︼級'; -comment on column wf_node_config.tenant_id is '绉熸埛id'; -comment on column wf_node_config.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column wf_node_config.create_by is '鍒涘缓鑰�'; -comment on column wf_node_config.create_time is '鍒涘缓鏃堕棿'; -comment on column wf_node_config.update_by is '淇敼鑰�'; -comment on column wf_node_config.update_time is '淇敼鏃堕棿'; - -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11638, '璇峰亣鐢宠', 5, 1, 'leave', 'workflow/leave/index', 1, 0, 'C', '0', '0', 'workflow:leave:list', '#', 103, 1, now(), NULL, NULL, '璇峰亣鐢宠鑿滃崟'); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11639, '璇峰亣鐢宠鏌ヨ', 11638, 1, '#', '', 1, 0, 'F', '0', '0', 'workflow:leave:query', '#', 103, 1, now(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11640, '璇峰亣鐢宠鏂板', 11638, 2, '#', '', 1, 0, 'F', '0', '0', 'workflow:leave:add', '#', 103, 1, now(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11641, '璇峰亣鐢宠淇敼', 11638, 3, '#', '', 1, 0, 'F', '0', '0', 'workflow:leave:edit', '#', 103, 1, now(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11642, '璇峰亣鐢宠鍒犻櫎', 11638, 4, '#', '', 1, 0, 'F', '0', '0', 'workflow:leave:remove', '#', 103, 1, now(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (11643, '璇峰亣鐢宠瀵煎嚭', 11638, 5, '#', '', 1, 0, 'F', '0', '0', 'workflow:leave:export', '#', 103, 1, now(), NULL, NULL, ''); - -INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (13, '000000', '涓氬姟鐘舵��', 'wf_business_status', 103, 1, now(), NULL, NULL, '涓氬姟鐘舵�佸垪琛�'); -INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (14, '000000', '琛ㄥ崟绫诲瀷', 'wf_form_type', 103, 1, now(), NULL, NULL, '琛ㄥ崟绫诲瀷鍒楄〃'); - -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (39, '000000', 1, '宸叉挙閿�', 'cancel', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸叉挙閿�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (40, '000000', 2, '鑽夌', 'draft', 'wf_business_status', '', 'info', 'N', 103, 1, now(), NULL, NULL, '鑽夌'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (41, '000000', 3, '寰呭鏍�', 'waiting', 'wf_business_status', '', 'primary', 'N', 103, 1,now(), NULL, NULL, '寰呭鏍�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (42, '000000', 4, '宸插畬鎴�', 'finish', 'wf_business_status', '', 'success', 'N', 103, 1, now(), NULL, NULL, '宸插畬鎴�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (43, '000000', 5, '宸蹭綔搴�', 'invalid', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸蹭綔搴�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (44, '000000', 6, '宸查��鍥�', 'back', 'wf_business_status', '', 'danger', 'N', 103, 1, now(), NULL, NULL, '宸查��鍥�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (45, '000000', 7, '宸茬粓姝�', 'termination', 'wf_business_status', '', 'danger', 'N', 103, 1,now(), NULL, NULL, '宸茬粓姝�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (46, '000000', 1, '鑷畾涔夎〃鍗�', 'static', 'wf_form_type', '', 'success', 'N', 103, 1, now(), NULL, NULL, '鑷畾涔夎〃鍗�'); -INSERT INTO sys_dict_data(dict_code, tenant_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (47, '000000', 2, '鍔ㄦ�佽〃鍗�', 'dynamic', 'wf_form_type', '', 'primary', 'N', 103, 1, now(), NULL, NULL, '鍔ㄦ�佽〃鍗�'); - --- 琛ㄥ崟绠$悊 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11628, '琛ㄥ崟绠$悊', '11616', '5', 'formManage', 'workflow/formManage/index', 1, 0, 'C', '0', '0', 'workflow:formManage:list', 'tree-table', 103, 1, now(), null, null, '琛ㄥ崟绠$悊鑿滃崟'); - --- 琛ㄥ崟绠$悊鎸夐挳 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11644, '琛ㄥ崟绠$悊鏌ヨ', 11628, '1', '#', '', 1, 0, 'F', '0', '0', 'workflow:formManage:query', '', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11645, '琛ㄥ崟绠$悊鏂板', 11628, '2', '#', '', 1, 0, 'F', '0', '0', 'workflow:formManage:add', '', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11646, '琛ㄥ崟绠$悊淇敼', 11628, '3', '#', '', 1, 0, 'F', '0', '0', 'workflow:formManage:edit', '', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11647, '琛ㄥ崟绠$悊鍒犻櫎', 11628, '4', '#', '', 1, 0, 'F', '0', '0', 'workflow:formManage:remove', '', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(11648, '琛ㄥ崟绠$悊瀵煎嚭', 11628, '5', '#', '', 1, 0, 'F', '0', '0', 'workflow:formManage:export', 'tree-table', 103, 1, now(), null, null, ''); -- Gitblit v1.9.3