using Autofac;
using Entity.Constant;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac;
using log4net;
using Repository.Station;
using Service.Execute;
using Service.Execute.Api;
using Service.Execute.Model;
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));*/
/*//TODO::给前端测试 实时步骤变更
Array enumValues = Enum.GetValues(typeof(InfoEnum.BusinessSwappingStep));
foreach (InfoEnum.BusinessSwappingStep info in enumValues)
{
StepModel resp = new()
{
StepName = BaseEnumExtensions.GetDescription(info),
StepNo = (int)info,
StartTime = DateTime.Now
};
StationSoftMgr.SwappingStateMachine.StepModel = new List();
StationSoftMgr.SwappingStateMachine.StepModel.Add(resp);
Thread.Sleep(60000);
}*/
}
protected override string Name()
{
return "SwapOrderReportCloudTask";
}
}