|
@@ -17,20 +17,20 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
private readonly IDefinitionDomainService _definitionDomainService;
|
|
private readonly IDefinitionDomainService _definitionDomainService;
|
|
private readonly IWorkflowDomainService _workflowDomainService;
|
|
private readonly IWorkflowDomainService _workflowDomainService;
|
|
private readonly IWorkflowRepository _workflowRepository;
|
|
private readonly IWorkflowRepository _workflowRepository;
|
|
- private readonly IUserRepository _userRepository;
|
|
|
|
|
|
+ private readonly IUserDomainService _userDomainService;
|
|
private readonly ISessionContext _sessionContext;
|
|
private readonly ISessionContext _sessionContext;
|
|
|
|
|
|
public WorkflowApplication(
|
|
public WorkflowApplication(
|
|
IDefinitionDomainService definitionDomainService,
|
|
IDefinitionDomainService definitionDomainService,
|
|
IWorkflowDomainService workflowDomainService,
|
|
IWorkflowDomainService workflowDomainService,
|
|
IWorkflowRepository workflowRepository,
|
|
IWorkflowRepository workflowRepository,
|
|
- IUserRepository userRepository,
|
|
|
|
|
|
+ IUserDomainService userDomainService,
|
|
ISessionContext sessionContext)
|
|
ISessionContext sessionContext)
|
|
{
|
|
{
|
|
_definitionDomainService = definitionDomainService;
|
|
_definitionDomainService = definitionDomainService;
|
|
_workflowDomainService = workflowDomainService;
|
|
_workflowDomainService = workflowDomainService;
|
|
_workflowRepository = workflowRepository;
|
|
_workflowRepository = workflowRepository;
|
|
- _userRepository = userRepository;
|
|
|
|
|
|
+ _userDomainService = userDomainService;
|
|
_sessionContext = sessionContext;
|
|
_sessionContext = sessionContext;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -67,7 +67,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
|
|
|
private async Task<bool> CheckIfFlowOutOfCallCenterAsync(StepDefine nextStepBoxDefine, string mainHandler, CancellationToken CancellationToken)
|
|
private async Task<bool> CheckIfFlowOutOfCallCenterAsync(StepDefine nextStepBoxDefine, string mainHandler, CancellationToken CancellationToken)
|
|
{
|
|
{
|
|
- //todo current is center & next is not center return true
|
|
|
|
|
|
+ //current is center & next is not center return true
|
|
var isFromCallCenter = IsOrgFromCallCenter(_sessionContext.RequiredOrgCode);
|
|
var isFromCallCenter = IsOrgFromCallCenter(_sessionContext.RequiredOrgCode);
|
|
if (!isFromCallCenter) return false;
|
|
if (!isFromCallCenter) return false;
|
|
|
|
|
|
@@ -80,8 +80,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
if (nextStepBoxDefine.HandlerType is EHandlerType.AssignUser or EHandlerType.Role)
|
|
if (nextStepBoxDefine.HandlerType is EHandlerType.AssignUser or EHandlerType.Role)
|
|
{
|
|
{
|
|
//mainHandler is userId
|
|
//mainHandler is userId
|
|
- //todo 临时处理方案(暂时耦合user)
|
|
|
|
- var handler = await _userRepository.GetAsync(mainHandler, cancellationToken);
|
|
|
|
|
|
+ var handler = await _userDomainService.GetUserAsync(mainHandler, cancellationToken);
|
|
if (handler == null)
|
|
if (handler == null)
|
|
throw new UserFriendlyException($"mainHandler未找到对应User, handler: {mainHandler}");
|
|
throw new UserFriendlyException($"mainHandler未找到对应User, handler: {mainHandler}");
|
|
if (string.IsNullOrEmpty(handler.OrgCode))
|
|
if (string.IsNullOrEmpty(handler.OrgCode))
|
|
@@ -100,7 +99,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
/// 是否为呼叫中心部门
|
|
/// 是否为呼叫中心部门
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- private bool IsOrgFromCallCenter(string orgCode) => orgCode.StartsWith(OrgSeedData.Code);
|
|
|
|
|
|
+ private bool IsOrgFromCallCenter(string orgCode) => orgCode.StartsWith(OrgSeedData.CallCenterCode);
|
|
|
|
|
|
|
|
|
|
|
|
|