|
@@ -588,7 +588,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
{
|
|
{
|
|
var success = int.TryParse(stepDefine.HandlerTypeItems.First().Key, out var level);
|
|
var success = int.TryParse(stepDefine.HandlerTypeItems.First().Key, out var level);
|
|
int? orgLevel = success ? level : null;
|
|
int? orgLevel = success ? level : null;
|
|
- var nextStepOption = new NextStepOption
|
|
|
|
|
|
+ var nextStepOption = new NextStepOption
|
|
{
|
|
{
|
|
Key = stepDefine.Code,
|
|
Key = stepDefine.Code,
|
|
Value = stepDefine.Name,
|
|
Value = stepDefine.Name,
|
|
@@ -603,12 +603,12 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
dto.OrgIds.Contains(d.ParentId))
|
|
dto.OrgIds.Contains(d.ParentId))
|
|
.ToListAsync(cancellationToken);
|
|
.ToListAsync(cancellationToken);
|
|
nextStepOption.Items = orgs.Select(d => new FlowStepHandler
|
|
nextStepOption.Items = orgs.Select(d => new FlowStepHandler
|
|
- {
|
|
|
|
- Key = d.Id,
|
|
|
|
- Value = d.Name,
|
|
|
|
- OrgId = d.Id,
|
|
|
|
- OrgName = d.Name
|
|
|
|
- })
|
|
|
|
|
|
+ {
|
|
|
|
+ Key = d.Id,
|
|
|
|
+ Value = d.Name,
|
|
|
|
+ OrgId = d.Id,
|
|
|
|
+ OrgName = d.Name
|
|
|
|
+ })
|
|
.ToList();
|
|
.ToList();
|
|
nextStepOption.FlowDirection = _workflowDomainService.GetFlowDirection(dto.BusinessType, stepDefine.BusinessType);
|
|
nextStepOption.FlowDirection = _workflowDomainService.GetFlowDirection(dto.BusinessType, stepDefine.BusinessType);
|
|
stepOptions.Add(nextStepOption);
|
|
stepOptions.Add(nextStepOption);
|
|
@@ -886,26 +886,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
//汇总节点只能选择对应节点办理对象
|
|
//汇总节点只能选择对应节点办理对象
|
|
if (workflow.FlowType is EFlowType.Handle && stepDefine.StepType is EStepType.Summary)
|
|
if (workflow.FlowType is EFlowType.Handle && stepDefine.StepType is EStepType.Summary)
|
|
{
|
|
{
|
|
- //根据汇总对象id找到被汇总节点
|
|
|
|
- var summaryTargetStep = workflow.Steps.FirstOrDefault(d =>
|
|
|
|
- d.StepType == EStepType.Normal &&
|
|
|
|
- d.Code == stepDefine.SummaryTargetCode &&
|
|
|
|
- d.Status == EWorkflowStepStatus.Handled &&
|
|
|
|
- d.IsOrigin);
|
|
|
|
- if (summaryTargetStep is null)
|
|
|
|
- throw UserFriendlyException.SameMessage("未查询到汇总对象节点");
|
|
|
|
-
|
|
|
|
- var handler = new FlowStepHandler
|
|
|
|
- {
|
|
|
|
- Key = summaryTargetStep.HandlerId,
|
|
|
|
- Value = summaryTargetStep.HandlerName,
|
|
|
|
- UserId = summaryTargetStep.HandlerId,
|
|
|
|
- Username = summaryTargetStep.HandlerName,
|
|
|
|
- OrgId = summaryTargetStep.HandlerOrgId,
|
|
|
|
- OrgName = summaryTargetStep.HandlerOrgName,
|
|
|
|
- RoleId = summaryTargetStep.RoleId,
|
|
|
|
- RoleName = summaryTargetStep.RoleName
|
|
|
|
- };
|
|
|
|
|
|
+ var handler = _workflowDomainService.GetSummaryTargetFlowStepHandler(workflow, stepDefine.SummaryTargetCode);
|
|
|
|
|
|
nextStepOption = new NextStepOption
|
|
nextStepOption = new NextStepOption
|
|
{
|
|
{
|