diff --git a/Entity/Constant/BaseEnumExtensions.cs b/Entity/Constant/BaseEnumExtensions.cs deleted file mode 100644 index 40e9b63..0000000 --- a/Entity/Constant/BaseEnumExtensions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.ComponentModel; -using System.Reflection; -using Entity.Attr; - -namespace Entity.Constant; - -public class BaseEnumExtensions -{ - //根据枚举获取注释(使用remark注解) - public static string GetDescription(Enum value) - { - FieldInfo field = value.GetType().GetField(value.ToString()); - - RemarkAttribute attribute = - Attribute.GetCustomAttribute(field, typeof(RemarkAttribute)) as RemarkAttribute; - - return attribute == null ? value.ToString() : attribute.GetRemark(); - } - - //根据code获取枚举 - public static T GetEnumByCode(int code) where T : Enum - { - return (T)Enum.ToObject(typeof(T), code); - } - - //根据code获取值 - public static string GetEnumDescriptionByCode(int code) where T : Enum - { - return GetDescription((T)Enum.ToObject(typeof(T), code)); - } - - public static string GetNameByEnum(Enum value) where T : Enum - { - return Enum.GetName(typeof(T), value); - } -} \ No newline at end of file diff --git a/Service/Execute/SwappingStateMachine.cs b/Service/Execute/SwappingStateMachine.cs index f5bf753..022f871 100644 --- a/Service/Execute/SwappingStateMachine.cs +++ b/Service/Execute/SwappingStateMachine.cs @@ -32,6 +32,9 @@ public class SwappingStateMachine : IDisposable //手动确认换电成功 public bool ManualSwapSuccFlag { get; set; } = false; + + //手动确认解锁/上锁成功 + public bool ManualConfirmCarOperateFlag { get; set; } public OperateModel OperateModel = null; @@ -302,6 +305,7 @@ public class SwappingStateMachine : IDisposable PlcSwapFlag = false; ManualSwapSuccFlag = false; OperateModel = null; + ManualConfirmCarOperateFlag = false; CancelFlag = false; StopFlag = false; diff --git a/Service/Station/MonitorService.cs b/Service/Station/MonitorService.cs index 671bd6a..93dde56 100644 --- a/Service/Station/MonitorService.cs +++ b/Service/Station/MonitorService.cs @@ -195,7 +195,7 @@ public class MonitorService if (!result) { Log.Error("BatteryRelocation PlcMgr.HoldOn() =false"); - return Result.Fail(); + return Result.Fail(); } Log.Info($"battery move task Manual removeBinNo={removeBinNo}, putBinNo={putBinNo} ");