diff --git a/数据库脚本/MySql.sql b/数据库脚本/MySql.sql index 892073de..c8154563 100644 --- a/数据库脚本/MySql.sql +++ b/数据库脚本/MySql.sql @@ -364,6 +364,33 @@ INSERT INTO `flowinstance` VALUES ('d4f8d2b9-6374-4c10-8d3c-1ca540bc309b', '', ' INSERT INTO `flowinstance` VALUES ('df6df6b5-53f7-4db4-931b-12e3352ef413', '', '1564334658879', '按角色执行2019-07-29 01:24:21', '1564334332325', 2, '管理员', '1564334327861', '{\"title\":\"newFlow_1\",\"nodes\":[{\"name\":\"node_1\",\"left\":99,\"top\":32,\"type\":\"start round mix\",\"id\":\"1564334327861\",\"width\":26,\"height\":26,\"alt\":true},{\"name\":\"node_2\",\"left\":70,\"top\":295,\"type\":\"end round\",\"id\":\"1564334330157\",\"width\":26,\"height\":26,\"alt\":true},{\"name\":\"管理员\",\"left\":43,\"top\":131,\"type\":\"node\",\"id\":\"1564334332325\",\"width\":104,\"height\":36,\"alt\":true,\"setInfo\":{\"NodeConfluenceType\":\"all\",\"NodeDesignate\":\"SPECIAL_ROLE\",\"ThirdPartyUrl\":\"\",\"NodeDesignateData\":{\"users\":[],\"roles\":[\"09ee2ffa-7463-4938-ae0b-1cb4e80c7c13\"]}}},{\"name\":\"测试人员\",\"left\":185,\"top\":226,\"type\":\"node\",\"id\":\"1564334333133\",\"width\":104,\"height\":36,\"alt\":true,\"setInfo\":{\"NodeConfluenceType\":\"all\",\"NodeDesignate\":\"SPECIAL_ROLE\",\"ThirdPartyUrl\":\"\",\"NodeDesignateData\":{\"users\":[],\"roles\":[\"0a7ebd0c-78d6-4fbc-8fbe-6fc25c3a932d\"]}}}],\"lines\":[{\"type\":\"sl\",\"from\":\"1564334327861\",\"to\":\"1564334332325\",\"id\":\"1564334335789\",\"name\":\"\",\"dash\":false,\"alt\":true},{\"type\":\"sl\",\"from\":\"1564334332325\",\"to\":\"1564334333133\",\"id\":\"1564334336629\",\"name\":\"\",\"dash\":false,\"alt\":true},{\"type\":\"sl\",\"from\":\"1564334333133\",\"to\":\"1564334330157\",\"id\":\"1564334337805\",\"name\":\"\",\"dash\":false,\"alt\":true}],\"areas\":[],\"initNum\":9}', '0b21f59c-7809-4275-acb4-8e8c08e0167e', '', '{\"REASON\":\"身体原因\",\"DAYS\":\"1\",\"CUSTOME_NAME\":\"玉宝\"}', 0, '[{\"type\":\"text\",\"name\":\"REASON\",\"title\":\"REASON\",\"value\":\"身体原因\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"\"},{\"leipiplugins\":\"select\",\"name\":\"DAYS\",\"title\":\"DAYS\",\"size\":\"1\",\"orgwidth\":\"150\",\"style\":\"width: 150px;\",\"value\":\"1,3,5,10\",\"selected\":\"selected\",\"content\":\" \"},{\"type\":\"text\",\"name\":\"CUSTOME_NAME\",\"title\":\"CUSTOME_NAME\",\"value\":\"玉宝\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"\"}]', '
请假条
因{REASON},本人想请假{DAYS}天,望领导批准!
谢谢!
申请人:{CUSTOME_NAME}
', 'ef89f96a-af33-407c-b02e-897faf46ecf0', '', 0, '2019-07-29 01:24:26', '00000000-0000-0000-0000-000000000000', 'System', 0, '', 0, '49df1602-f5f3-4d52-afb7-3802da619558', NULL); INSERT INTO `flowinstance` VALUES ('ee589689-3ae0-4037-abec-ba70e566da16', '', '1564334720434', '普通的请假2019-07-29 01:25:24', '1564334035352', 2, '所有人可以审批', '1564334032785', '{\"title\":\"newFlow_1\",\"initNum\":9,\"lines\":[{\"id\":\"1564334041040\",\"type\":\"sl\",\"from\":\"1564334032785\",\"to\":\"1564334035352\",\"name\":\"\",\"dash\":false,\"Compares\":null},{\"id\":\"1564334041720\",\"type\":\"sl\",\"from\":\"1564334035352\",\"to\":\"1564334036152\",\"name\":\"\",\"dash\":false,\"Compares\":null},{\"id\":\"1564334042927\",\"type\":\"sl\",\"from\":\"1564334036152\",\"to\":\"1564334038904\",\"name\":\"\",\"dash\":false,\"Compares\":null}],\"nodes\":[{\"id\":\"1564334032785\",\"name\":\"node_1\",\"type\":\"start round mix\",\"left\":19,\"top\":36,\"width\":26,\"height\":26,\"alt\":true,\"setInfo\":null},{\"id\":\"1564334035352\",\"name\":\"所有人可以审批\",\"type\":\"node\",\"left\":133,\"top\":50,\"width\":104,\"height\":56,\"alt\":true,\"setInfo\":{\"NodeDesignate\":\"ALL_USER\",\"NodeDesignateData\":{\"users\":[],\"roles\":[],\"orgs\":null},\"NodeCode\":null,\"NodeName\":null,\"ThirdPartyUrl\":\"http://xxxx.com/api/workflow/callback\",\"NodeRejectType\":null,\"Taged\":2,\"UserName\":\"test\",\"UserId\":\"6ba79766-faa0-4259-8139-a4a6d35784e0\",\"Description\":\"最近有很多事情要处理\",\"TagedTime\":\"2019-07-29 01:28\",\"NodeConfluenceType\":\"all\",\"ConfluenceOk\":null,\"ConfluenceNo\":null}},{\"id\":\"1564334036152\",\"name\":\"所有人可以审批\",\"type\":\"node\",\"left\":139,\"top\":123,\"width\":104,\"height\":56,\"alt\":true,\"setInfo\":{\"NodeDesignate\":\"ALL_USER\",\"NodeDesignateData\":{\"users\":[],\"roles\":[],\"orgs\":null},\"NodeCode\":null,\"NodeName\":null,\"ThirdPartyUrl\":\"\",\"NodeRejectType\":null,\"Taged\":null,\"UserName\":null,\"UserId\":null,\"Description\":null,\"TagedTime\":null,\"NodeConfluenceType\":\"all\",\"ConfluenceOk\":null,\"ConfluenceNo\":null}},{\"id\":\"1564334038904\",\"name\":\"node_4\",\"type\":\"end round\",\"left\":47,\"top\":193,\"width\":26,\"height\":26,\"alt\":true,\"setInfo\":null}],\"areas\":[]}', '61806396-9498-492b-bc22-9f9e95a389bc', '', '{\"REASON\":\"身体原因\",\"DAYS\":\"1\",\"CUSTOME_NAME\":\"玉宝\"}', 0, '[{\"type\":\"text\",\"name\":\"REASON\",\"title\":\"REASON\",\"value\":\"身体原因\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"\"},{\"leipiplugins\":\"select\",\"name\":\"DAYS\",\"title\":\"DAYS\",\"size\":\"1\",\"orgwidth\":\"150\",\"style\":\"width: 150px;\",\"value\":\"1,3,5,10\",\"selected\":\"selected\",\"content\":\" \"},{\"type\":\"text\",\"name\":\"CUSTOME_NAME\",\"title\":\"CUSTOME_NAME\",\"value\":\"玉宝\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"\"}]', '请假条
因{REASON},本人想请假{DAYS}天,望领导批准!
谢谢!
申请人:{CUSTOME_NAME}
', 'ef89f96a-af33-407c-b02e-897faf46ecf0', '', 0, '2019-07-29 01:25:30', '00000000-0000-0000-0000-000000000000', 'System', 0, '', 3, '1', NULL); + + +DROP TABLE IF EXISTS flowapprover; +CREATE TABLE flowapprover( + `Id` VARCHAR(50) NOT NULL COMMENT 'Id' , + `InstanceId` VARCHAR(50) NOT NULL COMMENT '工作流实例Id' , + `ActivityId` VARCHAR(50) NOT NULL COMMENT '当前节点ID' , + `Reason` VARCHAR(200) COMMENT '加签原因' , + `CreateDate` DATETIME COMMENT '加签时间' , + `CreateUserId` VARCHAR(50) COMMENT '加签人Id' , + `CreateUserName` VARCHAR(50) COMMENT '加签人' , + `Status` INT NOT NULL COMMENT '状态(0未处理,1通过,2未通过,3驳回)' , + `ApproveType` INT NOT NULL COMMENT '类型(0顺序,1并行且,2并行或)' , + `ApproverId` VARCHAR(50) NOT NULL COMMENT '审批人ID' , + `ApproverName` VARCHAR(50) COMMENT '审批人' , + `OrderNo` INT COMMENT '顺序号(当类型为0时)' , + `VerifyDate` DATETIME COMMENT '审批日期' , + `VerifyComment` VARCHAR(200) COMMENT '审批意见' , + `CascadeId` VARCHAR(100) NOT NULL COMMENT '层级ID,应对多次加签' , + `ParentId` VARCHAR(50) COMMENT '父节点ID,应对多次加签' , + `ParentName` VARCHAR(100) COMMENT '父节点名称,应对多次加签结构' , + `Name` VARCHAR(100) COMMENT '加签节点名称,应对多次加签结构' , + PRIMARY KEY (Id) +) COMMENT = '工作流加签'; + + + -- ---------------------------- -- Table structure for flowinstanceoperationhistory -- ---------------------------- diff --git a/数据库脚本/Oracle.sql b/数据库脚本/Oracle.sql index 5b6dad92..ce2c811a 100644 --- a/数据库脚本/Oracle.sql +++ b/数据库脚本/Oracle.sql @@ -43,6 +43,50 @@ COMMENT ON TABLE "Application" IS '应用'; INSERT INTO "Application" VALUES ('110', 'OpenAuth.Net', 'openauthdotnetyubaolee', '最好用的.NET权限工作流框架', NULL, '0', TO_DATE('2018-04-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL); INSERT INTO "Application" VALUES ('119', 'XXX管理平台', 'manageryubaolee', '这是一个第三的平台', NULL, '0', TO_DATE('2018-04-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL); +CREATE TABLE FlowApprover( + Id VARCHAR2(50) NOT NULL, + InstanceId VARCHAR2(50) NOT NULL, + ActivityId VARCHAR2(50) NOT NULL, + Reason VARCHAR2(200), + CreateDate DATE, + CreateUserId VARCHAR2(50), + CreateUserName VARCHAR2(50), + Status INT NOT NULL, + ApproveType INT NOT NULL, + ApproverId VARCHAR2(50) NOT NULL, + ApproverName VARCHAR2(50), + OrderNo INT, + VerifyDate DATE, + VerifyComment VARCHAR2(200), + CascadeId VARCHAR2(100) NOT NULL, + ParentId VARCHAR2(50), + ParentName VARCHAR2(100), + Name VARCHAR2(100), + PRIMARY KEY (Id) +); + +COMMENT ON TABLE FlowApprover IS '工作流加签'; +COMMENT ON COLUMN FlowApprover.Id IS 'Id'; +COMMENT ON COLUMN FlowApprover.InstanceId IS '工作流实例Id'; +COMMENT ON COLUMN FlowApprover.ActivityId IS '当前节点ID'; +COMMENT ON COLUMN FlowApprover.Reason IS '加签原因'; +COMMENT ON COLUMN FlowApprover.CreateDate IS '加签时间'; +COMMENT ON COLUMN FlowApprover.CreateUserId IS '加签人Id'; +COMMENT ON COLUMN FlowApprover.CreateUserName IS '加签人'; +COMMENT ON COLUMN FlowApprover.Status IS '状态(0未处理,1通过,2未通过,3驳回)'; +COMMENT ON COLUMN FlowApprover.ApproveType IS '类型(0顺序,1并行且,2并行或)'; +COMMENT ON COLUMN FlowApprover.ApproverId IS '审批人ID'; +COMMENT ON COLUMN FlowApprover.ApproverName IS '审批人'; +COMMENT ON COLUMN FlowApprover.OrderNo IS '顺序号(当类型为0时)'; +COMMENT ON COLUMN FlowApprover.VerifyDate IS '审批日期'; +COMMENT ON COLUMN FlowApprover.VerifyComment IS '审批意见'; +COMMENT ON COLUMN FlowApprover.CascadeId IS '层级ID,应对多次加签'; +COMMENT ON COLUMN FlowApprover.ParentId IS '父节点ID,应对多次加签'; +COMMENT ON COLUMN FlowApprover.ParentName IS '父节点名称,应对多次加签结构'; +COMMENT ON COLUMN FlowApprover.Name IS '加签节点名称,应对多次加签结构'; + + + -- ---------------------------- -- Table structure for BuilderTable -- ---------------------------- diff --git a/数据库脚本/SqlServer.sql b/数据库脚本/SqlServer.sql index 795f4036..7594c666 100644 --- a/数据库脚本/SqlServer.sql +++ b/数据库脚本/SqlServer.sql @@ -98,6 +98,50 @@ GO INSERT INTO [dbo].[Application] ([Id], [Name], [AppSecret], [Description], [Icon], [Disable], [CreateTime], [CreateUser]) VALUES (N'119', N'XXX管理平台', N'manageryubaolee', N'这是一个第三的平台', NULL, N'0', N'2018-04-14', NULL) GO +IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[FlowApprover]') AND type in (N'U')) DROP TABLE [dbo].[FlowApprover]; +CREATE TABLE [dbo].[FlowApprover]( + Id VARCHAR(50) NOT NULL, + InstanceId VARCHAR(50) NOT NULL, + ActivityId VARCHAR(50) NOT NULL, + Reason VARCHAR(200), + CreateDate DATETIME, + CreateUserId VARCHAR(50), + CreateUserName VARCHAR(50), + Status INT NOT NULL, + ApproveType INT NOT NULL, + ApproverId VARCHAR(50) NOT NULL, + ApproverName VARCHAR(50), + OrderNo INT, + VerifyDate DATETIME, + VerifyComment VARCHAR(200), + CascadeId VARCHAR(100) NOT NULL, + ParentId VARCHAR(50), + ParentName VARCHAR(100), + Name VARCHAR(100), + PRIMARY KEY (Id) +); + +EXEC sp_addextendedproperty 'MS_Description', '工作流加签', 'SCHEMA', dbo, 'table', FlowApprover, null, null; +EXEC sp_addextendedproperty 'MS_Description', 'Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Id; +EXEC sp_addextendedproperty 'MS_Description', '工作流实例Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', InstanceId; +EXEC sp_addextendedproperty 'MS_Description', '当前节点ID', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ActivityId; +EXEC sp_addextendedproperty 'MS_Description', '加签原因', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Reason; +EXEC sp_addextendedproperty 'MS_Description', '加签时间', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateDate; +EXEC sp_addextendedproperty 'MS_Description', '加签人Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateUserId; +EXEC sp_addextendedproperty 'MS_Description', '加签人', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateUserName; +EXEC sp_addextendedproperty 'MS_Description', '状态(0未处理,1通过,2未通过,3驳回)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Status; +EXEC sp_addextendedproperty 'MS_Description', '类型(0顺序,1并行且,2并行或)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproveType; +EXEC sp_addextendedproperty 'MS_Description', '审批人ID', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproverId; +EXEC sp_addextendedproperty 'MS_Description', '审批人', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproverName; +EXEC sp_addextendedproperty 'MS_Description', '顺序号(当类型为0时)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', OrderNo; +EXEC sp_addextendedproperty 'MS_Description', '审批日期', 'SCHEMA', dbo, 'table', FlowApprover, 'column', VerifyDate; +EXEC sp_addextendedproperty 'MS_Description', '审批意见', 'SCHEMA', dbo, 'table', FlowApprover, 'column', VerifyComment; +EXEC sp_addextendedproperty 'MS_Description', '层级ID,应对多次加签', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CascadeId; +EXEC sp_addextendedproperty 'MS_Description', '父节点ID,应对多次加签', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ParentId; +EXEC sp_addextendedproperty 'MS_Description', '父节点名称,应对多次加签结构', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ParentName; +EXEC sp_addextendedproperty 'MS_Description', '加签节点名称,应对多次加签结构', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Name; + + -- ---------------------------- -- Table structure for BuilderTable diff --git a/数据库脚本/postgreSql.sql b/数据库脚本/postgreSql.sql index 141d3570..53cc8521 100644 --- a/数据库脚本/postgreSql.sql +++ b/数据库脚本/postgreSql.sql @@ -31,6 +31,50 @@ COMMENT ON TABLE "public"."Application" IS '应用'; INSERT INTO "public"."Application" VALUES ('110', 'OpenAuth.Net', 'openauthdotnetyubaolee', '最好用的.NET权限工作流框架', NULL, 0, '2018-04-14', NULL); INSERT INTO "public"."Application" VALUES ('119', 'XXX管理平台', 'manageryubaolee', '这是一个第三的平台', NULL, 0, '2018-04-14', NULL); +DROP TABLE IF EXISTS FlowApprover; +CREATE TABLE FlowApprover( + Id VARCHAR(50) NOT NULL, + InstanceId VARCHAR(50) NOT NULL, + ActivityId VARCHAR(50) NOT NULL, + Reason VARCHAR(200), + CreateDate TIMESTAMP, + CreateUserId VARCHAR(50), + CreateUserName VARCHAR(50), + Status INTEGER NOT NULL, + ApproveType INTEGER NOT NULL, + ApproverId VARCHAR(50) NOT NULL, + ApproverName VARCHAR(50), + OrderNo INTEGER, + VerifyDate TIMESTAMP, + VerifyComment VARCHAR(200), + CascadeId VARCHAR(100) NOT NULL, + ParentId VARCHAR(50), + ParentName VARCHAR(100), + Name VARCHAR(100), + PRIMARY KEY (Id) +); + +COMMENT ON TABLE FlowApprover IS '工作流加签'; +COMMENT ON COLUMN FlowApprover.Id IS 'Id'; +COMMENT ON COLUMN FlowApprover.InstanceId IS '工作流实例Id'; +COMMENT ON COLUMN FlowApprover.ActivityId IS '当前节点ID'; +COMMENT ON COLUMN FlowApprover.Reason IS '加签原因'; +COMMENT ON COLUMN FlowApprover.CreateDate IS '加签时间'; +COMMENT ON COLUMN FlowApprover.CreateUserId IS '加签人Id'; +COMMENT ON COLUMN FlowApprover.CreateUserName IS '加签人'; +COMMENT ON COLUMN FlowApprover.Status IS '状态(0未处理,1通过,2未通过,3驳回)'; +COMMENT ON COLUMN FlowApprover.ApproveType IS '类型(0顺序,1并行且,2并行或)'; +COMMENT ON COLUMN FlowApprover.ApproverId IS '审批人ID'; +COMMENT ON COLUMN FlowApprover.ApproverName IS '审批人'; +COMMENT ON COLUMN FlowApprover.OrderNo IS '顺序号(当类型为0时)'; +COMMENT ON COLUMN FlowApprover.VerifyDate IS '审批日期'; +COMMENT ON COLUMN FlowApprover.VerifyComment IS '审批意见'; +COMMENT ON COLUMN FlowApprover.CascadeId IS '层级ID,应对多次加签'; +COMMENT ON COLUMN FlowApprover.ParentId IS '父节点ID,应对多次加签'; +COMMENT ON COLUMN FlowApprover.ParentName IS '父节点名称,应对多次加签结构'; +COMMENT ON COLUMN FlowApprover.Name IS '加签节点名称,应对多次加签结构'; + + -- ---------------------------- -- Table structure for BuilderTable -- ----------------------------