mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
合并实例与实例模板
This commit is contained in:
parent
9c31ab6661
commit
67dd39dbc7
@ -39,29 +39,22 @@ namespace OpenAuth.App
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 存储工作流实例进程(编辑草稿用)
|
/// 存储工作流实例进程(编辑草稿用)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="processInstanceEntity"></param>
|
/// <param name="flowInstance"></param>
|
||||||
/// <param name="processSchemeEntity"></param>
|
|
||||||
/// <param name="wfOperationHistoryEntity"></param>
|
/// <param name="wfOperationHistoryEntity"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int SaveProcess(string processId, FlowInstance processInstanceEntity, FlowInstanceScheme processSchemeEntity, FlowInstanceOperationHistory wfOperationHistoryEntity = null)
|
public int SaveProcess(string processId, FlowInstance flowInstance, FlowInstanceOperationHistory wfOperationHistoryEntity = null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.Empty ==(processInstanceEntity.Id))
|
if (string.Empty ==(flowInstance.Id))
|
||||||
{
|
{
|
||||||
UnitWork.Add(processSchemeEntity);
|
UnitWork.Add(flowInstance);
|
||||||
|
|
||||||
processInstanceEntity.Id = processId;
|
|
||||||
processInstanceEntity.InstanceSchemeId = processSchemeEntity.Id;
|
|
||||||
UnitWork.Add(processInstanceEntity);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
processInstanceEntity.Id = (processId);
|
flowInstance.Id = (processId);
|
||||||
UnitWork.Update(processInstanceEntity);
|
UnitWork.Update(flowInstance);
|
||||||
|
|
||||||
processSchemeEntity.Id=(processInstanceEntity.InstanceSchemeId);
|
|
||||||
UnitWork.Update(processSchemeEntity);
|
|
||||||
}
|
}
|
||||||
if (wfOperationHistoryEntity != null)
|
if (wfOperationHistoryEntity != null)
|
||||||
{
|
{
|
||||||
@ -80,35 +73,30 @@ namespace OpenAuth.App
|
|||||||
/// 存储工作流实例进程(创建实例进程)
|
/// 存储工作流实例进程(创建实例进程)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="wfRuntimeModel"></param>
|
/// <param name="wfRuntimeModel"></param>
|
||||||
/// <param name="processInstanceEntity"></param>
|
/// <param name="flowInstance"></param>
|
||||||
/// <param name="processSchemeEntity"></param>
|
|
||||||
/// <param name="processOperationHistoryEntity"></param>
|
/// <param name="processOperationHistoryEntity"></param>
|
||||||
/// <param name="delegateRecordEntity"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int SaveProcess(WF_RuntimeModel wfRuntimeModel, FlowInstance processInstanceEntity, FlowInstanceScheme processSchemeEntity, FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity)
|
public int SaveProcess(WF_RuntimeModel wfRuntimeModel, FlowInstance flowInstance, FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.Empty == (processInstanceEntity.Id))
|
if (string.Empty == (flowInstance.Id))
|
||||||
{
|
{
|
||||||
UnitWork.Add(processSchemeEntity);
|
|
||||||
|
|
||||||
processInstanceEntity.Id = (string)(wfRuntimeModel.processId);
|
flowInstance.Id = (string)(wfRuntimeModel.processId);
|
||||||
processInstanceEntity.InstanceSchemeId = processSchemeEntity.Id;
|
UnitWork.Add(flowInstance);
|
||||||
UnitWork.Add(processInstanceEntity);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
processInstanceEntity.Id =(processInstanceEntity.Id);
|
flowInstance.Id =(flowInstance.Id);
|
||||||
UnitWork.Update(processSchemeEntity);
|
UnitWork.Update(flowInstance);
|
||||||
UnitWork.Update(processInstanceEntity);
|
|
||||||
}
|
}
|
||||||
processOperationHistoryEntity.InstanceId = processInstanceEntity.Id;
|
processOperationHistoryEntity.InstanceId = flowInstance.Id;
|
||||||
UnitWork.Add(processOperationHistoryEntity);
|
UnitWork.Add(processOperationHistoryEntity);
|
||||||
|
|
||||||
if (processTransitionHistoryEntity != null)
|
if (processTransitionHistoryEntity != null)
|
||||||
{
|
{
|
||||||
processTransitionHistoryEntity.InstanceId = processInstanceEntity.Id;
|
processTransitionHistoryEntity.InstanceId = flowInstance.Id;
|
||||||
UnitWork.Add(processTransitionHistoryEntity);
|
UnitWork.Add(processTransitionHistoryEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,13 +116,12 @@ namespace OpenAuth.App
|
|||||||
/// <param name="processOperationHistoryEntity"></param>
|
/// <param name="processOperationHistoryEntity"></param>
|
||||||
/// <param name="processTransitionHistoryEntity"></param>
|
/// <param name="processTransitionHistoryEntity"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int SaveProcess(FlowInstance processInstanceEntity, FlowInstanceScheme processSchemeEntity,
|
public int SaveProcess(FlowInstance processInstanceEntity,
|
||||||
FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity = null)
|
FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity = null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
processInstanceEntity.Id=(processInstanceEntity.Id);
|
processInstanceEntity.Id=(processInstanceEntity.Id);
|
||||||
UnitWork.Update(processSchemeEntity);
|
|
||||||
UnitWork.Update(processInstanceEntity);
|
UnitWork.Update(processInstanceEntity);
|
||||||
|
|
||||||
processOperationHistoryEntity.InstanceId = processInstanceEntity.Id;
|
processOperationHistoryEntity.InstanceId = processInstanceEntity.Id;
|
||||||
@ -165,12 +152,11 @@ namespace OpenAuth.App
|
|||||||
/// <param name="delegateRecordEntityList"></param>
|
/// <param name="delegateRecordEntityList"></param>
|
||||||
/// <param name="processTransitionHistoryEntity"></param>
|
/// <param name="processTransitionHistoryEntity"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int SaveProcess(string sql,string dbbaseId, FlowInstance processInstanceEntity, FlowInstanceScheme processSchemeEntity, FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity = null)
|
public int SaveProcess(string sql,string dbbaseId, FlowInstance processInstanceEntity, FlowInstanceOperationHistory processOperationHistoryEntity, FlowInstanceTransitionHistory processTransitionHistoryEntity = null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
processInstanceEntity.Id=(processInstanceEntity.Id);
|
processInstanceEntity.Id=(processInstanceEntity.Id);
|
||||||
UnitWork.Update(processSchemeEntity);
|
|
||||||
UnitWork.Update(processInstanceEntity);
|
UnitWork.Update(processInstanceEntity);
|
||||||
|
|
||||||
processOperationHistoryEntity.InstanceId = processInstanceEntity.Id;
|
processOperationHistoryEntity.InstanceId = processInstanceEntity.Id;
|
||||||
@ -208,7 +194,6 @@ namespace OpenAuth.App
|
|||||||
FlowInstance entity = UnitWork.FindSingle<FlowInstance>(u =>u.Id ==keyValue);
|
FlowInstance entity = UnitWork.FindSingle<FlowInstance>(u =>u.Id ==keyValue);
|
||||||
|
|
||||||
UnitWork.Delete<FlowInstance>(u =>u.Id == keyValue);
|
UnitWork.Delete<FlowInstance>(u =>u.Id == keyValue);
|
||||||
UnitWork.Delete<FlowInstanceScheme>(u =>u.Id == entity.InstanceSchemeId);
|
|
||||||
UnitWork.Save();
|
UnitWork.Save();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -346,21 +331,10 @@ namespace OpenAuth.App
|
|||||||
FlowInstance.CreateUserName = user.User.Account;
|
FlowInstance.CreateUserName = user.User.Account;
|
||||||
FlowInstance.MakerList = (wfruntime.GetStatus() != 4 ? GetMakerList(wfruntime) : "");//当前节点可执行的人信息
|
FlowInstance.MakerList = (wfruntime.GetStatus() != 4 ? GetMakerList(wfruntime) : "");//当前节点可执行的人信息
|
||||||
FlowInstance.IsFinish = (wfruntime.GetStatus() == 4 ? 1 : 0);
|
FlowInstance.IsFinish = (wfruntime.GetStatus() == 4 ? 1 : 0);
|
||||||
|
FlowInstance.SchemeContent = FlowScheme.SchemeContent;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 实例模板
|
|
||||||
var data = new
|
|
||||||
{
|
|
||||||
SchemeContent = FlowScheme.SchemeContent,
|
|
||||||
frmData = frmData
|
|
||||||
};
|
|
||||||
FlowInstanceScheme FlowInstanceScheme = new FlowInstanceScheme
|
|
||||||
{
|
|
||||||
SchemeId = schemeInfoId,
|
|
||||||
SchemeVersion = FlowScheme.SchemeVersion,
|
|
||||||
SchemeContent = data.ToJson().ToString()
|
|
||||||
};
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 流程操作记录
|
#region 流程操作记录
|
||||||
FlowInstanceOperationHistory processOperationHistoryEntity = new FlowInstanceOperationHistory();
|
FlowInstanceOperationHistory processOperationHistoryEntity = new FlowInstanceOperationHistory();
|
||||||
@ -384,7 +358,7 @@ namespace OpenAuth.App
|
|||||||
//FlowInstance.MakerList += delegateUserList;
|
//FlowInstance.MakerList += delegateUserList;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
SaveProcess(wfruntime.runtimeModel, FlowInstance, FlowInstanceScheme, processOperationHistoryEntity, processTransitionHistoryEntity);
|
SaveProcess(wfruntime.runtimeModel, FlowInstance, processOperationHistoryEntity, processTransitionHistoryEntity);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -407,16 +381,12 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
string _sqlstr = "", _dbbaseId = "";
|
string _sqlstr = "", _dbbaseId = "";
|
||||||
FlowInstance FlowInstance = GetEntity(processId);
|
FlowInstance FlowInstance = GetEntity(processId);
|
||||||
FlowInstanceScheme FlowInstanceScheme = UnitWork.FindSingle<FlowInstanceScheme>(u => u.Id == FlowInstance.InstanceSchemeId);
|
|
||||||
FlowInstanceOperationHistory FlowInstanceOperationHistory = new FlowInstanceOperationHistory();//操作记录
|
FlowInstanceOperationHistory FlowInstanceOperationHistory = new FlowInstanceOperationHistory();//操作记录
|
||||||
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;//流转记录
|
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;//流转记录
|
||||||
|
|
||||||
dynamic schemeContentJson = FlowInstanceScheme.SchemeContent.ToJson();//获取工作流模板内容的json对象;
|
|
||||||
WF_RuntimeInitModel wfRuntimeInitModel = new WF_RuntimeInitModel()
|
WF_RuntimeInitModel wfRuntimeInitModel = new WF_RuntimeInitModel()
|
||||||
{
|
{
|
||||||
schemeContent = schemeContentJson.SchemeContent.Value,
|
|
||||||
currentNodeId = FlowInstance.ActivityId,
|
currentNodeId = FlowInstance.ActivityId,
|
||||||
frmData = schemeContentJson.frmData.Value,
|
|
||||||
previousId = FlowInstance.PreviousId,
|
previousId = FlowInstance.PreviousId,
|
||||||
processId = processId
|
processId = processId
|
||||||
};
|
};
|
||||||
@ -465,7 +435,6 @@ namespace OpenAuth.App
|
|||||||
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
||||||
frmData = wfruntime.runtimeModel.frmData
|
frmData = wfruntime.runtimeModel.frmData
|
||||||
};
|
};
|
||||||
FlowInstanceScheme.SchemeContent = _data.ToJson().ToString();
|
|
||||||
switch (_Confluenceres)
|
switch (_Confluenceres)
|
||||||
{
|
{
|
||||||
case "-1"://不通过
|
case "-1"://不通过
|
||||||
@ -559,12 +528,11 @@ namespace OpenAuth.App
|
|||||||
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
||||||
frmData = wfruntime.runtimeModel.frmData
|
frmData = wfruntime.runtimeModel.frmData
|
||||||
};
|
};
|
||||||
FlowInstanceScheme.SchemeContent = data.ToJson();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
_res = true;
|
_res = true;
|
||||||
SaveProcess(_sqlstr, _dbbaseId, FlowInstance, FlowInstanceScheme, FlowInstanceOperationHistory, processTransitionHistoryEntity);
|
SaveProcess(_sqlstr, _dbbaseId, FlowInstance, FlowInstanceOperationHistory, processTransitionHistoryEntity);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -584,15 +552,11 @@ namespace OpenAuth.App
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
FlowInstance FlowInstance = GetEntity(processId);
|
FlowInstance FlowInstance = GetEntity(processId);
|
||||||
FlowInstanceScheme FlowInstanceScheme = UnitWork.FindSingle<FlowInstanceScheme>(u => u.Id == FlowInstance.InstanceSchemeId);
|
|
||||||
FlowInstanceOperationHistory FlowInstanceOperationHistory = new FlowInstanceOperationHistory();
|
FlowInstanceOperationHistory FlowInstanceOperationHistory = new FlowInstanceOperationHistory();
|
||||||
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;
|
FlowInstanceTransitionHistory processTransitionHistoryEntity = null;
|
||||||
dynamic schemeContentJson = FlowInstanceScheme.SchemeContent.ToJson();//获取工作流模板内容的json对象;
|
|
||||||
WF_RuntimeInitModel wfRuntimeInitModel = new WF_RuntimeInitModel()
|
WF_RuntimeInitModel wfRuntimeInitModel = new WF_RuntimeInitModel()
|
||||||
{
|
{
|
||||||
schemeContent = schemeContentJson.SchemeContent.Value,
|
|
||||||
currentNodeId = FlowInstance.ActivityId,
|
currentNodeId = FlowInstance.ActivityId,
|
||||||
frmData = schemeContentJson.frmData.Value,
|
|
||||||
previousId = FlowInstance.PreviousId,
|
previousId = FlowInstance.PreviousId,
|
||||||
processId = processId
|
processId = processId
|
||||||
};
|
};
|
||||||
@ -634,10 +598,9 @@ namespace OpenAuth.App
|
|||||||
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
|
||||||
frmData = (FlowInstance.FrmType == 0 ? wfruntime.runtimeModel.frmData : null)
|
frmData = (FlowInstance.FrmType == 0 ? wfruntime.runtimeModel.frmData : null)
|
||||||
};
|
};
|
||||||
FlowInstanceScheme.SchemeContent = data.ToJson().ToString();
|
|
||||||
FlowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】驳回,备注:" + description;
|
FlowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】驳回,备注:" + description;
|
||||||
|
|
||||||
SaveProcess(FlowInstance, FlowInstanceScheme, FlowInstanceOperationHistory, processTransitionHistoryEntity);
|
SaveProcess(FlowInstance, FlowInstanceOperationHistory, processTransitionHistoryEntity);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -948,38 +911,6 @@ namespace OpenAuth.App
|
|||||||
return resStr;
|
return resStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlowInstanceScheme GetProcessSchemeEntity(string keyValue)
|
|
||||||
{
|
|
||||||
return UnitWork.FindSingle<FlowInstanceScheme>(u => u.Id == keyValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 已办流程进度查看,根据当前访问人的权限查看表单内容
|
|
||||||
/// <para>李玉宝于2017-01-20 15:35:13</para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="keyValue">The key value.</param>
|
|
||||||
/// <returns>FlowInstanceScheme.</returns>
|
|
||||||
public FlowInstanceScheme GetProcessSchemeByUserId(string keyValue)
|
|
||||||
{
|
|
||||||
var entity = GetProcessSchemeEntity(keyValue);
|
|
||||||
entity.SchemeContent = GetProcessSchemeContentByUserId(entity.SchemeContent, AuthUtil.GetCurrentUser().User.Id.ToString());
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 已办流程进度查看,根据当前节点的权限查看表单内容
|
|
||||||
/// <para>李玉宝于2017-01-20 15:34:35</para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="keyValue">The key value.</param>
|
|
||||||
/// <param name="nodeId">The node identifier.</param>
|
|
||||||
/// <returns>FlowInstanceScheme.</returns>
|
|
||||||
public FlowInstanceScheme GetProcessSchemeEntityByNodeId(string keyValue, string nodeId)
|
|
||||||
{
|
|
||||||
var entity = GetProcessSchemeEntity(keyValue);
|
|
||||||
entity.SchemeContent = GetProcessSchemeContentByNodeId(entity.SchemeContent, nodeId);
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public FlowInstance GetProcessInstanceEntity(string keyValue)
|
public FlowInstance GetProcessInstanceEntity(string keyValue)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace OpenAuth.App
|
|||||||
Content = obj.Content,
|
Content = obj.Content,
|
||||||
ContentParse = obj.ContentParse,
|
ContentParse = obj.ContentParse,
|
||||||
Name = obj.Name,
|
Name = obj.Name,
|
||||||
FrmDbId = obj.FrmDbId
|
DbName = obj.DbName
|
||||||
});
|
});
|
||||||
|
|
||||||
Repository.ExecuteSql(FormUtil.GetSql(obj));
|
Repository.ExecuteSql(FormUtil.GetSql(obj));
|
||||||
|
@ -443,7 +443,7 @@ namespace OpenAuth.App
|
|||||||
var jsonArray = JArray.Parse(form.ContentData);
|
var jsonArray = JArray.Parse(form.ContentData);
|
||||||
|
|
||||||
// 数据库名称
|
// 数据库名称
|
||||||
string tableName="[Form_"+ form.FrmDbId + "]";
|
string tableName="["+ form.DbName + "]";
|
||||||
// 创建数据表
|
// 创建数据表
|
||||||
StringBuilder sql =new StringBuilder("if exists ( select * from sysobjects where name = '"
|
StringBuilder sql =new StringBuilder("if exists ( select * from sysobjects where name = '"
|
||||||
+tableName+"' and type = 'U') drop table "
|
+tableName+"' and type = 'U') drop table "
|
||||||
@ -477,7 +477,7 @@ namespace OpenAuth.App
|
|||||||
sql.Append(");");
|
sql.Append(");");
|
||||||
|
|
||||||
//设置主键
|
//设置主键
|
||||||
sql.Append("ALTER TABLE "+tableName+" ADD CONSTRAINT [PK_"+form.FrmDbId+"] PRIMARY KEY NONCLUSTERED ([Id])");
|
sql.Append("ALTER TABLE "+tableName+" ADD CONSTRAINT [PK_"+form.DbName+"] PRIMARY KEY NONCLUSTERED ([Id])");
|
||||||
sql.Append(
|
sql.Append(
|
||||||
"WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ");
|
"WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ");
|
||||||
sql.Append("ON [PRIMARY];");
|
sql.Append("ON [PRIMARY];");
|
||||||
|
@ -26,7 +26,13 @@ namespace OpenAuth.Repository.Domain
|
|||||||
this.ActivityId= string.Empty;
|
this.ActivityId= string.Empty;
|
||||||
this.ActivityName= string.Empty;
|
this.ActivityName= string.Empty;
|
||||||
this.PreviousId= string.Empty;
|
this.PreviousId= string.Empty;
|
||||||
|
this.SchemeContent= string.Empty;
|
||||||
|
this.SchemeId= string.Empty;
|
||||||
|
this.DbName= string.Empty;
|
||||||
this.FrmType= 0;
|
this.FrmType= 0;
|
||||||
|
this.FrmContentData= string.Empty;
|
||||||
|
this.FrmContentParse= string.Empty;
|
||||||
|
this.FrmId= string.Empty;
|
||||||
this.SchemeType= string.Empty;
|
this.SchemeType= string.Empty;
|
||||||
this.Disabled= 0;
|
this.Disabled= 0;
|
||||||
this.CreateDate= DateTime.Now;
|
this.CreateDate= DateTime.Now;
|
||||||
@ -66,10 +72,34 @@ namespace OpenAuth.Repository.Domain
|
|||||||
/// 前一个ID
|
/// 前一个ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PreviousId { get; set; }
|
public string PreviousId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 流程模板内容
|
||||||
|
/// </summary>
|
||||||
|
public string SchemeContent { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 流程模板ID
|
||||||
|
/// </summary>
|
||||||
|
public string SchemeId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 数据库名称
|
||||||
|
/// </summary>
|
||||||
|
public string DbName { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表单类型
|
/// 表单类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int FrmType { get; set; }
|
public int FrmType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 表单中的字段数据
|
||||||
|
/// </summary>
|
||||||
|
public string FrmContentData { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 表单内容
|
||||||
|
/// </summary>
|
||||||
|
public string FrmContentParse { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 表单ID
|
||||||
|
/// </summary>
|
||||||
|
public string FrmId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 流程类型
|
/// 流程类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <autogenerated>
|
|
||||||
// This code was generated by a CodeSmith Template.
|
|
||||||
//
|
|
||||||
// DO NOT MODIFY contents of this file. Changes to this
|
|
||||||
// file will be lost if the code is regenerated.
|
|
||||||
// Author:Yubao Li
|
|
||||||
// </autogenerated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenAuth.Repository.Domain
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 工作流实例模板对应表,防止创建实例后原模板被改
|
|
||||||
/// </summary>
|
|
||||||
public partial class FlowInstanceScheme : Entity
|
|
||||||
{
|
|
||||||
public FlowInstanceScheme()
|
|
||||||
{
|
|
||||||
this.SchemeContent= string.Empty;
|
|
||||||
this.SchemeId= string.Empty;
|
|
||||||
this.SchemeVersion= string.Empty;
|
|
||||||
this.CreateDate= DateTime.Now;
|
|
||||||
this.CreateUserId= string.Empty;
|
|
||||||
this.CreateUserName= string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 流程模板内容
|
|
||||||
/// </summary>
|
|
||||||
public string SchemeContent { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 流程模板ID
|
|
||||||
/// </summary>
|
|
||||||
public string SchemeId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 流程内容版本
|
|
||||||
/// </summary>
|
|
||||||
public string SchemeVersion { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建时间
|
|
||||||
/// </summary>
|
|
||||||
public System.DateTime CreateDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建用户主键
|
|
||||||
/// </summary>
|
|
||||||
public string CreateUserId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建用户
|
|
||||||
/// </summary>
|
|
||||||
public string CreateUserName { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -27,7 +27,7 @@ namespace OpenAuth.Repository.Domain
|
|||||||
this.Content= string.Empty;
|
this.Content= string.Empty;
|
||||||
this.SortCode= 0;
|
this.SortCode= 0;
|
||||||
this.Delete= 0;
|
this.Delete= 0;
|
||||||
this.FrmDbId= string.Empty;
|
this.DbName= string.Empty;
|
||||||
this.Enabled= 0;
|
this.Enabled= 0;
|
||||||
this.Description= string.Empty;
|
this.Description= string.Empty;
|
||||||
this.CreateDate= DateTime.Now;
|
this.CreateDate= DateTime.Now;
|
||||||
@ -55,7 +55,7 @@ namespace OpenAuth.Repository.Domain
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string ContentParse { get; set; }
|
public string ContentParse { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表单原html模板未经处理的,仅仅用作编辑修改
|
/// 表单原html模板未经处理的
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -67,9 +67,9 @@ namespace OpenAuth.Repository.Domain
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int Delete { get; set; }
|
public int Delete { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据库Id
|
/// 数据库名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FrmDbId { get; set; }
|
public string DbName { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 有效
|
/// 有效
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -55,9 +55,32 @@ namespace OpenAuth.Repository.Mapping
|
|||||||
.HasColumnName("PreviousId")
|
.HasColumnName("PreviousId")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.IsOptional();
|
.IsOptional();
|
||||||
|
Property(t => t.SchemeContent)
|
||||||
|
.HasColumnName("SchemeContent")
|
||||||
|
.IsOptional();
|
||||||
|
Property(t => t.SchemeId)
|
||||||
|
.HasColumnName("SchemeId")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.IsOptional();
|
||||||
|
Property(t => t.DbName)
|
||||||
|
.HasColumnName("DbName")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.IsOptional();
|
||||||
Property(t => t.FrmType)
|
Property(t => t.FrmType)
|
||||||
.HasColumnName("FrmType")
|
.HasColumnName("FrmType")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
Property(t => t.FrmContentData)
|
||||||
|
.HasColumnName("FrmContentData")
|
||||||
|
.HasMaxLength(16)
|
||||||
|
.IsOptional();
|
||||||
|
Property(t => t.FrmContentParse)
|
||||||
|
.HasColumnName("FrmContentParse")
|
||||||
|
.HasMaxLength(16)
|
||||||
|
.IsOptional();
|
||||||
|
Property(t => t.FrmId)
|
||||||
|
.HasColumnName("FrmId")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.IsOptional();
|
||||||
Property(t => t.SchemeType)
|
Property(t => t.SchemeType)
|
||||||
.HasColumnName("SchemeType")
|
.HasColumnName("SchemeType")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <autogenerated>
|
|
||||||
// This code was generated by a CodeSmith Template.
|
|
||||||
//
|
|
||||||
// DO NOT MODIFY contents of this file. Changes to this
|
|
||||||
// file will be lost if the code is regenerated.
|
|
||||||
// </autogenerated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace OpenAuth.Repository.Mapping
|
|
||||||
{
|
|
||||||
public partial class FlowInstanceSchemeMap
|
|
||||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Repository.Domain.FlowInstanceScheme>
|
|
||||||
{
|
|
||||||
public FlowInstanceSchemeMap()
|
|
||||||
{
|
|
||||||
// table
|
|
||||||
ToTable("FlowInstanceScheme", "dbo");
|
|
||||||
|
|
||||||
// keys
|
|
||||||
HasKey(t => t.Id);
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
Property(t => t.Id)
|
|
||||||
.HasColumnName("Id")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.IsRequired();
|
|
||||||
Property(t => t.SchemeContent)
|
|
||||||
.HasColumnName("SchemeContent")
|
|
||||||
.IsOptional();
|
|
||||||
Property(t => t.SchemeId)
|
|
||||||
.HasColumnName("SchemeId")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.IsRequired();
|
|
||||||
Property(t => t.SchemeVersion)
|
|
||||||
.HasColumnName("SchemeVersion")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.IsOptional();
|
|
||||||
Property(t => t.CreateDate)
|
|
||||||
.HasColumnName("CreateDate")
|
|
||||||
.IsRequired();
|
|
||||||
Property(t => t.CreateUserId)
|
|
||||||
.HasColumnName("CreateUserId")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.IsOptional();
|
|
||||||
Property(t => t.CreateUserName)
|
|
||||||
.HasColumnName("CreateUserName")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.IsOptional();
|
|
||||||
|
|
||||||
// Relationships
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -37,12 +37,15 @@ namespace OpenAuth.Repository.Mapping
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
Property(t => t.ContentData)
|
Property(t => t.ContentData)
|
||||||
.HasColumnName("ContentData")
|
.HasColumnName("ContentData")
|
||||||
|
.HasMaxLength(16)
|
||||||
.IsOptional();
|
.IsOptional();
|
||||||
Property(t => t.ContentParse)
|
Property(t => t.ContentParse)
|
||||||
.HasColumnName("ContentParse")
|
.HasColumnName("ContentParse")
|
||||||
|
.HasMaxLength(16)
|
||||||
.IsOptional();
|
.IsOptional();
|
||||||
Property(t => t.Content)
|
Property(t => t.Content)
|
||||||
.HasColumnName("Content")
|
.HasColumnName("Content")
|
||||||
|
.HasMaxLength(16)
|
||||||
.IsOptional();
|
.IsOptional();
|
||||||
Property(t => t.SortCode)
|
Property(t => t.SortCode)
|
||||||
.HasColumnName("SortCode")
|
.HasColumnName("SortCode")
|
||||||
@ -50,8 +53,8 @@ namespace OpenAuth.Repository.Mapping
|
|||||||
Property(t => t.Delete)
|
Property(t => t.Delete)
|
||||||
.HasColumnName("Delete")
|
.HasColumnName("Delete")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
Property(t => t.FrmDbId)
|
Property(t => t.DbName)
|
||||||
.HasColumnName("FrmDbId")
|
.HasColumnName("DbName")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.IsOptional();
|
.IsOptional();
|
||||||
Property(t => t.Enabled)
|
Property(t => t.Enabled)
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
<Compile Include="Core\Entity.cs" />
|
<Compile Include="Core\Entity.cs" />
|
||||||
<Compile Include="Domain\FlowInstance.cs" />
|
<Compile Include="Domain\FlowInstance.cs" />
|
||||||
<Compile Include="Domain\FlowInstanceOperationHistory.cs" />
|
<Compile Include="Domain\FlowInstanceOperationHistory.cs" />
|
||||||
<Compile Include="Domain\FlowInstanceScheme.cs" />
|
|
||||||
<Compile Include="Domain\FlowInstanceTransitionHistory.cs" />
|
<Compile Include="Domain\FlowInstanceTransitionHistory.cs" />
|
||||||
<Compile Include="Domain\FlowScheme.cs" />
|
<Compile Include="Domain\FlowScheme.cs" />
|
||||||
<Compile Include="Domain\Form.cs" />
|
<Compile Include="Domain\Form.cs" />
|
||||||
@ -81,7 +80,6 @@
|
|||||||
<Compile Include="Mapping\CategoryTypeMap.cs" />
|
<Compile Include="Mapping\CategoryTypeMap.cs" />
|
||||||
<Compile Include="Mapping\FlowInstanceMap.cs" />
|
<Compile Include="Mapping\FlowInstanceMap.cs" />
|
||||||
<Compile Include="Mapping\FlowInstanceOperationHistoryMap.cs" />
|
<Compile Include="Mapping\FlowInstanceOperationHistoryMap.cs" />
|
||||||
<Compile Include="Mapping\FlowInstanceSchemeMap.cs" />
|
|
||||||
<Compile Include="Mapping\FlowInstanceTransitionHistoryMap.cs" />
|
<Compile Include="Mapping\FlowInstanceTransitionHistoryMap.cs" />
|
||||||
<Compile Include="Mapping\FlowSchemeMap.cs" />
|
<Compile Include="Mapping\FlowSchemeMap.cs" />
|
||||||
<Compile Include="Mapping\FormMap.cs" />
|
<Compile Include="Mapping\FormMap.cs" />
|
||||||
|
@ -43,7 +43,6 @@ namespace OpenAuth.Repository
|
|||||||
|
|
||||||
public System.Data.Entity.DbSet<FlowInstance> FlowInstances { get; set; }
|
public System.Data.Entity.DbSet<FlowInstance> FlowInstances { get; set; }
|
||||||
public System.Data.Entity.DbSet<FlowInstanceOperationHistory> FlowInstanceOperationHistories { get; set; }
|
public System.Data.Entity.DbSet<FlowInstanceOperationHistory> FlowInstanceOperationHistories { get; set; }
|
||||||
public System.Data.Entity.DbSet<FlowInstanceScheme> FlowInstanceSchemes { get; set; }
|
|
||||||
public System.Data.Entity.DbSet<FlowInstanceTransitionHistory> FlowInstanceTransitionHistories { get; set; }
|
public System.Data.Entity.DbSet<FlowInstanceTransitionHistory> FlowInstanceTransitionHistories { get; set; }
|
||||||
public System.Data.Entity.DbSet<FlowScheme> FlowSchemes { get; set; }
|
public System.Data.Entity.DbSet<FlowScheme> FlowSchemes { get; set; }
|
||||||
|
|
||||||
@ -63,7 +62,6 @@ namespace OpenAuth.Repository
|
|||||||
modelBuilder.Configurations.Add(new FormMap());
|
modelBuilder.Configurations.Add(new FormMap());
|
||||||
modelBuilder.Configurations.Add(new FlowInstanceMap());
|
modelBuilder.Configurations.Add(new FlowInstanceMap());
|
||||||
modelBuilder.Configurations.Add(new FlowInstanceOperationHistoryMap());
|
modelBuilder.Configurations.Add(new FlowInstanceOperationHistoryMap());
|
||||||
modelBuilder.Configurations.Add(new FlowInstanceSchemeMap());
|
|
||||||
modelBuilder.Configurations.Add(new FlowInstanceTransitionHistoryMap());
|
modelBuilder.Configurations.Add(new FlowInstanceTransitionHistoryMap());
|
||||||
modelBuilder.Configurations.Add(new FlowSchemeMap());
|
modelBuilder.Configurations.Add(new FlowSchemeMap());
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user