|
@@ -106,8 +106,6 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Where(x => x.CreationTime >= dto.StartTime && x.CreationTime <= dto.EndTime)
|
|
|
.WhereIF(dto.QueryType == 1, x => x.Status >= EOrderStatus.Filed && x.ExpiredTime < x.FiledTime) //业务已办超期
|
|
|
.WhereIF(dto.QueryType == 3, x => x.Status < EOrderStatus.Filed && x.ExpiredTime < SqlFunc.GetDate()) //业务待办超期
|
|
|
- .WhereIF(dto.QueryType == 5, x =>
|
|
|
- (x.Status >= EOrderStatus.Filed && x.ExpiredTime < x.FiledTime) || (x.Status < EOrderStatus.Filed && x.ExpiredTime < SqlFunc.GetDate()))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.QueryType is 1 or 3, x => x.ActualHandleOrgCode == dto.OrgCode);
|
|
|
|
|
|
if (dto.QueryType is 2 or 4 or 5)
|
|
@@ -122,7 +120,9 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Select((x,o)=> new { Id= x.WorkflowId })
|
|
|
.MergeTable();
|
|
|
|
|
|
- quer = quer.InnerJoin(queryCountersign, (x, c) => x.WorkflowId == c.Id);
|
|
|
+ quer = quer.InnerJoin(queryCountersign, (x, c) => x.WorkflowId == c.Id)
|
|
|
+ .WhereIF(dto.QueryType == 5, x =>
|
|
|
+ (x.Status >= EOrderStatus.Filed && x.ExpiredTime < x.FiledTime) || (x.Status < EOrderStatus.Filed && x.ExpiredTime < SqlFunc.GetDate()));
|
|
|
|
|
|
}
|
|
|
var (total, items) = await quer.ToPagedListAsync(dto.PageIndex, dto.PageSize);
|
|
@@ -2749,7 +2749,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Having((x, w, wfsh, su) => SqlFunc.AggregateCount(x.WorkflowId) > 1)
|
|
|
.Select((x, w, wfsh, su) => new { Id = x.WorkflowId })
|
|
|
.MergeTable()
|
|
|
- .LeftJoin<WorkflowTrace>((a, wt) => a.Id == wt.WorkflowId)
|
|
|
+ .LeftJoin<WorkflowTrace>((a, wt) => a.Id == wt.WorkflowId && wt.SendHandleTimes == 1)
|
|
|
.LeftJoin<Workflow>((a, wt, wf) => wt.WorkflowId == wf.Id)
|
|
|
.LeftJoin<WorkflowStepHandler>((a, wt, wf, wsh) => wt.StepId == wsh.WorkflowStepId)
|
|
|
.InnerJoin<SchedulingUser>((a, wt, wf, wsh, su) => wsh.UserId == su.UserId)
|
|
@@ -2821,7 +2821,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Having((x, w, wfsh, su) => SqlFunc.AggregateCount(x.WorkflowId) > 1)
|
|
|
.Select((x, w, wfsh, su) => new { Id = x.WorkflowId })
|
|
|
.MergeTable()
|
|
|
- .LeftJoin<WorkflowTrace>((a, wt) => a.Id == wt.WorkflowId)
|
|
|
+ .LeftJoin<WorkflowTrace>((a, wt) => a.Id == wt.WorkflowId && wt.SendHandleTimes == 1)
|
|
|
.LeftJoin<Workflow>((a, wt, wf) => wt.WorkflowId == wf.Id)
|
|
|
.LeftJoin<WorkflowStepHandler>((a, wt, wf, wsh) => wt.StepId == wsh.WorkflowStepId)
|
|
|
.InnerJoin<SchedulingUser>((a, wt, wf, wsh, su) => wsh.UserId == su.UserId)
|