|
@@ -1680,6 +1680,35 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 终止会签
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="countersignId"></param>
|
|
|
+ /// <param name="workflowId"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task TerminalCountersignAsync(string countersignId, string? workflowId = null, CancellationToken cancellationToken = default)
|
|
|
+ {
|
|
|
+ var countersign = await _workflowCountersignRepository.GetAsync(countersignId, cancellationToken);
|
|
|
+ if (countersign is null)
|
|
|
+ throw new UserFriendlyException("无效会签编号");
|
|
|
+
|
|
|
+ //todo 1. 检查会签是否已结束 t: return 2.检查是否有嵌套会签 t: 一起结束 3.结束会签 4.trace 5.cp会签发起节点变为待办节点
|
|
|
+
|
|
|
+ /*
|
|
|
+ * //结束step会签信息
|
|
|
+ countersignStartStep.CountersignEnd();
|
|
|
+ updateSteps.Add(countersignStartStep);
|
|
|
+
|
|
|
+ //结束会签
|
|
|
+ currentCountersign.End(currentStep.Id, currentStep.Code, currentStep.BusinessType,
|
|
|
+ _sessionContext.RequiredUserId, _sessionContext.UserName,
|
|
|
+ _sessionContext.RequiredOrgId, _sessionContext.OrgName,
|
|
|
+ _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName);
|
|
|
+ await _workflowCountersignRepository.UpdateAsync(currentCountersign, cancellationToken);
|
|
|
+ */
|
|
|
+ }
|
|
|
+
|
|
|
private WorkflowStep? GetStep(List<WorkflowStep> steps, string orgCode, string userId,
|
|
|
Func<EWorkflowStepStatus, bool> predicate) =>
|
|
|
steps.FirstOrDefault(d =>
|