|
|
|
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;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 充电结束上报云平台task
|
|
|
|
/// </summary>
|
|
|
|
public class SwapOrderReportCloudTask : AbstractTaskHandler
|
|
|
|
{
|
|
|
|
private static readonly ILog Log = LogManager.GetLogger(typeof(SwapOrderReportCloudTask));
|
|
|
|
|
|
|
|
private readonly SwapOrderReportCloudRepository _reportCloudRepository =
|
|
|
|
AppInfo.Container.Resolve<SwapOrderReportCloudRepository>();
|
|
|
|
|
|
|
|
private readonly SwapOrderMgr _swapOrderMgr =
|
|
|
|
AppInfo.Container.Resolve<SwapOrderMgr>();
|
|
|
|
|
|
|
|
protected override int Interval()
|
|
|
|
{
|
|
|
|
return 20 * 1000;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void Handle()
|
|
|
|
{
|
|
|
|
List<SwapOrderReportCloud> list = _reportCloudRepository.QueryListByClause(i => i.CloudReportStatus == 0);
|
|
|
|
|
|
|
|
_swapOrderMgr.UploadCloud(list);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override string Name()
|
|
|
|
{
|
|
|
|
return "SwapOrderReportCloudTask";
|
|
|
|
}
|
|
|
|
}
|