Merge pull request 'v2' (#253) from jasondom/Admin.NET.Pro:v2 into v2
Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/253
This commit is contained in:
commit
12c88f8d76
@ -9,42 +9,42 @@ namespace Admin.NET.Plugin.ApprovalFlow;
|
||||
/// <summary>
|
||||
/// 审批流流程记录
|
||||
/// </summary>
|
||||
[SugarTable("ApprovalFlowRecord", "审批流流程记录")]
|
||||
[SugarTable(null, "审批流流程记录")]
|
||||
public class ApprovalFlowRecord : EntityBaseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 表单名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormName", ColumnDescription = "表单名称", Length = 255)]
|
||||
[SugarColumn(ColumnDescription = "表单名称", Length = 255)]
|
||||
public string? FormName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormStatus", ColumnDescription = "表单状态", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "表单状态", Length = 32)]
|
||||
public string? FormStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单触发
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormJson", ColumnDescription = "表单触发", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "表单触发", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormJson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormResult", ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程结构
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FlowJson", ColumnDescription = "流程结构", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "流程结构", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FlowJson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FlowResult", ColumnDescription = "流程结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "流程结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FlowResult { get; set; }
|
||||
}
|
||||
@ -9,54 +9,54 @@ namespace Admin.NET.Plugin.ApprovalFlow;
|
||||
/// <summary>
|
||||
/// 审批流表单
|
||||
/// </summary>
|
||||
[SugarTable("ApprovalForm", "审批流表单")]
|
||||
[SugarTable(null, "审批流表单")]
|
||||
public class ApprovalForm : EntityBaseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Code", ColumnDescription = "编号", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "编号", Length = 32)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "名称", Length = 32)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormName", ColumnDescription = "表单名称", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "表单名称", Length = 32)]
|
||||
public string? FormName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单属性
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormType", ColumnDescription = "表单属性", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "表单属性", Length = 32)]
|
||||
public string? FormType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormStatus", ColumnDescription = "表单状态")]
|
||||
[SugarColumn(ColumnDescription = "表单状态")]
|
||||
public int? FormStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormResult", ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Status", ColumnDescription = "状态")]
|
||||
[SugarColumn(ColumnDescription = "状态")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 255)]
|
||||
[SugarColumn(ColumnDescription = "备注", Length = 255)]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
@ -9,48 +9,48 @@ namespace Admin.NET.Plugin.ApprovalFlow;
|
||||
/// <summary>
|
||||
/// 审批流表单记录
|
||||
/// </summary>
|
||||
[SugarTable("ApprovalFormRecord", "审批流表单记录")]
|
||||
[SugarTable(null, "审批流表单记录")]
|
||||
public class ApprovalFormRecord : EntityBaseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FlowId", ColumnDescription = "流程Id")]
|
||||
[SugarColumn(ColumnDescription = "流程Id")]
|
||||
public long? FlowId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormName", ColumnDescription = "表单名称", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "表单名称", Length = 32)]
|
||||
public string? FormName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormType", ColumnDescription = "表单类型", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "表单类型", Length = 32)]
|
||||
public string? FormType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormStatus", ColumnDescription = "表单状态", Length = 11)]
|
||||
[SugarColumn(ColumnDescription = "表单状态", Length = 11)]
|
||||
public string? FormStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改前
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormBefore", ColumnDescription = "修改前", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "修改前", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormBefore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改后
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormAfter", ColumnDescription = "修改后", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "修改后", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormAfter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "FormResult", ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[SugarColumn(ColumnDescription = "表单结果", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? FormResult { get; set; }
|
||||
}
|
||||
@ -34,16 +34,17 @@ public class ApprovalFlowMiddleware
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly SysApprovalService _sysApprovalService;
|
||||
|
||||
public ApprovalFlowMiddleware(RequestDelegate next, SysApprovalService sysApprovalService)
|
||||
public ApprovalFlowMiddleware(RequestDelegate next)
|
||||
{
|
||||
_next = next;
|
||||
_sysApprovalService = sysApprovalService;
|
||||
_sysApprovalService = App.GetRequiredService<SysApprovalService>();
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
await _sysApprovalService.MatchApproval(context);
|
||||
|
||||
await _next.Invoke(context);
|
||||
// 调用下一个中间件
|
||||
await _next(context);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user