|
|
|
@ -18,7 +18,6 @@ using Service.Charger.Msg.Charger.Req;
|
|
|
|
|
using Service.Charger.Msg.Charger.Resp;
|
|
|
|
|
using Service.Charger.Msg.Host.Req;
|
|
|
|
|
using Service.Charger.Msg.Host.Req.Bms;
|
|
|
|
|
using Service.Init;
|
|
|
|
|
|
|
|
|
|
namespace Service.Charger.Client;
|
|
|
|
|
|
|
|
|
@ -481,7 +480,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Result<bool> StartCharge()
|
|
|
|
|
public Result<bool> StartCharge(byte chargeSoc, float chargePower)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(BinNo))
|
|
|
|
|
{
|
|
|
|
@ -505,6 +504,11 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
return Result<bool>.Fail($"charger-{BinNo} battery not exist");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (binInfo.AmtLock == 1)
|
|
|
|
|
{
|
|
|
|
|
return Result<bool>.Fail($"仓-{BinNo} 被锁定");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (binInfo.CanChargeFlag == 0)
|
|
|
|
|
{
|
|
|
|
|
return Result<bool>.Fail($"仓-{BinNo} 被禁用");
|
|
|
|
@ -520,8 +524,6 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
|
|
|
|
|
redisHelper.SetKeyValueStr($"chargeNo{BinNo}Start", DateTime.Now.ToString("f"), TimeSpan.FromMinutes(1));
|
|
|
|
|
|
|
|
|
|
byte chargeSoc = StaticStationInfo.ChargeSoc;
|
|
|
|
|
float chargePower = StaticStationInfo.ChargePower;
|
|
|
|
|
Result<string> chargeOrderNo = SendRemoteStartCharging(chargeSoc, chargePower);
|
|
|
|
|
if (!chargeOrderNo.IsSuccess)
|
|
|
|
|
{
|
|
|
|
|