feat: #IBYEGX 业务系统增加送审功能

This commit is contained in:
wintel
2025-04-06 02:02:30 +08:00
parent c9c738d6e3
commit 2d7e63ebad
11 changed files with 96 additions and 59 deletions

View File

@@ -2,7 +2,7 @@
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
* @Date: 2024-12-13 16:55:17
* @Description: 工作流实例表操作
* @LastEditTime: 2025-04-04 23:30:39
* @LastEditTime: 2025-04-05 15:22:30
* Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved.
*/
@@ -49,7 +49,7 @@ namespace OpenAuth.App
/// 创建一个实例
/// </summary>
/// <returns></returns>
public bool CreateInstance(AddFlowInstanceReq addFlowInstanceReq)
public string CreateInstance(AddFlowInstanceReq addFlowInstanceReq)
{
CheckNodeDesignate(addFlowInstanceReq);
FlowScheme scheme = null;
@@ -91,7 +91,6 @@ namespace OpenAuth.App
var user = _auth.GetCurrentUser();
#region
flowInstance.ActivityId = wfruntime.nextNodeId;
flowInstance.ActivityType = wfruntime.GetNextNodeType();
flowInstance.ActivityName = wfruntime.nextNode.name;
@@ -203,7 +202,7 @@ namespace OpenAuth.App
wfruntime.SaveTransitionHis();
SugarClient.Ado.CommitTran();
return true;
return flowInstance.Id;
}
/// <summary>

View File

@@ -119,5 +119,12 @@ namespace OpenAuth.App.Request
/// </summary>
[Description("知会的用户或角色ID列表")]
public List<string> NoticeIds { get; set; }
/// <summary>
/// 业务ID
/// 当流程实例与业务单据关联时记录关联的业务ID
/// </summary>
[Description("业务ID")]
public string BusinessId { get; set; }
}
}

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Infrastructure;
using Microsoft.EntityFrameworkCore;
using OpenAuth.App.Interface;
using OpenAuth.App.Request;
@@ -40,6 +42,7 @@ namespace OpenAuth.App
UnitWork.Update<FlowScheme>(u => u.Id == flowScheme.Id, u => new FlowScheme
{
FrmUrlTemplate = flowScheme.FrmUrlTemplate,
SchemeContent = flowScheme.SchemeContent,
SchemeName = flowScheme.SchemeName,
ModifyDate = DateTime.Now,
@@ -51,6 +54,19 @@ namespace OpenAuth.App
});
}
/// <summary>
/// 加载所有流程表单为URL表单的流程模板
/// <para>
/// 目前业务系统只挂载URL表单后期优化挂载其他表单类型
/// </para>
/// </summary>
/// <returns></returns>
public List<FlowScheme> LoadUrlFormFlowScheme()
{
return Repository.Find(u => u.FrmType == Define.FORM_TYPE_URL).ToList();
}
public async Task<TableData> Load(QueryFlowSchemeListReq request)
{
var result = new TableData();

View File

@@ -92,6 +92,18 @@ namespace OpenAuth.App
return query;
}
/// <summary>
/// 获取模块的流程模板列表
/// </summary>
/// <param name="moduleId">模块id</param>
/// <returns></returns>
public IEnumerable<FlowScheme> LoadFlowSchemes(string moduleId)
{
var planids = _revelanceApp.Get(Define.MODULE_FLOWSCHEME, true, moduleId);
var query = UnitWork.Find<FlowScheme>(u => planids.Contains(u.Id));
return query;
}
#region