充电机部分修改1,增加能一行 标称重量入口,去掉换能自动消防策略

master
lxw 1 week ago
parent 2180a4a5f5
commit f0aa89d43b

@ -196,5 +196,11 @@ namespace Entity.DbModel.Station
/// </summary>
[SugarColumn(ColumnName = "in_time")]
public DateTime? InTime { get; set; }
/// <summary>
/// 电池标称能量
/// </summary>
[SugarColumn(ColumnName = "nominal_energy")]
public decimal? NominalEnergy { get; set; }
}
}

@ -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<BatteryBaseInfo>, 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);
}
}
}

@ -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<string> lstAlarm = new List<string>();
if (msg.CurrentBMS==1) { lstAlarm.Add("52"); }
if (msg.CurrentStatusBMS==3) { lstAlarm.Add("53"); }

@ -29,8 +29,8 @@ public class BatteryBaseInfo: ASDU
/// <summary>
/// 电池包额定总能量
/// </summary>
[Property(32+8*17, 16)]
public byte RatedBatteryPack{get;set;}
[Property(32+8*17, 16,scale:0.1)]
public float RatedBatteryPack{get;set;}
/// <summary>
/// 电池冷却方式
/// </summary>

Loading…
Cancel
Save