mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-06-23 00:52:07 +08:00
🔄refactor: 优化流程
This commit is contained in:
@@ -400,7 +400,7 @@ namespace OpenAuth.App.Flow
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 撤销流程,清空所有节点
|
||||
/// 召回流程,清空所有节点,返回开始节点并修改为草稿状态
|
||||
/// </summary>
|
||||
public void ReCall(RecallFlowInstanceReq request)
|
||||
{
|
||||
@@ -428,13 +428,13 @@ namespace OpenAuth.App.Flow
|
||||
var sugarClient = AutofacContainerModule.GetService<ISqlSugarClient>();
|
||||
sugarClient.Updateable(flowInstance).ExecuteCommand();
|
||||
|
||||
SaveOperationHis($"【撤回】备注:{request.Description}");
|
||||
SaveOperationHis($"【召回】备注:{request.Description}");
|
||||
|
||||
sugarClient.Ado.CommitTran();
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// 标记节点1通过,-1不通过,0驳回
|
||||
/// 标记节点1通过,2不通过,3驳回
|
||||
/// </summary>
|
||||
/// <param name="nodeId"></param>
|
||||
public void MakeTagNode(string nodeId, Tag tag)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
|
||||
* @Date: 2024-12-13 16:55:17
|
||||
* @Description: 工作流实例表操作
|
||||
* @LastEditTime: 2025-10-18 14:35:01
|
||||
* @LastEditTime: 2026-06-11 22:35:03
|
||||
* Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved.
|
||||
*/
|
||||
|
||||
@@ -521,7 +521,7 @@ namespace OpenAuth.App
|
||||
$"结果:{(tag.Taged == 1 ? "同意" : "不同意")},备注:{tag.Description}";
|
||||
wfruntime.SaveOperationHis(tag.UserId, tag.UserName, content);
|
||||
|
||||
if (flowInstance.IsFinish == 1)
|
||||
if (flowInstance.IsFinish == FlowInstanceStatus.Finished)
|
||||
{
|
||||
//给知会人员发送通知信息
|
||||
var userids = _userManagerApp.GetNoticeUsers(flowInstance.Id);
|
||||
@@ -593,20 +593,20 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
public void Verification(VerificationReq request)
|
||||
{
|
||||
TagState tagState = (TagState)Int32.Parse(request.VerificationFinally);
|
||||
//如果是同意,需要判断是否为运行时选定下一步执行角色/执行人
|
||||
if (request.VerificationFinally == "1")
|
||||
if (tagState == TagState.Ok)
|
||||
{
|
||||
CheckNodeDesignate(request);
|
||||
}
|
||||
|
||||
bool isReject = TagState.Reject.Equals((TagState)Int32.Parse(request.VerificationFinally));
|
||||
if (isReject) //驳回
|
||||
|
||||
if (tagState == TagState.Reject)
|
||||
{
|
||||
RejectNode(request);
|
||||
RejectNode(request); // 驳回
|
||||
}
|
||||
else
|
||||
{
|
||||
NodeVerification(request);
|
||||
NodeVerification(request); // 审核(同意/不同意)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,10 +661,12 @@ namespace OpenAuth.App
|
||||
ActivityId = flowinstance.ActivityId
|
||||
});
|
||||
|
||||
if (flowinstance.IsFinish != FlowInstanceStatus.Running)
|
||||
//流程已终止(完成/不同意/撤销等),不允许继续审批
|
||||
if (flowinstance.IsFinish != FlowInstanceStatus.Running && flowinstance.IsFinish != FlowInstanceStatus.Rejected)
|
||||
{
|
||||
resp.CanVerify = false; //流程已终止(完成/不同意/撤销等),不允许继续审批
|
||||
resp.CanVerify = false;
|
||||
}
|
||||
//当前用户不是当前节点的审批人,不允许继续审批
|
||||
else if (flowinstance.MakerList != "1" && !flowinstance.MakerList.Contains(user.User.Id) &&
|
||||
!approvers.Contains(user.User.Id))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user