using Autofac;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac;
using log4net;
using Repository.Station;
using Service.Execute.Api;
namespace Service.BusinessTask.MyTask;
///
/// 充电结束上报云平台task
///
public class SwapOrderReportCloudTask : AbstractTaskHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(SwapOrderReportCloudTask));
private readonly SwapOrderReportCloudRepository _reportCloudRepository =
AppInfo.Container.Resolve();
private readonly SwapOrderRepository _swapOrderRepository =
AppInfo.Container.Resolve();
private readonly SwapOrderBatteryRepository _swapOrderBatteryRepository =
AppInfo.Container.Resolve();
protected override int Interval()
{
return 20 * 1000;
}
protected override void Handle()
{
List list = _reportCloudRepository.QueryListByClause(i => i.CloudReportStatus == 0);
if (list.Count <= 0)
{
return;
}
List swapOrderIds = list.Select(i => i.SwapOrderId).ToList();
List swapOrders = _swapOrderRepository.QueryListByClause(i => swapOrderIds.Contains(i.Id));
}
protected override string Name()
{
return "SwapOrderReportCloudTask";
}
}