|
@@ -72,6 +72,7 @@ using System.Linq;
|
|
|
using System.Linq.Dynamic.Core;
|
|
|
using System.Threading;
|
|
|
using Hotline.Application.CallCenter;
|
|
|
+using Hotline.Repository.SqlSugar.Orders;
|
|
|
|
|
|
namespace Hotline.Application.Orders;
|
|
|
|
|
@@ -333,8 +334,11 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
var IsCenter = _sessionContextProvider.SessionContext.OrgIsCenter;
|
|
|
int orgLevel = _sessionContextProvider.SessionContext.OrgLevel;
|
|
|
var orgCode = _sessionContextProvider.SessionContext.OrgId;
|
|
|
- return _orderRepository.Queryable(canView: !IsCenter).Includes(d => d.OrderDelays)
|
|
|
-
|
|
|
+ //var query = _orderRepository.Queryable();
|
|
|
+ //if (IsCenter == true)
|
|
|
+ // query = _orderRepository.Queryable(canView: !IsCenter);
|
|
|
+ //return query.Includes(d => d.OrderDelays)
|
|
|
+ return _orderRepository.Queryable(canView: !IsCenter)
|
|
|
.WhereIF(orgLevel == 3, d => SqlFunc.Subqueryable<WorkflowStep>()
|
|
|
.Where(step => step.ExternalId == d.Id && step.Status != EWorkflowStepStatus.Handled &&
|
|
|
((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) &&
|