构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(42)-工作流设计01
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(42)-工作流设计01
工作流在实际应用中还是比较广泛,网络中存在很多工作流的图形化插件,可以做到拉拽的工作流设计,非常简便,再配合第三方编辑器,可以直接生成表单,我没有刻意的浏览很多工作流的实际设计,我认为工作流只要有动态可修改的流转,有时可按角色,部门,上级或者职位流转即是比较好的正常工作流!这里只带给一个思路的简单工作流...
工作流其实有几种,也可以设计得很简单:
1.固定的工作流,很小的公司,很固定的流程!
2.自定义表单和字段,有时候可以校验表单
3.自定义流转的人员,即按角色流转,用户每一次提交工作流都必须在步骤中添加要转的人员
4.直接设置职位和部门,然后根据人员所属的部门、职位或者上级进行流转
上面可以是一个交集,只有4点合起来才能做一个比较动态的工作流,否则可以直接用固定的工作流即可
这是本次要做的一般大众化工作流
当生成表单之后,用户将直接用此表单的模版,并提交公文到下一步,最后流程完成后,反馈给发起人
数据库的设计也有这巧妙之处
Flow_Form:表单模版
Flow_FormAttr:表单字段
Flow_Step:表单的流转步骤,如请假天数小于3天直接上级审批,大于3天需要进行第二步的老总审批
Flow_StepRule:根据字段决定流转的条件
Flow_StepState:正在进行的步骤状态,如第一步是否完成
Flow_Type:工作流种类,如行政管理
Flow_FormCentent:根据模版提交的内容
Flow_FormContentStepCheck:步骤总状态
Flow_FormContentStepCheckState:步骤的细分状态
USE [AppDB]
GO
/****** Object: Table [dbo].[Flow_Type] Script Date: 03/21/2015 22:36:52 ******/
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_Seal] Script Date: 03/21/2015 22:36:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_Seal](
[Id] [varchar](50) NOT NULL,
[Path] [varchar](200) NULL,
[CreateTime] [datetime] NULL,
[Using] [varchar](4000) NULL,
CONSTRAINT [PK_Flow_Seal] 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_Seal', @level2type=N'COLUMN',@level2name=N'Using'
GO
/****** Object: Table [dbo].[Flow_FormAttr] Script Date: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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,
[Title] [varchar](200) 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,
[CustomMember] [varchar](4000) NULL,
[TimeOut] [datetime] NOT 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_FormContentStepCheck] Script Date: 03/21/2015 22:36:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_FormContentStepCheck](
[Id] [varchar](50) NOT NULL,
[ContentId] [varchar](50) NOT NULL,
[StepId] [varchar](50) NOT NULL,
[State] [int] NOT NULL,
[StateFlag] [bit] NOT NULL,
[CreateTime] [datetime] NOT NULL,
[IsEnd] [bit] NOT 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_FormContentStepCheck', @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_FormContentStepCheck', @level2type=N'COLUMN',@level2name=N'ContentId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0不通过1通过2审核中' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Flow_FormContentStepCheck', @level2type=N'COLUMN',@level2name=N'State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'true此步骤审核完成' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Flow_FormContentStepCheck', @level2type=N'COLUMN',@level2name=N'StateFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Flow_FormContentStepCheck', @level2type=N'COLUMN',@level2name=N'CreateTime'
GO
/****** Object: Table [dbo].[Flow_StepRule] Script Date: 03/21/2015 22:36:52 ******/
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,
[NextStep] [varchar](50) 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: Table [dbo].[Flow_FormContentStepCheckState] Script Date: 03/21/2015 22:36:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Flow_FormContentStepCheckState](
[Id] [varchar](50) NOT NULL,
[StepCheckId] [varchar](50) NOT NULL,
[UserId] [varchar](50) NOT NULL,
[CheckFlag] [int] NOT NULL,
[Reamrk] [varchar](2000) NULL,
[TheSeal] [varchar](50) NULL,
[CreateTime] [datetime] NOT NULL,
CONSTRAINT [PK_Flow_FormContentStepCheckState] 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'1通过0不通过2审核中' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Flow_FormContentStepCheckState', @level2type=N'COLUMN',@level2name=N'CheckFlag'
GO
/****** Object: Default [DF_Flow_FormContent_DrafText_Time] Script Date: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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_StepState_Flow_StepState] Script Date: 03/21/2015 22:36:52 ******/
ALTER TABLE [dbo].[Flow_FormContentStepCheck] WITH CHECK ADD CONSTRAINT [FK_Flow_StepState_Flow_StepState] FOREIGN KEY([ContentId])
REFERENCES [dbo].[Flow_FormContent] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormContentStepCheck] CHECK CONSTRAINT [FK_Flow_StepState_Flow_StepState]
GO
/****** Object: ForeignKey [FK_Flow_FormContentStepCheckState_Flow_FormContentStepCheck] Script Date: 03/21/2015 22:36:52 ******/
ALTER TABLE [dbo].[Flow_FormContentStepCheckState] WITH CHECK ADD CONSTRAINT [FK_Flow_FormContentStepCheckState_Flow_FormContentStepCheck] FOREIGN KEY([StepCheckId])
REFERENCES [dbo].[Flow_FormContentStepCheck] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormContentStepCheckState] CHECK CONSTRAINT [FK_Flow_FormContentStepCheckState_Flow_FormContentStepCheck]
GO
/****** Object: ForeignKey [FK_Flow_FormContentStepCheckState_SysUser] Script Date: 03/21/2015 22:36:52 ******/
ALTER TABLE [dbo].[Flow_FormContentStepCheckState] WITH CHECK ADD CONSTRAINT [FK_Flow_FormContentStepCheckState_SysUser] FOREIGN KEY([UserId])
REFERENCES [dbo].[SysUser] ([Id])
GO
ALTER TABLE [dbo].[Flow_FormContentStepCheckState] CHECK CONSTRAINT [FK_Flow_FormContentStepCheckState_SysUser]
GO
/****** Object: ForeignKey [FK_Flow_Step_Flow_Form] Script Date: 03/21/2015 22:36:52 ******/
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: 03/21/2015 22:36:52 ******/
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
构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(42)-工作流设计01的更多相关文章
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(1)-前言与目录(持续更新中...)
转自:http://www.cnblogs.com/ymnets/p/3424309.html 曾几何时我想写一个系列的文章,但是由于工作很忙,一直没有时间更新博客.博客园园龄都1年了,却一直都是空空 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(48)-工作流设计-起草新申请
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(48)-工作流设计-起草新申请 系列目录 创建新表单之后,我们就可以起草申请了,申请按照严格的表单步骤和分 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(47)-工作流设计-补充
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(47)-工作流设计-补充 系列目录 补充一下,有人要表单的代码,这个用代码生成器生成表Flow_Form表 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(46)-工作流设计-设计分支
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(46)-工作流设计-设计分支 系列目录 步骤设置完毕之后,就要设置好流转了,比如财务申请大于50000元( ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(45)-工作流设计-设计步骤
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(45)-工作流设计-设计步骤 系列目录 步骤设计很重要,特别是规则的选择. 我这里分为几个规则 1.按自行 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(44)-工作流设计-设计表单
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(44)-工作流设计-设计表单 系列目录 设计表单是比较复杂的一步,完成一个表单的设计其实很漫长,主要分为四 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(43)-工作流设计-字段分类设计
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(43)-工作流设计-字段分类设计 系列目录 建立好42节的表之后,每个字段英文表示都是有意义的说明.先建立 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(40)-精准在线人数统计实现-【过滤器+Cache】
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(40)-精准在线人数统计实现-[过滤器+Cache] 系列目录 上次的探讨没有任何结果,我浏览了大量的文章 ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-组织架构
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-组织架构 本节开始我们要实现工作流,此工作流可以和之前的所有章节脱离关系,也可以紧密合并. 我们当 ...
随机推荐
- 纯javascript联动的例子
有人想要学习下纯javascript联动的一些技巧,我这里就以日期的联动为例,附上一些代码至于复杂的省市区联动,不建议用纯javascript的,而是用ajax的方式,该不在此讨论范围内,想要了解aj ...
- php生成员工编号,产品编号
由于某些原因需要获取数据库最大的id值.所以出现了这段php 获取数据库最大的id代码了.这里面的max(id) 这里面的id 就是要获取最大的id了.如果是别的字段请填写为其他字段 获取数据库中最大 ...
- php模拟POST请求提交数据
php模拟POST请求提交数据 1.基于fsockopen function phppost00($jsonString){ $URL='https://www.jy.com/phppostok.ph ...
- C语言的指针
指针是C语言中非常重要的数据类型,那么什么是指针呢? 指针类型就是用来用来存放变量地址的变量,指向某个变量. 指针的一般形式:*指针变量名 int *p; float *p1; “*”是用来说明这个变 ...
- 初识Vim
在Windows系统安装Vim后桌面上会添加gVim.gVim Easy.gVim Read-only 三个快捷方式. gVim 指向主程序,gVim Easy.gVim Read-only 也是,但 ...
- RH的NFS配置--简单OK
参照文档: http://wenku.baidu.com/link?url=SAcDvj8WtBd8dunC7P6FTFADYYVzzxhOiNJqbgr-aGTZovM0lHg-wbYgv9I3Lu ...
- KeilC51使用详解 (二)
深入理解并应用C51对标准ANSIC的扩展是学习C51的关键之一.因为大多数扩展功能都是直接针对8051系列CPU硬件的.大致有以下8类: 8051存储类型及存储区域 存储模式 存储器类型声明 变量类 ...
- VS2010编译、调用Lua程序
一) .建立lua源代码工程,编译lua的静态库 1.下载Lua源码 http://www.lua.org/download.html a 下载后解压到一个目录下,这里假设解压到D:\lua-5.1. ...
- Delphi基本图像处理代码
//浮雕procedure Emboss(SrcBmp,DestBmp:TBitmap;AzimuthChange:integer);overload;var i, j, Gray, Azimuth ...
- DEEPIN 2014 正式版 试用体验
7月6日深度正式发布 Deepin 2014 操作系统,该系统是基于 Ubuntu 14.04 LTS 的 Linux 发行版,并搭载了多款深度开发的软件,更符合国人使用习惯.由于Deepin 201 ...