构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-工作流设计01

工作流在实际应用中还是比较广泛,网络中存在很多工作流的图形化插件,可以做到拉拽的工作流设计,非常简便,再配合第三方编辑器,可以直接生成表单,我没有刻意的浏览很多工作流的实际设计,我认为工作流只要有动态可修改的流转,有时可按角色,部门,上级或者职位流转即是比较好的正常工作流!

工作流其实有几种,也可以设计得很简单:

1.固定的工作流,很小的公司,很固定的流程!

2.自定义表单和字段,有时候可以校验表单

3.自定义流转的人员,即按角色流转,用户每一次提交工作流都必须在步骤中添加要转的人员

4.直接设置职位和部门,然后根据人员所属的部门、职位或者上级进行流转

上面可以是一个交集,只有4点合起来才能做一个比较动态的工作流,否则可以直接用固定的工作流即可

这是本次要做的一般大众化工作流

当生成表单之后,用户将直接用此表单的模版,并提交公文到下一步,最后流程完成后,反馈给发起人

数据库的设计也有这巧妙之处

Flow_Form:表单模版

Flow_Step:表单的流转步骤,如请假天数小于3天直接上级审批,大于3天需要进行第二步的老总审批

Flow_StepRule:根据字段决定流转的条件

Flow_StepState:正在进行的步骤状态,如第一步是否完成

Flow_Type:工作流种类,如行政管理

Flow_FormAttr:字段,如请假的标题,请假的天数

Flow_FormCentent:根据模版提交的内容

