|
@@ -1284,8 +1284,8 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
{
|
|
|
if (currentStep.IsCountersignEndStep)
|
|
|
{
|
|
|
- //todo check if current is topend f: csStartStep.prev
|
|
|
- //todo t: check if dto.StartCs t: csconfig f: config
|
|
|
+ // check if current is topend f: csStartStep.prev
|
|
|
+ // t: check if dto.StartCs t: csconfig f: config
|
|
|
if (currentStep.IsTopCountersignEndStep(workflow.TopCountersignStepId))
|
|
|
{
|
|
|
if (dto.IsStartCountersign)
|
|
@@ -1303,7 +1303,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //todo csStartStep.prev
|
|
|
+ // csStartStep.prev
|
|
|
var csStartStep =
|
|
|
workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
|
|
|
if (csStartStep is null)
|
|
@@ -1419,7 +1419,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
{
|
|
|
// 创建会签汇总节点
|
|
|
var countersignEndStep =
|
|
|
- await CreateCountersignEndStepAsync(prevStep, dto, expiredTime, cancellationToken);
|
|
|
+ await CreateCountersignEndStepAsync(prevStep, dto, expiredTime, cancellationToken: cancellationToken);
|
|
|
nextSteps = new List<WorkflowStep> { countersignEndStep };
|
|
|
|
|
|
//create trace
|
|
@@ -1432,7 +1432,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
}
|
|
|
|
|
|
private async Task<WorkflowStep> CreateCountersignEndStepAsync(WorkflowStep countersignStartStep,
|
|
|
- BasicWorkflowDto dto, DateTime? expiredTime, CancellationToken cancellationToken)
|
|
|
+ BasicWorkflowDto dto, DateTime? expiredTime, string? opinion = null, CancellationToken cancellationToken = default)
|
|
|
{
|
|
|
var csEndStep = _mapper.Map<WorkflowStep>(countersignStartStep);
|
|
|
csEndStep.Status = EWorkflowStepStatus.WaitForAccept;
|
|
@@ -1454,6 +1454,9 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
csEndStep.Reset();
|
|
|
csEndStep.ResetParameters();
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(opinion))
|
|
|
+ csEndStep.Opinion = opinion;
|
|
|
+
|
|
|
await _workflowStepRepository.AddAsync(csEndStep, cancellationToken);
|
|
|
return csEndStep;
|
|
|
}
|
|
@@ -2235,7 +2238,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
if (handlerType.HasValue)
|
|
|
step.HandlerType = handlerType.Value;
|
|
|
|
|
|
- if(!string.IsNullOrEmpty(opinion))
|
|
|
+ if (!string.IsNullOrEmpty(opinion))
|
|
|
step.Opinion = opinion;
|
|
|
|
|
|
return step;
|