Parcourir la source

派单量统计调整

田爽 il y a 11 mois
Parent
commit
81eb3bab38
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      src/Hotline.Api/Controllers/Bi/BiOrderController.cs

+ 4 - 4
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -2782,7 +2782,7 @@ namespace Hotline.Api.Controllers.Bi
 
             var items = await _workflowTraceRepository.Queryable()
                 .LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
-                .LeftJoin<WorkflowStepHandler>((x, w, wsh) => x.StepId == wsh.WorkflowStepId)
+                .LeftJoin<WorkflowStepHandler>((x, w, wsh) => x.StepId == wsh.WorkflowStepId && wsh.IsActualHandler == true)
                 .InnerJoin<SchedulingUser>((x, w, wsh, su) => wsh.UserId == su.UserId)
                 .Where((x, w, wsh, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send)
                 .Where((x, w, wsh, su) => x.CreationTime >= dto.StartTime.Value)
@@ -2799,7 +2799,7 @@ namespace Hotline.Api.Controllers.Bi
                 }).ToListAsync();
             var items2 = await _workflowTraceRepository.Queryable()
                 .LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
-                .LeftJoin<WorkflowStepHandler>((x, w, wfsh) => x.StepId == wfsh.WorkflowStepId)
+                .LeftJoin<WorkflowStepHandler>((x, w, wfsh) => x.StepId == wfsh.WorkflowStepId && wfsh.IsActualHandler == true)
                 .InnerJoin<SchedulingUser>((x, w, wfsh, su) => wfsh.UserId == su.UserId)
                 .Where((x, w, wfsh, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send)
                 .Where((x, w, wfsh, su) => x.CreationTime >= dto.StartTime.Value)
@@ -2853,7 +2853,7 @@ namespace Hotline.Api.Controllers.Bi
 
             var (total, items) = await _workflowTraceRepository.Queryable()
                 .LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
-                .LeftJoin<WorkflowStepHandler>((x, w, wsh) => x.StepId == wsh.WorkflowStepId)
+                .LeftJoin<WorkflowStepHandler>((x, w, wsh) => x.StepId == wsh.WorkflowStepId && wsh.IsActualHandler == true)
                 .InnerJoin<SchedulingUser>((x, w, wsh, su) => wsh.UserId == su.UserId)
                 .Where((x, w, wsh, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send)
                 .Where((x, w, wsh, su) => x.CreationTime >= dto.StartTime.Value)
@@ -2871,7 +2871,7 @@ namespace Hotline.Api.Controllers.Bi
             {
                 (total, items) = await _workflowTraceRepository.Queryable()
                        .LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
-                       .LeftJoin<WorkflowStepHandler>((x, w, wfsh) => x.StepId == wfsh.WorkflowStepId)
+                       .LeftJoin<WorkflowStepHandler>((x, w, wfsh) => x.StepId == wfsh.WorkflowStepId && wfsh.IsActualHandler == true)
                        .InnerJoin<SchedulingUser>((x, w, wfsh, su) => wfsh.UserId == su.UserId)
                        .Where((x, w, wfsh, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send)
                        .Where((x, w, wfsh, su) => x.CreationTime >= dto.StartTime.Value)