|
@@ -1261,8 +1261,9 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
case EDynamicPolicy.OrgUpLeadCenterTop:
|
|
|
orgLevel = _sessionContext.OrgLevel - 1;
|
|
|
if (orgLevel < 0) orgLevel = 0;
|
|
|
-
|
|
|
- if (orgLevel == 0)
|
|
|
+ isLead = _sessionContext.Roles.Any(x => x == leadRoleCode);
|
|
|
+ isSkip = await _userRepository.Queryable().AnyAsync(x => x.OrgId == _sessionContext.RequiredOrgId && x.Roles.Any(r => r.Name == leadRoleCode), cancellationToken);
|
|
|
+ if (orgLevel == 0 && (isLead || !isSkip))
|
|
|
{
|
|
|
businessType = EBusinessType.Send;
|
|
|
if (currentBusinessType == EBusinessType.Department)
|
|
@@ -1284,10 +1285,8 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
|
|
|
businessType = EBusinessType.Department;
|
|
|
handlerType = EHandlerType.AssignedOrgOrRole;
|
|
|
upperOrgId = _sessionContext.RequiredOrgId.GetHigherOrgId(_sessionContext.OrgLevel);
|
|
|
- isLead = _sessionContext.Roles.Any(x => x == leadRoleCode);
|
|
|
if (!isLead)
|
|
|
{
|
|
|
- isSkip = await _userRepository.Queryable().AnyAsync(x => x.OrgId == _sessionContext.RequiredOrgId && x.Roles.Any(r => r.Name == leadRoleCode), cancellationToken);
|
|
|
if (isSkip)
|
|
|
{
|
|
|
roleId = leadRoleCode;
|