|
@@ -19,6 +19,7 @@ using Hotline.Share.Enums.Order;
|
|
|
using Hotline.Share.Requests;
|
|
|
using MapsterMapper;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
+using NPOI.SS.Formula.Functions;
|
|
|
using SqlSugar;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Constants;
|
|
@@ -1550,16 +1551,16 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(it => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = it.OrgCode,
|
|
|
- OrderCountNum = SqlFunc.AggregateCount(it.OrgCode),//总量
|
|
|
- YBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已办
|
|
|
- ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed, 1, 0)),//在办
|
|
|
+ // OrderCountNum = SqlFunc.AggregateCount(it.OrgCode),//总量
|
|
|
+ YBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已办// SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已办
|
|
|
+ ZBOrderCountNum = 0, //ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed, 1, 0)),//在办
|
|
|
Archived = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已归档
|
|
|
ToBeArchived = 0,
|
|
|
WaitPublished = 0,
|
|
|
PublishedOpen = 0,
|
|
|
PublishedNoOpen = 0,
|
|
|
YBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ActualHandleTime > it.ExpiredTime, 1, 0)),//已办超期
|
|
|
- ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed && it.ExpiredTime < SqlFunc.GetDate(), 1, 0)),//待办超期
|
|
|
+ ZBOverdue = 0,// SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed && it.ExpiredTime < SqlFunc.GetDate(), 1, 0)),//待办超期
|
|
|
CompleteOnTime = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ActualHandleTime <= it.ExpiredTime, 1, 0)),//按时办结
|
|
|
HQYBOverdue = 0,
|
|
|
HQZBOverdue = 0,
|
|
@@ -1594,7 +1595,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(it => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = it.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -1624,13 +1625,14 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
//会签(已办超期、待办超期)
|
|
|
var queryCountersign = _workflowStepHandleRepository.Queryable()
|
|
|
.LeftJoin<WorkflowTrace>((x, o) => x.WorkflowStepId == o.StepId)
|
|
|
- .Where((x, o) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CountersignPosition == ECountersignPosition.Multi && o.CountersignPosition == ECountersignPosition.Single && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
+ .Where((x, o) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
.Select((x, o) => new
|
|
|
{
|
|
|
OrgCode = IsCenter == true ? x.OrgId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : x.OrgId.Substring(0, _sessionContext.RequiredOrgId.Length + 3),// d.OrgId,
|
|
|
HandleTime = o.HandleTime,
|
|
|
StepExpiredTime = o.StepExpiredTime,
|
|
|
- Status = o.Status
|
|
|
+ Status = o.Status,
|
|
|
+ CountersignPosition = o.CountersignPosition
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.WhereIF(IsCenter == false, it => it.OrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
@@ -1638,21 +1640,21 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(d => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = d.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ //OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
- ZBOrderCountNum = 0,//在办
|
|
|
+ ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status < EWorkflowStepStatus.Handled, 1, 0)),// 0,//在办
|
|
|
Archived = 0,
|
|
|
ToBeArchived = 0,
|
|
|
WaitPublished = 0,
|
|
|
PublishedOpen = 0,
|
|
|
PublishedNoOpen = 0,
|
|
|
YBOverdue = 0,
|
|
|
- ZBOverdue = 0,
|
|
|
+ ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),// 0,
|
|
|
CompleteOnTime = 0,
|
|
|
- HQYBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status == EWorkflowStepStatus.Handled && d.HandleTime > d.StepExpiredTime, 1, 0)),
|
|
|
- HQZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status != EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),
|
|
|
- DelayEnd = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status == EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
- DelayWait = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status != EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
+ HQYBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status >= EWorkflowStepStatus.Handled && d.HandleTime > d.StepExpiredTime, 1, 0)),
|
|
|
+ HQZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),
|
|
|
+ DelayEnd = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status >= EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
+ DelayWait = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status <= EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
OrderDelayCount = 0,
|
|
|
ScreenCount = 0,
|
|
|
ScreenApproval = 0,
|
|
@@ -1679,7 +1681,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -1722,7 +1724,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -1763,7 +1765,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -1797,7 +1799,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
OrgCode = p.OrgCode,
|
|
|
OrgName = o.Name,
|
|
|
OrgType = o.OrgType,
|
|
|
- OrderCountNum = p.OrderCountNum,
|
|
|
+ //OrderCountNum = p.OrderCountNum,
|
|
|
YBOrderCountNum = p.YBOrderCountNum,
|
|
|
ZBOrderCountNum = p.ZBOrderCountNum,
|
|
|
Archived = p.Archived,
|
|
@@ -1829,7 +1831,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
OrgCode = "",
|
|
|
OrgName = "合计",
|
|
|
OrgType = EOrgType.City,
|
|
|
- OrderCountNum = items.Sum(p => p.OrderCountNum),
|
|
|
+ // OrderCountNum = items.Sum(p => p.OrderCountNum),
|
|
|
YBOrderCountNum = items.Sum(p => p.YBOrderCountNum),
|
|
|
ZBOrderCountNum = items.Sum(p => p.ZBOrderCountNum),
|
|
|
Archived = items.Sum(p => p.Archived),
|
|
@@ -1892,16 +1894,16 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(it => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = it.OrgCode,
|
|
|
- OrderCountNum = SqlFunc.AggregateCount(it.OrgCode),//总量
|
|
|
+ // OrderCountNum = SqlFunc.AggregateCount(it.OrgCode),//总量
|
|
|
YBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已办
|
|
|
- ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed, 1, 0)),//在办
|
|
|
+ ZBOrderCountNum = 0,// ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed, 1, 0)),//在办
|
|
|
Archived = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed, 1, 0)),//已归档
|
|
|
ToBeArchived = 0,
|
|
|
WaitPublished = 0,
|
|
|
PublishedOpen = 0,
|
|
|
PublishedNoOpen = 0,
|
|
|
YBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ActualHandleTime > it.ExpiredTime, 1, 0)),//已办超期
|
|
|
- ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed && it.ExpiredTime < SqlFunc.GetDate(), 1, 0)),//待办超期
|
|
|
+ ZBOverdue = 0,// SqlFunc.AggregateSum(SqlFunc.IIF(it.Status < EOrderStatus.Filed && it.ExpiredTime < SqlFunc.GetDate(), 1, 0)),//待办超期
|
|
|
CompleteOnTime = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ActualHandleTime <= it.ExpiredTime, 1, 0)),//按时办结
|
|
|
HQYBOverdue = 0,
|
|
|
HQZBOverdue = 0,
|
|
@@ -1937,7 +1939,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(it => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = it.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -1967,36 +1969,37 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
//会签(已办超期、待办超期)
|
|
|
var queryCountersign = _workflowStepHandleRepository.Queryable()
|
|
|
.LeftJoin<WorkflowTrace>((x, o) => x.WorkflowStepId == o.StepId)
|
|
|
- .Where((x, o) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CountersignPosition == ECountersignPosition.Multi && o.CountersignPosition == ECountersignPosition.Single && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
+ .Where((x, o) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
.WhereIF(OrgCode == "001", (x, o) => x.OrgId == OrgCode)
|
|
|
.WhereIF(OrgCode != "001", (x, o) => x.OrgId.StartsWith(OrgCode))
|
|
|
.Select((x, o) => new
|
|
|
{
|
|
|
OrgCode = x.OrgId.Substring(0, OrgCode.Length + 3),
|
|
|
- HandleTime = o.HandleTime,
|
|
|
- StepExpiredTime = o.StepExpiredTime,
|
|
|
- Status = o.Status
|
|
|
+ o.HandleTime,
|
|
|
+ o.StepExpiredTime,
|
|
|
+ o.Status,
|
|
|
+ o.CountersignPosition,
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.GroupBy(d => new { d.OrgCode })
|
|
|
.Select(d => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = d.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
- ZBOrderCountNum = 0,//在办
|
|
|
+ ZBOrderCountNum = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status < EWorkflowStepStatus.Handled, 1, 0)),// 0,//在办
|
|
|
Archived = 0,
|
|
|
ToBeArchived = 0,
|
|
|
WaitPublished = 0,
|
|
|
PublishedOpen = 0,
|
|
|
PublishedNoOpen = 0,
|
|
|
YBOverdue = 0,
|
|
|
- ZBOverdue = 0,
|
|
|
+ ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),// 0,
|
|
|
CompleteOnTime = 0,
|
|
|
- HQYBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status == EWorkflowStepStatus.Handled && d.HandleTime > d.StepExpiredTime, 1, 0)),
|
|
|
- HQZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status != EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),
|
|
|
- DelayEnd = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status == EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
- DelayWait = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status != EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
+ HQYBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status >= EWorkflowStepStatus.Handled && d.HandleTime > d.StepExpiredTime, 1, 0)),
|
|
|
+ HQZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),
|
|
|
+ DelayEnd = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status >= EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
+ DelayWait = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status < EWorkflowStepStatus.Handled, 1, 0)),
|
|
|
OrderDelayCount = 0,
|
|
|
ScreenCount = 0,
|
|
|
ScreenApproval = 0,
|
|
@@ -2024,7 +2027,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -2055,7 +2058,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var orderScreen = _orderScreenRepository.Queryable()
|
|
|
.Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
.WhereIF(!string.IsNullOrEmpty(OrgName), x => x.CreatorOrgId.Contains(OrgName))
|
|
|
- .WhereIF(OrgCode == "001", x => x.CreatorOrgId == OrgCode)
|
|
|
+ .WhereIF(OrgCode == "001", x => x.CreatorOrgId == OrgCode)
|
|
|
.WhereIF(OrgCode != "001", x => x.CreatorOrgId.StartsWith(OrgCode))
|
|
|
.Select(x => new
|
|
|
{
|
|
@@ -2068,7 +2071,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -2110,7 +2113,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select(x => new DepartmentalProcessingStatisticsDataDto
|
|
|
{
|
|
|
OrgCode = x.OrgCode,
|
|
|
- OrderCountNum = 0,//总量
|
|
|
+ // OrderCountNum = 0,//总量
|
|
|
YBOrderCountNum = 0,//已办
|
|
|
ZBOrderCountNum = 0,//在办
|
|
|
Archived = 0,
|
|
@@ -2144,7 +2147,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
OrgCode = p.OrgCode,
|
|
|
OrgName = o.Name,
|
|
|
OrgType = o.OrgType,
|
|
|
- OrderCountNum = p.OrderCountNum,
|
|
|
+ //OrderCountNum = p.OrderCountNum,
|
|
|
YBOrderCountNum = p.YBOrderCountNum,
|
|
|
ZBOrderCountNum = p.ZBOrderCountNum,
|
|
|
Archived = p.Archived,
|
|
@@ -2177,7 +2180,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
OrgCode = "",
|
|
|
OrgName = "合计",
|
|
|
OrgType = EOrgType.City,
|
|
|
- OrderCountNum = items.Sum(p => p.OrderCountNum),
|
|
|
+ // OrderCountNum = items.Sum(p => p.OrderCountNum),
|
|
|
YBOrderCountNum = items.Sum(p => p.YBOrderCountNum),
|
|
|
ZBOrderCountNum = items.Sum(p => p.ZBOrderCountNum),
|
|
|
Archived = items.Sum(p => p.Archived),
|
|
@@ -2219,11 +2222,9 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
switch (dto.StatisticsType)
|
|
|
{
|
|
|
case EStatisticsType.YBOrderCountNum:
|
|
|
- case EStatisticsType.ZBOrderCountNum:
|
|
|
case EStatisticsType.ToBeArchived:
|
|
|
case EStatisticsType.Archived:
|
|
|
case EStatisticsType.YBOverdue:
|
|
|
- case EStatisticsType.ZBOverdue:
|
|
|
//工单
|
|
|
stye = "1";
|
|
|
break;
|
|
@@ -2252,6 +2253,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
case EStatisticsType.HQZBOverdue:
|
|
|
case EStatisticsType.DelayEnd:
|
|
|
case EStatisticsType.DelayWait:
|
|
|
+ case EStatisticsType.ZBOrderCountNum:
|
|
|
+ case EStatisticsType.ZBOverdue:
|
|
|
//会签
|
|
|
stye = "5";
|
|
|
break;
|
|
@@ -2367,13 +2370,17 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var queryCountersign = await _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) => 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)//会签已办超期
|
|
|
- .WhereIF(dto.StatisticsType == EStatisticsType.HQZBOverdue, (x, o, p) => o.Status != EWorkflowStepStatus.Handled && DateTime.Now >= o.StepExpiredTime)//会签待办超期
|
|
|
- .WhereIF(dto.StatisticsType == EStatisticsType.DelayEnd, (x, o, p) => o.Status == EWorkflowStepStatus.Handled)//会签已办
|
|
|
- .WhereIF(dto.StatisticsType == EStatisticsType.DelayWait, (x, o, p) => o.Status != EWorkflowStepStatus.Handled)//会签待办
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.HQYBOverdue, (x, o, p) => o.Status >= EWorkflowStepStatus.Handled && o.HandleTime > o.StepExpiredTime && o.CountersignPosition > ECountersignPosition.None)//会签已办超期
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.HQZBOverdue, (x, o, p) => o.Status < EWorkflowStepStatus.Handled && DateTime.Now >= o.StepExpiredTime && o.CountersignPosition > ECountersignPosition.None)//会签待办超期
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.DelayEnd, (x, o, p) => o.Status >= EWorkflowStepStatus.Handled && o.CountersignPosition > ECountersignPosition.None)//会签已办
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.DelayWait, (x, o, p) => o.Status < EWorkflowStepStatus.Handled && o.CountersignPosition > ECountersignPosition.None)//会签待办
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.ZBOrderCountNum, (x, o, p) => o.Status < EWorkflowStepStatus.Handled)//在办总量
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.ZBOverdue, (x, o, p) => o.Status < EWorkflowStepStatus.Handled && DateTime.Now >= o.StepExpiredTime)//在办超期
|
|
|
+
|
|
|
.OrderByDescending((x, o, p) => p.CreationTime)
|
|
|
.Select((x, o, p) => new { p })
|
|
|
.ToPageListAsync(dto.PageIndex, dto.PageSize, total, HttpContext.RequestAborted);
|