tangjiang 11 tháng trước cách đây
mục cha
commit
bd8a4dafe1
1 tập tin đã thay đổi với 7 bổ sung6 xóa
  1. 7 6
      src/Hotline.Api/Controllers/Bi/BiOrderController.cs

+ 7 - 6
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -2403,8 +2403,7 @@ namespace Hotline.Api.Controllers.Bi
                          .Where(it => it.CreationTime >= dto.StartDate && it.CreationTime <= dto.EndDate && it.Status > EOrderStatus.WaitForAccept)
                          .WhereIF(dto.OrgCode == "001", it => it.ActualHandleOrgCode == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001", it => it.ActualHandleOrgCode.StartsWith(dto.OrgCode))
-                          .WhereIF(dto.StatisticsType == EStatisticsType.SubtotalOverdue, it => (it.Status >= EOrderStatus.Filed && it.ActualHandleTime > it.ExpiredTime)
-                                     || (it.Status < EOrderStatus.Filed && it.ExpiredTime < SqlFunc.GetDate()))//已办超期/待办超期
+                          .WhereIF(dto.StatisticsType == EStatisticsType.SubtotalOverdue, it => (it.Status >= EOrderStatus.Filed && it.ActualHandleTime > it.ExpiredTime))//已办超期
                          .Select(it => new SelectOrderId { Id = it.Id })
                          .MergeTable();
 
@@ -2412,12 +2411,14 @@ namespace Hotline.Api.Controllers.Bi
                 var queryCountersign = _workflowStepHandleRepository.Queryable()
                .LeftJoin<WorkflowTrace>((x, o) => x.WorkflowStepId == o.StepId)
                .LeftJoin<Order>((x, o, p) => o.WorkflowId == p.WorkflowId)
-               .Where((x, o, p) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CountersignPosition == ECountersignPosition.Multi
-               && o.CountersignPosition == ECountersignPosition.Single && o.CreationTime >= dto.StartDate && o.CreationTime <= dto.EndDate)
+               .Where((x, o, p) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartDate && o.CreationTime <= dto.EndDate)
                .WhereIF(dto.OrgCode == "001", (x, o, p) => x.OrgId == dto.OrgCode)
                .WhereIF(dto.OrgCode != "001", (x, o, p) => x.OrgId.StartsWith(dto.OrgCode))
-               .WhereIF(dto.StatisticsType == EStatisticsType.HQYBOverdue, (x, o, p) => (o.Status == EWorkflowStepStatus.Handled && o.HandleTime > o.StepExpiredTime)
-                        || (o.Status != EWorkflowStepStatus.Handled && DateTime.Now >= o.StepExpiredTime))//会签已办超期/会签待办超期
+
+               .WhereIF(dto.StatisticsType == EStatisticsType.SubtotalOverdue, (x, o, p) => (o.Status >= EWorkflowStepStatus.Handled && o.CountersignPosition > ECountersignPosition.None && o.HandleTime > o.StepExpiredTime)
+                        || (o.Status < EWorkflowStepStatus.Handled && o.CountersignPosition > ECountersignPosition.None && DateTime.Now >= o.StepExpiredTime)
+                        || (o.Status < EWorkflowStepStatus.Handled && DateTime.Now >= o.StepExpiredTime))//会签已办超期/会签待办超期/待办超期
+
                 .Select((x, o, p) => new SelectOrderId { Id = p.Id })
                .MergeTable();