|
@@ -3248,8 +3248,8 @@ public class OrderController : BaseController
|
|
|
var hasHandled = dto.IsHandled.Value;
|
|
|
query = query.Where(d => SqlFunc.Subqueryable<WorkflowTrace>()
|
|
|
.Where(step => step.ExternalId == d.Id &&
|
|
|
- (!hasHandled || step.Status != EWorkflowStepStatus.Handled) &&
|
|
|
- (hasHandled || step.Status == EWorkflowStepStatus.Handled && step.TraceState != EWorkflowTraceState.StepRemoveByPrevious) &&
|
|
|
+ (hasHandled || step.Status != EWorkflowStepStatus.Handled) &&
|
|
|
+ (!hasHandled || step.Status == EWorkflowStepStatus.Handled && step.TraceState != EWorkflowTraceState.StepRemoveByPrevious) &&
|
|
|
((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) && step.HandlerId == _sessionContext.RequiredUserId) ||
|
|
|
(step.FlowAssignType == EFlowAssignType.Org && !string.IsNullOrEmpty(step.HandlerOrgId) && step.HandlerOrgId == _sessionContext.RequiredOrgId) ||
|
|
|
(step.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(step.RoleId) && _sessionContext.Roles.Contains(step.RoleId)))).Any() ||
|