diff --git a/Entity/DbModel/Station/BinInfo.cs b/Entity/DbModel/Station/BinInfo.cs
index e1f3cf5..36e0c4e 100644
--- a/Entity/DbModel/Station/BinInfo.cs
+++ b/Entity/DbModel/Station/BinInfo.cs
@@ -196,5 +196,11 @@ namespace Entity.DbModel.Station
///
[SugarColumn(ColumnName = "in_time")]
public DateTime? InTime { get; set; }
+
+ ///
+ /// 电池标称能量
+ ///
+ [SugarColumn(ColumnName = "nominal_energy")]
+ public decimal? NominalEnergy { get; set; }
}
}
\ No newline at end of file
diff --git a/Service/Charger/Handler/BatteryBaseInfoHandler.cs b/Service/Charger/Handler/BatteryBaseInfoHandler.cs
index 0442f71..2bd7d9c 100644
--- a/Service/Charger/Handler/BatteryBaseInfoHandler.cs
+++ b/Service/Charger/Handler/BatteryBaseInfoHandler.cs
@@ -1,5 +1,6 @@
using DotNetty.Transport.Channels;
using log4net;
+using Repository.Station;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Resp;
@@ -11,13 +12,20 @@ namespace Service.Charger.Handler;
public class BatteryBaseInfoHandler : SimpleChannelInboundHandler, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryBaseInfoHandler));
-
+ public BinInfoRepository BinInfoRepository { get; set; }
protected override void ChannelRead0(IChannelHandlerContext ctx, BatteryBaseInfo msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
client.BatteryBaseInfo = msg;
+
+
+ float msgBatteryNominalEnergy = msg.RatedBatteryPack;
+
+ decimal? nominalEnergyValue = (decimal?)msgBatteryNominalEnergy;
+
+ BinInfoRepository.Update(t => t.NominalEnergy == nominalEnergyValue, t => t.No == client.BinNo);
}
}
}
\ No newline at end of file
diff --git a/Service/Charger/Handler/RemoteSignalingHandler.cs b/Service/Charger/Handler/RemoteSignalingHandler.cs
index 5c4d62e..3e76b3b 100644
--- a/Service/Charger/Handler/RemoteSignalingHandler.cs
+++ b/Service/Charger/Handler/RemoteSignalingHandler.cs
@@ -38,7 +38,8 @@ namespace Service.Charger.Handler
client.RemoteSignaling = msg;
- if (StaticStationInfo.AutoFireRelocation == 1)
+ //TODO::自动消防策略注释
+ /*if (StaticStationInfo.AutoFireRelocation == 1)
{
if (msg.MaximumAlarmLevel == 3|| msg.FireAlarm==1 || msg.SmokeAlarm==1 )
@@ -55,7 +56,7 @@ namespace Service.Charger.Handler
}
- }
+ }*/
List lstAlarm = new List();
if (msg.CurrentBMS==1) { lstAlarm.Add("52"); }
if (msg.CurrentStatusBMS==3) { lstAlarm.Add("53"); }
diff --git a/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs b/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs
index 2edc2af..401df54 100644
--- a/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs
+++ b/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs
@@ -29,8 +29,8 @@ public class BatteryBaseInfo: ASDU
///
/// 电池包额定总能量
///
- [Property(32+8*17, 16)]
- public byte RatedBatteryPack{get;set;}
+ [Property(32+8*17, 16,scale:0.1)]
+ public float RatedBatteryPack{get;set;}
///
/// 电池冷却方式
///