Selaa lähdekoodia

派单量统计与明细不对 问题处理

田爽 6 kuukautta sitten
vanhempi
commit
14a661681d
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/Hotline.Api/Controllers/Bi/BiOrderController.cs

+ 3 - 1
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -30,6 +30,7 @@ using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using SqlSugar;
 using System.Data;
+using Hotline.SeedData;
 using XF.Domain.Authentications;
 using XF.Domain.Exceptions;
 using XF.Domain.Repository;
@@ -2518,7 +2519,8 @@ namespace Hotline.Api.Controllers.Bi
                        .LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
                        //.LeftJoin<WorkflowStepHandler>((x, w, wfsh) => x.StepId == wfsh.WorkflowStepId && wfsh.IsActualHandler == true)
                        .InnerJoin<SchedulingUser>((x, w, su) => x.HandlerId == su.UserId)
-                       .Where((x, w, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send)
+                       .Where((x, w, su) => w.ModuleCode == "OrderHandle" && x.BusinessType == EBusinessType.Send && x.Status == EWorkflowStepStatus.Handled
+                                            && !string.IsNullOrEmpty(x.NextMainHandler) && x.NextMainHandler != OrgSeedData.CenterId)
                        .Where((x, w, su) => x.CreationTime >= dto.StartTime.Value)
                        .Where((x, w, su) => x.CreationTime <= dto.EndTime.Value)
                        .GroupBy((x, w, su) => x.WorkflowId)