|
@@ -2,6 +2,7 @@
|
|
|
using Hotline.FlowEngine.Definitions;
|
|
|
using Hotline.FlowEngine.Notifications;
|
|
|
using Hotline.FlowEngine.WorkflowModules;
|
|
|
+using Hotline.SeedData;
|
|
|
using Hotline.Settings;
|
|
|
using Hotline.Share.Dtos;
|
|
|
using Hotline.Share.Dtos.FlowEngine;
|
|
@@ -113,9 +114,9 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
_sessionContext.RequiredOrgId, _sessionContext.OrgName,
|
|
|
_sessionContext.OrgAreaCode, _sessionContext.OrgAreaName,
|
|
|
_sessionContext.OrgLevel);
|
|
|
- workflow.ActualHandlerKey = _sessionContext.RequiredUserId;
|
|
|
- workflow.ActualHandlerValue = _sessionContext.UserName;
|
|
|
- workflow.ActualHandlerType = EHandlerType.AssignedUser;
|
|
|
+ //workflow.ActualHandlerKey = _sessionContext.RequiredUserId;
|
|
|
+ //workflow.ActualHandlerValue = _sessionContext.UserName;
|
|
|
+ //workflow.ActualHandlerType = EHandlerType.AssignedUser;
|
|
|
|
|
|
var endTrace = await EndAsync(workflow, dto, firstStepDefine, startStep, cancellationToken: cancellationToken);
|
|
|
return;
|
|
@@ -150,10 +151,22 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
// startStep, firstSteps.First());
|
|
|
|
|
|
//指派实际办理节点
|
|
|
- if (!workflow.IsInCountersign &&
|
|
|
+ if (workflow.FlowType is EFlowType.Handle &&
|
|
|
+ !workflow.IsInCountersign &&
|
|
|
firstStepDefine.StepType != EStepType.Summary &&
|
|
|
firstStepDefine.StepType != EStepType.End)
|
|
|
- workflow.UpdateActualStepWhenAssign(firstSteps.First(), dto.NextHandlers.First(), dto.HandlerType);
|
|
|
+ {
|
|
|
+ if (firstStepDefine.BusinessType is EBusinessType.Center or EBusinessType.Send)
|
|
|
+ {
|
|
|
+ workflow.UpdateActualStepWhenAssign(firstSteps.First(), actualHandleOrgCode: OrgSeedData.CenterId, actualHandleOrgName: "热线中心");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var nextHandler = dto.NextHandlers.First();
|
|
|
+ workflow.UpdateActualStepWhenAssign(firstSteps.First(),
|
|
|
+ actualHandleOrgCode: nextHandler.Key, actualHandleOrgName: nextHandler.Value);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
//发起会签时记录顶层会签节点(必须在update currentStep之后)
|
|
@@ -479,11 +492,29 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
// _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName,
|
|
|
// currentStep, nextSteps?.FirstOrDefault());
|
|
|
|
|
|
+ ////指派实际办理节点
|
|
|
+ //if (!workflow.IsInCountersign &&
|
|
|
+ // nextStepDefine.StepType != EStepType.Summary &&
|
|
|
+ // nextStepDefine.StepType != EStepType.End)
|
|
|
+ // workflow.UpdateActualStepWhenAssign(nextSteps.First(), dto.NextHandlers.First(), dto.HandlerType);
|
|
|
+
|
|
|
//指派实际办理节点
|
|
|
- if (!workflow.IsInCountersign &&
|
|
|
+ if (workflow.FlowType is EFlowType.Handle &&
|
|
|
+ !workflow.IsInCountersign &&
|
|
|
nextStepDefine.StepType != EStepType.Summary &&
|
|
|
nextStepDefine.StepType != EStepType.End)
|
|
|
- workflow.UpdateActualStepWhenAssign(nextSteps.First(), dto.NextHandlers.First(), dto.HandlerType);
|
|
|
+ {
|
|
|
+ if (nextStepDefine.BusinessType is EBusinessType.Center or EBusinessType.Send)
|
|
|
+ {
|
|
|
+ workflow.UpdateActualStepWhenAssign(nextSteps.First(), actualHandleOrgCode: OrgSeedData.CenterId, actualHandleOrgName: "热线中心");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var nextHandler = dto.NextHandlers.First();
|
|
|
+ workflow.UpdateActualStepWhenAssign(nextSteps.First(),
|
|
|
+ actualHandleOrgCode: nextHandler.Key, actualHandleOrgName: nextHandler.Value);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//发起会签时记录顶层会签节点
|
|
|
if (dto.IsStartCountersign && !workflow.IsInCountersign)
|
|
@@ -554,7 +585,9 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
// operater.OrgId, operater.Organization.Name,
|
|
|
// operater.Organization.AreaCode, operater.Organization.AreaName,
|
|
|
// nextStep: newPrevStep);
|
|
|
- workflow.UpdateActualStepWhenAssign(newPrevStep, prevStep.Handlers.First(), prevStep.HandlerType);
|
|
|
+ //workflow.UpdateActualStepWhenAssign(newPrevStep, prevStep.Handlers.First(), prevStep.HandlerType);
|
|
|
+ workflow.UpdateActualStepWhenAssign(newPrevStep, prevStep.HandlerOrgName, prevStep.HandlerOrgId);
|
|
|
+
|
|
|
|
|
|
//更新流程可办理对象
|
|
|
workflow.UpdatePreviousHandlers(operater.Id, operater.OrgId, newPrevStep);
|
|
@@ -618,7 +651,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
// _sessionContext.RequiredOrgId, _sessionContext.OrgName,
|
|
|
// _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName,
|
|
|
// nextStep: newStartStep);
|
|
|
- workflow.UpdateActualStepWhenAssign(startStep, startStep.Handlers.First(), startStep.HandlerType);
|
|
|
+ workflow.UpdateActualStepWhenAssign(startStep, startStep.HandlerOrgName, startStep.HandlerOrgId);
|
|
|
|
|
|
var isOrgToCenter = CheckIfFlowFromOrgToCenter(workflow, startStep);
|
|
|
|
|
@@ -1553,7 +1586,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
// _sessionContext.RequiredOrgId, _sessionContext.OrgName,
|
|
|
// _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName,
|
|
|
// nextStep: targetStepNew);
|
|
|
- workflow.UpdateActualStepWhenAssign(targetStepNew, targetStep.Handlers.First(), targetStep.HandlerType);
|
|
|
+ workflow.UpdateActualStepWhenAssign(targetStepNew, targetStep.HandlerOrgName, targetStep.HandlerOrgId);
|
|
|
|
|
|
//calc workflow expired time
|
|
|
var isOrgToCenter = CheckIfFlowFromOrgToCenter(workflow, targetStep);
|