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;
using Service.Mgr;
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 SwapOrderMgr _swapOrderMgr =
AppInfo.Container.Resolve();
protected override int Interval()
{
return 20 * 1000;
}
protected override void Handle()
{
List list = _reportCloudRepository.QueryListByClause(i => i.CloudReportStatus == 0);
_swapOrderMgr.UploadCloud(list);
}
protected override string Name()
{
return "SwapOrderReportCloudTask";
}
}