USE [AppDB]
GO
/****** Object:  Table [dbo].[Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_Type](
    [Id] [varchar](50) NOT NULL,
    [Name] [varchar](50) NOT NULL,
    [Remark] [varchar](500) NULL,
    [CreateTime] [datetime] NOT NULL,
    [Sort] [int] NOT NULL,
 CONSTRAINT [PK_Flow_Type] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘类别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘说明‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘排序‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Sort‘
GO
/****** Object:  Table [dbo].[Flow_FormAttr]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_FormAttr](
    [Id] [varchar](50) NOT NULL,
    [Title] [varchar](50) NOT NULL,
    [Name] [varchar](50) NOT NULL,
    [AttrType] [varchar](50) NOT NULL,
    [CheckJS] [varchar](500) NULL,
    [TypeId] [varchar](50) NOT NULL,
    [CreateTime] [datetime] NULL,
    [OptionList] [varchar](500) NULL,
    [IsValid] [bit] NULL,
 CONSTRAINT [PK_Flow_FormAttr] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘字段标题‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Title‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘字段英文名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘文本,日期,数字,多行文本‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘AttrType‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘校验脚本‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘CheckJS‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘所属类别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘TypeId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘下拉框的值‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘OptionList‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘是否必填‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘IsValid‘
GO
/****** Object:  Table [dbo].[Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_Form](
    [Id] [varchar](50) NOT NULL,
    [Name] [varchar](100) NOT NULL,
    [Remark] [varchar](500) NULL,
    [UsingDep] [varchar](2000) NULL,
    [TypeId] [varchar](50) NOT NULL,
    [State] [bit] NOT NULL,
    [CreateTime] [datetime] NULL,
    [HtmlForm] [text] NULL,
    [AttrA] [varchar](50) NULL,
    [AttrB] [varchar](50) NULL,
    [AttrC] [varchar](50) NULL,
    [AttrD] [varchar](50) NULL,
    [AttrE] [varchar](50) NULL,
    [AttrF] [varchar](50) NULL,
    [AttrG] [varchar](50) NULL,
    [AttrH] [varchar](50) NULL,
    [AttrI] [varchar](50) NULL,
    [AttrJ] [varchar](50) NULL,
    [AttrK] [varchar](50) NULL,
    [AttrL] [varchar](50) NULL,
    [AttrM] [varchar](50) NULL,
    [AttrN] [varchar](50) NULL,
    [AttrO] [varchar](50) NULL,
    [AttrP] [varchar](50) NULL,
    [AttrQ] [varchar](50) NULL,
    [AttrR] [varchar](50) NULL,
    [AttrS] [varchar](50) NULL,
    [AttrT] [varchar](50) NULL,
    [AttrU] [varchar](50) NULL,
    [AttrV] [varchar](50) NULL,
    [AttrW] [varchar](50) NULL,
    [AttrX] [varchar](50) NULL,
    [AttrY] [varchar](50) NULL,
    [AttrZ] [varchar](50) NULL,
 CONSTRAINT [PK_Flow_Form] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘是否完成流程‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Form‘, @level2type=N‘COLUMN‘,@level2name=N‘State‘
GO
/****** Object:  Table [dbo].[Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_Step](
    [Id] [varchar](50) NOT NULL,
    [Name] [varchar](50) NOT NULL,
    [Remark] [varchar](500) NULL,
    [Sort] [int] NOT NULL,
    [FormId] [varchar](50) NOT NULL,
    [FlowRule] [varchar](50) NOT NULL,
    [IsCustom] [bit] NOT NULL,
    [IsAllCheck] [bit] NOT NULL,
    [Execution] [varchar](4000) NULL,
    [CompulsoryOver] [bit] NOT NULL,
    [IsEditAttr] [bit] NOT NULL,
 CONSTRAINT [PK_Flow_Step] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘步骤名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘步骤说明‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘排序‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Sort‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘所属表单‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘FormId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘流转规则‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘FlowRule‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘该流程的 发起人/创建者 是否可以 自行选择 该步骤的审批者‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsCustom‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘当规则或者角色被选择为多人时候,是否启用多人审核才通过‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsAllCheck‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘执行者与规则对应‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Execution‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘是否可以强制完成整个流程‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘CompulsoryOver‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘审核者是否可以编辑发起者的附件‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsEditAttr‘
GO
/****** Object:  Table [dbo].[Flow_FormContent]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_FormContent](
    [Id] [varchar](50) NOT NULL,
    [UserId] [varchar](50) NOT NULL,
    [FormId] [varchar](50) NOT NULL,
    [FormLevel] [varchar](50) NOT NULL,
    [CreateTime] [datetime] NOT NULL,
    [AttrA] [varchar](2048) NULL,
    [AttrB] [varchar](2048) NULL,
    [AttrC] [varchar](2048) NULL,
    [AttrD] [varchar](2048) NULL,
    [AttrE] [varchar](2048) NULL,
    [AttrF] [varchar](2048) NULL,
    [AttrG] [varchar](2048) NULL,
    [AttrH] [varchar](2048) NULL,
    [AttrI] [varchar](2048) NULL,
    [AttrJ] [varchar](2048) NULL,
    [AttrK] [varchar](2048) NULL,
    [AttrL] [varchar](2048) NULL,
    [AttrM] [varchar](2048) NULL,
    [AttrN] [varchar](2048) NULL,
    [AttrO] [varchar](2048) NULL,
    [AttrP] [varchar](2048) NULL,
    [AttrQ] [varchar](2048) NULL,
    [AttrR] [varchar](2048) NULL,
    [AttrS] [varchar](2048) NULL,
    [AttrT] [varchar](2048) NULL,
    [AttrU] [varchar](2048) NULL,
    [AttrV] [varchar](2048) NULL,
    [AttrW] [varchar](2048) NULL,
    [AttrX] [varchar](2048) NULL,
    [AttrY] [varchar](2048) NULL,
    [AttrZ] [varchar](2048) NULL,
 CONSTRAINT [PK_Flow_FormContent] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘发起用户‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘UserId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘对应表单‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘FormId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘公文级别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘FormLevel‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘
GO
/****** Object:  Table [dbo].[Flow_StepState]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_StepState](
    [Id] [varchar](50) NOT NULL,
    [ContentId] [varchar](50) NOT NULL,
    [StepId] [varchar](50) NOT NULL,
    [State] [int] NULL,
    [Remark] [varchar](2000) NULL,
    [AttrFile] [varchar](200) NULL,
    [CreateTime] [datetime] NULL,
    [TheSeal] [varchar](200) NULL,
 CONSTRAINT [PK_Flow_StepState] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘所属公文‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘ContentId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘所属步骤‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘StepId‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘0不通过1通过null审核中‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘State‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘附加内容‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘附件‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘AttrFile‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘
GO
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘印章位置‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘TheSeal‘
GO
/****** Object:  Table [dbo].[Flow_StepRule]    Script Date: 08/05/2014 10:24:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_StepRule](
    [Id] [varchar](50) NOT NULL,
    [StepId] [varchar](50) NOT NULL,
    [AttrId] [varchar](50) NOT NULL,
    [Operator] [varchar](10) NOT NULL,
    [Result] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Flow_StepRule] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Default [DF_Flow_FormContent_DrafText_Time]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_FormContent] ADD  CONSTRAINT [DF_Flow_FormContent_DrafText_Time]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  ForeignKey [FK_Flow_Form_Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_Form]  WITH CHECK ADD  CONSTRAINT [FK_Flow_Form_Flow_Type] FOREIGN KEY([TypeId])
REFERENCES [dbo].[Flow_Type] ([Id])
GO
ALTER TABLE [dbo].[Flow_Form] CHECK CONSTRAINT [FK_Flow_Form_Flow_Type]
GO
/****** Object:  ForeignKey [FK_Flow_FormAttr_Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_FormAttr]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormAttr_Flow_Type] FOREIGN KEY([TypeId])
REFERENCES [dbo].[Flow_Type] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormAttr] CHECK CONSTRAINT [FK_Flow_FormAttr_Flow_Type]
GO
/****** Object:  ForeignKey [FK_Flow_FormContent_Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_FormContent]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormContent_Flow_Form] FOREIGN KEY([FormId])
REFERENCES [dbo].[Flow_Form] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormContent] CHECK CONSTRAINT [FK_Flow_FormContent_Flow_Form]
GO
/****** Object:  ForeignKey [FK_Flow_FormContent_SysUser]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_FormContent]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormContent_SysUser] FOREIGN KEY([UserId])
REFERENCES [dbo].[SysUser] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormContent] CHECK CONSTRAINT [FK_Flow_FormContent_SysUser]
GO
/****** Object:  ForeignKey [FK_Flow_Step_Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_Step]  WITH CHECK ADD  CONSTRAINT [FK_Flow_Step_Flow_Form] FOREIGN KEY([FormId])
REFERENCES [dbo].[Flow_Form] ([Id])
GO
ALTER TABLE [dbo].[Flow_Step] CHECK CONSTRAINT [FK_Flow_Step_Flow_Form]
GO
/****** Object:  ForeignKey [FK_Flow_StepRule_Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_StepRule]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepRule_Flow_Step] FOREIGN KEY([StepId])
REFERENCES [dbo].[Flow_Step] ([Id])
GO
ALTER TABLE [dbo].[Flow_StepRule] CHECK CONSTRAINT [FK_Flow_StepRule_Flow_Step]
GO
/****** Object:  ForeignKey [FK_Flow_StepState_Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_StepState]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepState_Flow_Step] FOREIGN KEY([StepId])
REFERENCES [dbo].[Flow_Step] ([Id])
GO
ALTER TABLE [dbo].[Flow_StepState] CHECK CONSTRAINT [FK_Flow_StepState_Flow_Step]
GO
/****** Object:  ForeignKey [FK_Flow_StepState_Flow_StepState]    Script Date: 08/05/2014 10:24:41 ******/
ALTER TABLE [dbo].[Flow_StepState]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepState_Flow_StepState] FOREIGN KEY([ContentId])
REFERENCES [dbo].[Flow_FormContent] ([Id])
GO
ALTER TABLE [dbo].[Flow_StepState] CHECK CONSTRAINT [FK_Flow_StepState_Flow_StepState]
GO

