|
@@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
using SqlSugar;
|
|
|
+using System;
|
|
|
using XF.Domain.Repository;
|
|
|
|
|
|
namespace Hotline.Api.Controllers.Bigscreen
|
|
@@ -606,6 +607,7 @@ namespace Hotline.Api.Controllers.Bigscreen
|
|
|
[HttpGet("order-secondary-statistics")]
|
|
|
public async Task<SecondaryProcessingOrderStatisticsDto> OrderSecondaryStatistics(DateTime StartTime, DateTime EndTime)
|
|
|
{
|
|
|
+ DateTime? dateTime = DateTime.Now;
|
|
|
EndTime = EndTime.AddDays(1).AddSeconds(-1);
|
|
|
var data = new SecondaryProcessingOrderStatisticsDto
|
|
|
{
|
|
@@ -622,7 +624,8 @@ namespace Hotline.Api.Controllers.Bigscreen
|
|
|
|
|
|
OrderSoonOverdueCount = await _orderSecondaryHandlingRepository.Queryable()
|
|
|
.Includes(x => x.Order)
|
|
|
- .Where(x => x.Order.ExpiredStatus == EExpiredStatus.GoingToExpired && x.AuditTime >= StartTime && x.AuditTime <= EndTime
|
|
|
+ .Where(x => x.Order.Status < EOrderStatus.Filed && dateTime > x.Order.NearlyExpiredTime && dateTime < x.Order.ExpiredTime)
|
|
|
+ .Where(x => x.AuditTime >= StartTime && x.AuditTime <= EndTime
|
|
|
&& x.State != ESecondaryHandlingState.NotApply
|
|
|
&& x.State != ESecondaryHandlingState.Apply && x.State != ESecondaryHandlingState.Refuse)
|
|
|
.CountAsync()
|
|
@@ -652,7 +655,7 @@ namespace Hotline.Api.Controllers.Bigscreen
|
|
|
public async Task<List<OrderSecondaryHandlingDto>> OrderSecondaryHandlingDetailQuery()
|
|
|
{
|
|
|
var quer = await _orderSecondaryHandlingRepository.Queryable()
|
|
|
- .Includes(x=>x.Order)
|
|
|
+ .Includes(x => x.Order)
|
|
|
.Where(x => x.CreationTime.Date == DateTime.Now.Date)
|
|
|
.OrderByDescending(x => x.CreationTime)
|
|
|
.Take(50)
|