mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-12-26 14:15:42 +08:00
完成流程实例列表/详情、流程模版添加
This commit is contained in:
@@ -1,66 +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;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 同意申请单
|
||||
/// </summary>
|
||||
public partial class CommonApply : Entity
|
||||
{
|
||||
public CommonApply()
|
||||
{
|
||||
this.Sort= 0;
|
||||
this.Name= string.Empty;
|
||||
this.Comment= string.Empty;
|
||||
this.State= string.Empty;
|
||||
this.StateName= string.Empty;
|
||||
this.ApplyTime = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime ApplyTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Comment { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string StateName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.Guid UserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.Guid? ControllerUserId { get; set; }
|
||||
|
||||
|
||||
public string WorkflowName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace OpenAuth.Domain
|
||||
this.ActivityType= 0;
|
||||
this.ActivityName= string.Empty;
|
||||
this.PreviousId= string.Empty;
|
||||
this.ProcessSchemeId= string.Empty;
|
||||
this.ProcessSchemeId=Guid.Empty;
|
||||
this.SchemeType= string.Empty;
|
||||
this.EnabledMark= 0;
|
||||
this.CreateDate= DateTime.Now;
|
||||
@@ -63,7 +63,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ProcessSchemeId { get; set; }
|
||||
public Guid ProcessSchemeId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -105,5 +105,22 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public string MakerList { get; set; }
|
||||
|
||||
#region 扩展操作
|
||||
/// <summary>
|
||||
/// 新增调用
|
||||
/// </summary>
|
||||
public void Create()
|
||||
{
|
||||
this.CreateDate = DateTime.Now;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑调用
|
||||
/// </summary>
|
||||
/// <param name="keyValue"></param>
|
||||
public void Modify(Guid keyValue)
|
||||
{
|
||||
this.Id = keyValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace OpenAuth.Domain
|
||||
{
|
||||
public WFProcessOperationHistory()
|
||||
{
|
||||
this.ProcessId= string.Empty;
|
||||
this.ProcessId= Guid.Empty;
|
||||
this.Content= string.Empty;
|
||||
this.CreateDate= DateTime.Now;
|
||||
this.CreateUserId= string.Empty;
|
||||
@@ -30,7 +30,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ProcessId { get; set; }
|
||||
public Guid ProcessId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenAuth.Domain
|
||||
public WFProcessScheme()
|
||||
{
|
||||
this.SchemeContent= string.Empty;
|
||||
this.WFSchemeInfoId= string.Empty;
|
||||
this.SchemeInfoId= Guid.Empty;
|
||||
this.SchemeVersion= string.Empty;
|
||||
this.ProcessType= 0;
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string WFSchemeInfoId { get; set; }
|
||||
public Guid SchemeInfoId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -43,5 +43,23 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public int ProcessType { get; set; }
|
||||
|
||||
|
||||
#region 扩展操作
|
||||
/// <summary>
|
||||
/// 新增调用
|
||||
/// </summary>
|
||||
public void Create()
|
||||
{
|
||||
this.Id = Guid.NewGuid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑调用
|
||||
/// </summary>
|
||||
/// <param name="keyValue"></param>
|
||||
public void Modify(Guid keyValue)
|
||||
{
|
||||
this.Id = keyValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace OpenAuth.Domain
|
||||
{
|
||||
public WFProcessTransitionHistory()
|
||||
{
|
||||
this.ProcessId= string.Empty;
|
||||
this.ProcessId= Guid.Empty;
|
||||
this.FromNodeId= string.Empty;
|
||||
this.FromNodeName= string.Empty;
|
||||
this.ToNodeId= string.Empty;
|
||||
@@ -35,7 +35,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ProcessId { get; set; }
|
||||
public Guid ProcessId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenAuth.Domain
|
||||
{
|
||||
public WFSchemeContent()
|
||||
{
|
||||
this.WFSchemeInfoId= string.Empty;
|
||||
this.SchemeInfoId= Guid.Empty;
|
||||
this.SchemeVersion= string.Empty;
|
||||
this.SchemeContent= string.Empty;
|
||||
this.CreateDate= DateTime.Now;
|
||||
@@ -31,7 +31,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string WFSchemeInfoId { get; set; }
|
||||
public Guid SchemeInfoId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<Compile Include="Service\ResManagerService.cs" />
|
||||
<Compile Include="Service\StockManagerService.cs" />
|
||||
<Compile Include="Service\WFFormService.cs" />
|
||||
<Compile Include="Service\WorkflowService.cs" />
|
||||
<Compile Include="Service\WFSchemeService.cs" />
|
||||
<Compile Include="Core\Stock.cs" />
|
||||
<Compile Include="Core\User.cs" />
|
||||
<Compile Include="Core\WFFrmMain.cs" />
|
||||
|
||||
@@ -5,11 +5,15 @@ using OpenAuth.Domain.Interface;
|
||||
|
||||
namespace OpenAuth.Domain.Service
|
||||
{
|
||||
public class WorkflowService
|
||||
/// <summary>
|
||||
/// 流程设计服务
|
||||
/// <para>李玉宝新增于2017-01-16 16:18:35</para>
|
||||
/// </summary>
|
||||
public class WFSchemeService
|
||||
{
|
||||
protected IUnitWork _unitWork;
|
||||
|
||||
public WorkflowService(IUnitWork unitWork)
|
||||
public WFSchemeService(IUnitWork unitWork)
|
||||
{
|
||||
_unitWork = unitWork;
|
||||
}
|
||||
@@ -29,15 +33,16 @@ namespace OpenAuth.Domain.Service
|
||||
entity.SchemeVersion = DateTime.Now.ToString("yyyyMMddHHmmssffff");
|
||||
_unitWork.Add(entity);
|
||||
|
||||
modelentity.WFSchemeInfoId = entity.Id.ToString();
|
||||
modelentity.SchemeInfoId = entity.Id;
|
||||
modelentity.SchemeVersion = entity.SchemeVersion;
|
||||
_unitWork.Add(modelentity);
|
||||
}
|
||||
else
|
||||
{
|
||||
Guid schemeid = Guid.Parse(keyValue);
|
||||
WFSchemeContent modelentityold =
|
||||
_unitWork.FindSingle<WFSchemeContent>(u => u.SchemeVersion == entity.SchemeVersion
|
||||
&& u.WFSchemeInfoId == keyValue);
|
||||
&& u.SchemeInfoId == schemeid);
|
||||
|
||||
if (modelentityold.SchemeContent != modelentity.SchemeContent)
|
||||
{
|
||||
@@ -50,7 +55,7 @@ namespace OpenAuth.Domain.Service
|
||||
}
|
||||
else
|
||||
{
|
||||
modelentity.WFSchemeInfoId = keyValue;
|
||||
modelentity.SchemeInfoId = schemeid;
|
||||
modelentity.SchemeVersion = DateTime.Now.ToString("yyyyMMddHHmmssffff");
|
||||
_unitWork.Add(modelentity);
|
||||
}
|
||||
Reference in New Issue
Block a user