数据字典

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-工作流设计01

时间: 2024-11-11 08:25:43

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-工作流设计01的相关文章

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(35)-文章发布系统②-构建项目

注:阅读本文,需要阅读本系列的之前文章 代码生成器下载地址(文章开头处) 接下来我们建立数据库的表和各层的代码 我们只需要两张表,文章列表(MIS_Article)和类别表(MIS_Article_Category) USE [AppDB] GO /****** Object: Table [dbo].[MIS_Article] Script Date: 05/15/2014 17:33:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(36)-文章发布系统③-kindeditor使用

我相信目前国内富文本编辑器中KindEditor 属于前列,详细的中文帮助文档,简单的加载方式,可以定制的轻量级.都是系统的首选 很多文章教程有kindeditor的使用,但本文比较特别可能带有,上传文件的缩略图和水印的源码!这块也是比较复杂和备受关注的功能 一.下载编辑器 KindEditor 4.1.10 (2013-11-23) [1143KB] 官方最新版 或者: http://www.kindsoft.net/down.php 二.添加到项目 解压 kindeditor-x.x.x.z

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(38)-Easyui-accordion+tree漂亮的菜单导航

本节主要知识点是easyui 的手风琴加树结构做菜单导航 有园友抱怨原来菜单非常难看,但是基于原有树形无限级别的设计,没有办法只能已树形展示 先来看原来的效果 改变后的效果,当然我已经做好了,最后只放出代码供大家参考,其实网上也有这方面的资料,但是不是很好用,我还是自己写了 改变后的效果 手风琴一直都是比较漂亮和受欢迎的,但是基于树多级别来说,做起来就比较麻烦,所以我这里也用了手风琴加树的模式来做 注:上面的图标都是乱添加的,并不代表意思 进入正文: 首先必须下载一些图标.可以自行百度网页小图标

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(37)-文章发布系统④-百万级数据和千万级数据简单测试

我想测试EF在一百万条数据下的显示时间!这分数据应该有很多同学想要,看看EF的性能! 服务器 现在来向SQL2008R2插入1000000条数据吧 declare @i int; set @i=0; while @i<1000000 begin INSERT INTO [AppDB].[dbo].[MIS_Article] ([Id] ,[ChannelId] ,[CategoryId] ,[Title] ,[ImgUrl] ,[BodyContent] ,[Sort] ,[Click] ,[C

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(47)-工作流设计-补充

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(47)-工作流设计-补充 系列目录 补充一下,有人要表单的代码,这个用代码生成器生成表Flow_Form表的Index代码就可以 加上几个按钮就可以了 <div class="mvctool"> <input id="txtQuery" type="text" class="searchText" /> @Ht

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(48)-工作流设计-起草新申请

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(48)-工作流设计-起草新申请 系列目录 创建新表单之后,我们就可以起草申请了,申请按照严格的表单步骤和分支执行. 起草的同时,我们分解流转的规则中的审批人并保存,具体流程如下 接下来创建DrafContoller控制器,此控制器只有2个页面,一个Create(起草页面)Index(表单列表) 表单列表显示个人想法,我是根据分类直接获取其下表单,即Flow_Type下的Flow_Form public

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-组织架构

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-组织架构 本节开始我们要实现工作流,此工作流可以和之前的所有章节脱离关系,也可以紧密合并. 我们当初设计的项目解决方案就是可伸缩可以拆离,可共享的项目解决方案.所以我们同时要添加App.Flow文件夹 工作流的开始之前,我们必须有一个组织架构,我们做成无限动态级别树,因为之前的模块管理也是无限级别的 知识点:Easyui TreeGrid用法,根据组织架构读取架构下所有用户(with...as.

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(39)-在线人数统计探讨

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(39)-在线人数统计探讨 系列目录 基于web的网站在线统计一直处于不是很精准的状态!基本上没有一种方法可以确实的统计在线用户! Discuz!NT 在线用户功能算是做得比较好的!参考资料 他的原理大致是根据用户的操作间隔来确定用户是否在线,也可以理解为操作日志,当系统扫描的日志间隔太长将被理解为用户离线,所以要不断的更新操作表和操作表日益增长的烦恼,所以必须定时的清除操作表,当系统启动时要重置表数据!

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(42)-工作流设计01

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(42)-工作流设计01 工作流在实际应用中还是比较广泛,网络中存在很多工作流的图形化插件,可以做到拉拽的工作流设计,非常简便,再配合第三方编辑器,可以直接生成表单,我没有刻意的浏览很多工作流的实际设计,我认为工作流只要有动态可修改的流转,有时可按角色,部门,上级或者职位流转即是比较好的正常工作流!这里只带给一个思路的简单工作流... 工作流其实有几种,也可以设计得很简单: 1.固定的工作流,很小的公司,

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(40)-精准在线人数统计实现-【过滤器+Cache】

原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(40)-精准在线人数统计实现-[过滤器+Cache] 系列目录 上次的探讨没有任何结果,我浏览了大量的文章和个别系统的参考!决定用Cache来做,这可能有点难以接受但是配合mvc过滤器来做效果非常好! 由于之前的过滤器我们用过了OnActionExecuting这个方法来判断权限 现在在方法被执行后我们用OnActionExecuted来监听用户的操作和刷新用户在线列表 首先下载http://files