|
@@ -1544,9 +1544,10 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="StartDate"></param>
|
|
|
/// <param name="EndDate"></param>
|
|
|
/// <param name="OrgName"></param>
|
|
|
+ /// <param name="IsProvince"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("departmental_processing_statistics")]
|
|
|
- public async Task<object> DepartmentalProcessingStatistics(DateTime StartDate, DateTime EndDate, string? OrgName)
|
|
|
+ public async Task<object> DepartmentalProcessingStatistics(DateTime StartDate, DateTime EndDate, string? OrgName, bool? IsProvince)
|
|
|
{
|
|
|
EndDate = EndDate.AddDays(1).AddSeconds(-1);
|
|
|
var IsCenter = _sessionContext.OrgIsCenter;
|
|
@@ -1555,6 +1556,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 工单
|
|
|
var queryOrder = _orderRepository.Queryable()
|
|
|
.Where(it => it.CreationTime >= StartDate && it.CreationTime <= EndDate && it.Status > EOrderStatus.WaitForAccept)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, it => it.Source == ESource.ProvinceStraight)
|
|
|
.Select(it => new
|
|
|
{
|
|
|
it.Id,
|
|
@@ -1605,12 +1607,13 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var queryPublish = _orderPublishRepository.Queryable()
|
|
|
.LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
.Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
.Select((x, o) => new
|
|
|
{
|
|
|
o.Id,
|
|
|
OrgCode = IsCenter == true ? o.ActualHandleOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : o.ActualHandleOrgCode.Substring(0, _sessionContext.RequiredOrgId.Length + 3),
|
|
|
- PublishState = x.PublishState,
|
|
|
- Status = o.Status
|
|
|
+ x.PublishState,
|
|
|
+ o.Status
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.WhereIF(IsCenter == false, it => it.OrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
@@ -1648,14 +1651,16 @@ 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.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
- .Select((x, o) => new
|
|
|
+ .LeftJoin<Order>((x, o, p) => x.WorkflowId == o.WorkflowId)
|
|
|
+ .Where((x, o, p) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o, p) => 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,
|
|
|
- CountersignPosition = o.CountersignPosition
|
|
|
+ o.HandleTime,
|
|
|
+ o.StepExpiredTime,
|
|
|
+ o.Status,
|
|
|
+ o.CountersignPosition
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.WhereIF(IsCenter == false, it => it.OrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
@@ -1692,8 +1697,10 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 延期
|
|
|
//延期
|
|
|
var orderDelay = _orderDelayRepository.Queryable()
|
|
|
- .Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
+ .Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o) => new
|
|
|
{
|
|
|
OrgCode = IsCenter == true ? x.ApplyOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : x.ApplyOrgCode.Substring(0, _sessionContext.RequiredOrgId.Length + 3),
|
|
|
x.DelayState
|
|
@@ -1733,13 +1740,15 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 甄别
|
|
|
//甄别
|
|
|
var orderScreen = _orderScreenRepository.Queryable()
|
|
|
- .Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(OrgName), x => x.CreatorOrgId.Contains(OrgName))
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
+ .Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(OrgName), (x, o) => x.CreatorOrgId.Contains(OrgName))
|
|
|
+ .Select((x, o) => new
|
|
|
{
|
|
|
x.Id,
|
|
|
OrgCode = IsCenter == true ? x.CreatorOrgId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : x.CreatorOrgId.Substring(0, _sessionContext.RequiredOrgId.Length + 3),
|
|
|
- Status = x.Status
|
|
|
+ x.Status
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.WhereIF(IsCenter == false, it => it.OrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
@@ -1776,8 +1785,11 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 满意度
|
|
|
//满意度
|
|
|
var orderVisit = _orderVisitDetailRepository.Queryable()
|
|
|
- .Where(x => x.OrderVisit.VisitTime >= StartDate && x.OrderVisit.VisitTime <= EndDate && x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<OrderVisit>((x, o) => x.VisitId == o.Id)
|
|
|
+ .LeftJoin<Order>((x, o, p) => o.OrderId == p.Id)
|
|
|
+ .Where((x, o, p) => x.OrderVisit.VisitTime >= StartDate && x.OrderVisit.VisitTime <= EndDate && x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o, p) => new
|
|
|
{
|
|
|
OrgCode = IsCenter == true ? x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : x.VisitOrgCode.Substring(0, _sessionContext.RequiredOrgId.Length + 3),
|
|
|
x.OrgProcessingResults
|
|
@@ -1887,9 +1899,10 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="EndDate"></param>
|
|
|
/// <param name="OrgCode"></param>
|
|
|
/// <param name="OrgName"></param>
|
|
|
+ /// <param name="IsProvince"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("departmental_processing_child_statistics")]
|
|
|
- public async Task<object> DepartmentalProcessingChildStatistics(DateTime StartDate, DateTime EndDate, string OrgCode, string? OrgName)
|
|
|
+ public async Task<object> DepartmentalProcessingChildStatistics(DateTime StartDate, DateTime EndDate, string OrgCode, string? OrgName, bool? IsProvince)
|
|
|
{
|
|
|
EndDate = EndDate.AddDays(1).AddSeconds(-1);
|
|
|
|
|
@@ -1899,6 +1912,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Where(it => it.CreationTime >= StartDate && it.CreationTime <= EndDate && it.Status > EOrderStatus.WaitForAccept)
|
|
|
.WhereIF(OrgCode == "001", it => it.ActualHandleOrgCode == OrgCode)
|
|
|
.WhereIF(OrgCode != "001", it => it.ActualHandleOrgCode.StartsWith(OrgCode))
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, it => it.Source == ESource.ProvinceStraight)
|
|
|
.Select(it => new
|
|
|
{
|
|
|
it.Id,
|
|
@@ -1948,6 +1962,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var queryPublish = _orderPublishRepository.Queryable()
|
|
|
.LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
.Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
.WhereIF(OrgCode == "001", (x, o) => o.ActualHandleOrgCode == OrgCode)
|
|
|
.WhereIF(OrgCode != "001", (x, o) => o.ActualHandleOrgCode.StartsWith(OrgCode))
|
|
|
.Select((x, o) => new
|
|
@@ -1992,10 +2007,12 @@ 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.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
|
|
|
+ .LeftJoin<Order>((x, o, p) => x.WorkflowId == o.WorkflowId)
|
|
|
+ .Where((x, o, p) => o.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= StartDate && o.CreationTime <= EndDate)
|
|
|
+ .WhereIF(OrgCode == "001", (x, o, p) => x.OrgId == OrgCode)
|
|
|
+ .WhereIF(OrgCode != "001", (x, o, p) => x.OrgId.StartsWith(OrgCode))
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o, p) => new
|
|
|
{
|
|
|
OrgCode = x.OrgId.Substring(0, OrgCode.Length + 3),
|
|
|
o.HandleTime,
|
|
@@ -2037,10 +2054,12 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 延期
|
|
|
//延期
|
|
|
var orderDelay = _orderDelayRepository.Queryable()
|
|
|
- .Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
- .WhereIF(OrgCode == "001", x => x.ApplyOrgCode == OrgCode)
|
|
|
- .WhereIF(OrgCode != "001", x => x.ApplyOrgCode.StartsWith(OrgCode))
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
+ .Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
+ .WhereIF(OrgCode == "001", (x, o) => x.ApplyOrgCode == OrgCode)
|
|
|
+ .WhereIF(OrgCode != "001", (x, o) => x.ApplyOrgCode.StartsWith(OrgCode))
|
|
|
+ .Select((x, o) => new
|
|
|
{
|
|
|
OrgCode = x.ApplyOrgCode.Substring(0, OrgCode.Length + 3),
|
|
|
x.DelayState
|
|
@@ -2079,15 +2098,17 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 甄别
|
|
|
//甄别
|
|
|
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.StartsWith(OrgCode))
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
+ .Where((x, o) => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(OrgName), (x, o) => x.CreatorOrgId.Contains(OrgName))
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
+ .WhereIF(OrgCode == "001", (x, o) => x.CreatorOrgId == OrgCode)
|
|
|
+ .WhereIF(OrgCode != "001", (x, o) => x.CreatorOrgId.StartsWith(OrgCode))
|
|
|
+ .Select((x, o) => new
|
|
|
{
|
|
|
x.Id,
|
|
|
OrgCode = x.CreatorOrgId.Substring(0, OrgCode.Length + 3),
|
|
|
- Status = x.Status
|
|
|
+ x.Status
|
|
|
})
|
|
|
.MergeTable()
|
|
|
.GroupBy(x => new { x.OrgCode })
|
|
@@ -2123,10 +2144,13 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 满意度
|
|
|
//满意度
|
|
|
var orderVisit = _orderVisitDetailRepository.Queryable()
|
|
|
- .Where(x => x.OrderVisit.VisitTime >= StartDate && x.OrderVisit.VisitTime <= EndDate && x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
|
|
|
- .WhereIF(OrgCode == "001", x => x.VisitOrgCode == OrgCode)
|
|
|
- .WhereIF(OrgCode != "001", x => x.VisitOrgCode.StartsWith(OrgCode))
|
|
|
- .Select(x => new
|
|
|
+ .LeftJoin<OrderVisit>((x, o) => x.VisitId == o.Id)
|
|
|
+ .LeftJoin<Order>((x, o, p) => o.OrderId == p.Id)
|
|
|
+ .Where((x, o) => x.OrderVisit.VisitTime >= StartDate && x.OrderVisit.VisitTime <= EndDate && x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
|
|
|
+ .WhereIF(OrgCode == "001", (x, o) => x.VisitOrgCode == OrgCode)
|
|
|
+ .WhereIF(OrgCode != "001", (x, o) => x.VisitOrgCode.StartsWith(OrgCode))
|
|
|
+ .WhereIF(IsProvince.HasValue && IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o) => new
|
|
|
{
|
|
|
OrgCode = x.VisitOrgCode.Substring(0, OrgCode.Length + 3),
|
|
|
x.OrgProcessingResults
|
|
@@ -2301,6 +2325,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.WhereIF(dto.OrgCode == "001", it => it.ActualHandleOrgCode == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", it => it.ActualHandleOrgCode.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.YBOrderCountNum, it => it.Status >= EOrderStatus.Filed)//已办
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, it => it.Source == ESource.ProvinceStraight)
|
|
|
.Select(it => new SelectOrderId { Id = it.Id })
|
|
|
.MergeTable();
|
|
|
|
|
@@ -2311,7 +2336,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.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.YBOrderCountNum, (x, o, p) => o.Status >= EWorkflowStepStatus.Handled && o.CountersignPosition > ECountersignPosition.None)//会签已办
|
|
|
- .Select((x, o, p) => new SelectOrderId { Id = p.Id })
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
+ .Select((x, o, p) => new SelectOrderId { Id = p.Id })
|
|
|
.MergeTable();
|
|
|
|
|
|
var queryData = await _orderRepository.OrderListUnionAll(ybQuery, hqybquery)
|
|
@@ -2335,6 +2361,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
//工单
|
|
|
var (totalOrder, items) = await _orderRepository.Queryable()
|
|
|
.Where(it => it.CreationTime >= dto.StartDate && it.CreationTime <= dto.EndDate && it.Status > EOrderStatus.WaitForAccept)
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, it => it.Source == ESource.ProvinceStraight)
|
|
|
.WhereIF(dto.OrgCode == "001", it => it.ActualHandleOrgCode == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", it => it.ActualHandleOrgCode.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.Archived, it => it.Status >= EOrderStatus.Filed)//已归档
|
|
@@ -2353,6 +2380,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var queryPublish = await _orderPublishRepository.Queryable()
|
|
|
.LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
.Where((x, o) => x.CreationTime >= dto.StartDate && x.CreationTime <= dto.EndDate)
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
.WhereIF(dto.OrgCode == "001", (x, o) => o.ActualHandleOrgCode == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", (x, o) => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.WaitPublished, (x, o) => o.Status == EOrderStatus.Filed)//待发布 --已归档的就是待发布
|
|
@@ -2379,6 +2407,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var orderDelay = await _orderDelayRepository.Queryable()
|
|
|
.LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
.Where((x, o) => x.CreationTime >= dto.StartDate && x.CreationTime <= dto.EndDate)
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
.WhereIF(dto.OrgCode == "001", (x, o) => x.ApplyOrgCode == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", (x, o) => x.ApplyOrgCode.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.OrderDelayCount, (x, o) => x.DelayState == EDelayState.Pass)//延期次数
|
|
@@ -2402,7 +2431,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
var orderScreen = await _orderScreenRepository.Queryable()
|
|
|
.LeftJoin<Order>((x, o) => x.OrderId == o.Id)
|
|
|
.Where((x, o) => x.CreationTime >= dto.StartDate && x.CreationTime <= dto.EndDate)
|
|
|
- .WhereIF(dto.OrgCode == "001", (x, o) => x.CreatorOrgId == dto.OrgCode)
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (x, o) => o.Source == ESource.ProvinceStraight)
|
|
|
+ .WhereIF(dto.OrgCode == "001", (x, o) => x.CreatorOrgId == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", (x, o) => x.CreatorOrgId.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.ScreenCount, (x, o) => x.Id != null)//申请总量
|
|
|
.WhereIF(dto.StatisticsType == EStatisticsType.ScreenApproval, (x, o) => x.Status == EScreenStatus.Approval || x.Status == EScreenStatus.Apply)//待甄别
|
|
@@ -2428,8 +2458,8 @@ 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) => o.ModuleCode == WorkflowModuleConsts.OrderHandle
|
|
|
- && 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.IsProvince.HasValue && dto.IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
.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.CountersignPosition > ECountersignPosition.None)//会签已办超期
|
|
@@ -2461,7 +2491,8 @@ 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))//已办超期
|
|
|
+ .WhereIF(dto.StatisticsType == EStatisticsType.SubtotalOverdue, it => (it.Status >= EOrderStatus.Filed && it.ActualHandleTime > it.ExpiredTime))//已办超期
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, it => it.Source == ESource.ProvinceStraight)
|
|
|
.Select(it => new SelectOrderId { Id = it.Id })
|
|
|
.MergeTable();
|
|
|
|
|
@@ -2470,6 +2501,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.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.CreationTime >= dto.StartDate && o.CreationTime <= dto.EndDate)
|
|
|
+ .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (x, o, p) => p.Source == ESource.ProvinceStraight)
|
|
|
.WhereIF(dto.OrgCode == "001", (x, o, p) => x.OrgId == dto.OrgCode)
|
|
|
.WhereIF(dto.OrgCode != "001", (x, o, p) => x.OrgId.StartsWith(dto.OrgCode))
|
|
|
|
|
@@ -2499,6 +2531,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
return new PagedDto<OrderDto>(total, new List<OrderDto>());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 高频来电统计
|
|
|
/// </summary>
|