|
|
|
|
using Autofac;
|
|
|
|
|
using HybirdFrameworkCore.Autofac;
|
|
|
|
|
using Service.BusinessTask;
|
|
|
|
|
using Service.BusinessTask.MyTask;
|
|
|
|
|
using Service.Cloud.Client.MyTask;
|
|
|
|
|
|
|
|
|
|
namespace Service.Execute
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 软件管理类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class StationSoftMgr
|
|
|
|
|
{
|
|
|
|
|
public static readonly SwappingStateMachine SwappingStateMachine = SwappingStateMachine.GetInstance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly AbstractTaskHandler SwapOrderReportCloudTask = new SwapOrderReportCloudTask();
|
|
|
|
|
private static readonly AbstractTaskHandler BatteryMoveTask = new BatteryMoveTask();
|
|
|
|
|
private static readonly AbstractTaskHandler ChargeOrderUploadTask = AppInfo.Container.Resolve<ChargeOrderUploadTask>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Task
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 启动task
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void StartTasks()
|
|
|
|
|
{
|
|
|
|
|
SwapOrderReportCloudTask.Start();
|
|
|
|
|
BatteryMoveTask.Start();
|
|
|
|
|
ChargeOrderUploadTask.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 停止task
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void StopTasks()
|
|
|
|
|
{
|
|
|
|
|
SwapOrderReportCloudTask.Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion Task
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 换电流程
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 换电流程启动
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void SwappingStateMachineStart()
|
|
|
|
|
{
|
|
|
|
|
SwappingStateMachine.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 换电流程重置
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void SwappingStateMachineCancel()
|
|
|
|
|
{
|
|
|
|
|
SwappingStateMachine.Cancel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion 换电流程启动
|
|
|
|
|
}
|
|
|
|
|
}
|