|
@@ -411,18 +411,23 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
//会签办理节点办理时更新会签members字段
|
|
|
if (currentStep.CountersignPosition is ECountersignPosition.Multi or ECountersignPosition.Single)
|
|
|
{
|
|
|
- //会签中正常办理节点,更新会签members办理状态
|
|
|
- var countersign =
|
|
|
- workflow.Countersigns.FirstOrDefault(d => !d.IsCompleted() && d.Id == currentStep.CountersignId);
|
|
|
- if (countersign is null)
|
|
|
- throw new UserFriendlyException(
|
|
|
- $"会签数据异常, workflowId: {currentStep.WorkflowId}, countersignId: {currentStep.CountersignId}",
|
|
|
- "会签数据异常");
|
|
|
- countersign.MemberHandled(current.RequiredUserId, current.RequiredOrgId);
|
|
|
- //update cs
|
|
|
- await _workflowCountersignRepository.UpdateNav(countersign)
|
|
|
- .Include(d => d.Members)
|
|
|
- .ExecuteCommandAsync();
|
|
|
+ if (!string.IsNullOrEmpty(currentStep.CountersignId))
|
|
|
+ {
|
|
|
+ //会签中正常办理节点,更新会签members办理状态
|
|
|
+ var countersign =
|
|
|
+ workflow.Countersigns.FirstOrDefault(d => !d.IsCompleted() && d.Id == currentStep.CountersignId);
|
|
|
+ if (countersign is not null)
|
|
|
+ {
|
|
|
+ //throw new UserFriendlyException(
|
|
|
+ // $"会签数据异常, workflowId: {currentStep.WorkflowId}, countersignId: {currentStep.CountersignId}",
|
|
|
+ // "会签数据异常");
|
|
|
+ countersign.MemberHandled(current.RequiredUserId, current.RequiredOrgId);
|
|
|
+ //update cs
|
|
|
+ await _workflowCountersignRepository.UpdateNav(countersign)
|
|
|
+ .Include(d => d.Members)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
await _workflowStepRepository.UpdateRangeAsync(updateSteps, cancellationToken);
|