|
@@ -227,21 +227,21 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.WhereIF(dto.StartTime.HasValue, it => it.CreationTime >= dto.StartTime)
|
|
|
.WhereIF(dto.EndTime.HasValue, it => it.CreationTime <= dto.EndTime)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), it => it.SignerName.Contains(dto.Keyword!))
|
|
|
- .GroupBy(it => new { it.CreatorId, it.CreatorName })
|
|
|
+ .GroupBy(it => new { it.SignerId, it.SignerName })
|
|
|
.Select(it => new OrderBiCentreDataListVo
|
|
|
{
|
|
|
- UserName = it.CreatorName,
|
|
|
- UserId = it.CreatorId,
|
|
|
+ UserName = it.SignerName,
|
|
|
+ UserId = it.SignerId,
|
|
|
//Subtotal = SqlFunc.AggregateCount(x.AcceptorId),
|
|
|
- CentreArchive = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Zhiban, 1, 0)), //中心归档件
|
|
|
+ CentreArchive = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Zhiban && it.AcceptType != "无效", 1, 0)), //中心归档件
|
|
|
//CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && (it.FileUserRole == EFileUserType.Org || it.FileUserRole == EFileUserType.Dispatch), 1, 0)), //转办信件
|
|
|
- CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.ProcessType == EProcessType.Jiaoban || it.FileUserRole == EFileUserType.Dispatch || it.ActualHandleStepName == "派单组", 1, 0)),
|
|
|
- NoCentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status <= EOrderStatus.SpecialToUnAccept || it.ActualHandleStepName == "班长审批", 1, 0)), //坐席待办 //中心领导?市领导? 是否在统计条件中
|
|
|
+ CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptType != "无效" && (it.ProcessType == EProcessType.Jiaoban || (it.ActualHandleStepName == "派单组" && it.Status< EOrderStatus.Filed ) || (it.ActualHandleStepName == "班长审批" && it.Status < EOrderStatus.Filed)),1,0)),
|
|
|
+ NoCentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptType != "无效" && (it.Status <= EOrderStatus.SpecialToUnAccept), 1, 0)), //坐席待办 //中心领导?市领导? 是否在统计条件中
|
|
|
//CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Jiaoban, 1, 0)),
|
|
|
//NoCentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF((int)x.Status < 300 && x.ExpiredTime > x.FiledTime, 1, 0)),
|
|
|
Invalid = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptType == "无效", 1, 0)),
|
|
|
Repeat = SqlFunc.AggregateSum(SqlFunc.IIF(it.DuplicateIds != null && SqlFunc.JsonArrayLength(it.DuplicateIds) > 0, 1, 0)),
|
|
|
- Subtotal = SqlFunc.AggregateSum(SqlFunc.IIF((it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Zhiban) || (it.ProcessType == EProcessType.Jiaoban || it.FileUserRole == EFileUserType.Dispatch || it.ActualHandleStepName == "派单组") || (it.Status <= EOrderStatus.SpecialToUnAccept || it.ActualHandleStepName == "班长审批") || it.AcceptType == "无效" || (it.DuplicateIds != null && SqlFunc.JsonArrayLength(it.DuplicateIds) > 0), 1, 0))
|
|
|
+ Subtotal = SqlFunc.AggregateSum(SqlFunc.IIF((it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Zhiban && it.AcceptType != "无效") || (it.AcceptType != "无效" && (it.ProcessType == EProcessType.Jiaoban || (it.ActualHandleStepName == "派单组" && it.Status < EOrderStatus.Filed) || (it.ActualHandleStepName == "班长审批" && it.Status < EOrderStatus.Filed))) || (it.Status <= EOrderStatus.SpecialToUnAccept) || it.AcceptType == "无效" || (it.DuplicateIds != null && SqlFunc.JsonArrayLength(it.DuplicateIds) > 0), 1, 0))
|
|
|
}).MergeTable();
|
|
|
switch (dto.SortField)
|
|
|
{
|
|
@@ -270,7 +270,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
query = query.OrderByDescending(x => x.Subtotal);
|
|
|
}
|
|
|
|
|
|
- var list = await query.Where(x => (x.CentreArchive + x.CentreCareOf + x.Invalid + x.Repeat) != 0).ToListAsync(HttpContext.RequestAborted);
|
|
|
+ var list = await query.Where(x => (x.CentreArchive + x.CentreCareOf + x.NoCentreCareOf + x.Invalid + x.Repeat) != 0).ToListAsync(HttpContext.RequestAborted);
|
|
|
return list;
|
|
|
}
|
|
|
|