|
|
|
@ -11,7 +11,6 @@ using HybirdFrameworkDriver.Session;
|
|
|
|
|
using HybirdFrameworkDriver.TcpClient;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Org.BouncyCastle.Asn1.Cmp;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using Service.Charger.Codec;
|
|
|
|
|
using Service.Charger.Common;
|
|
|
|
@ -172,7 +171,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
/// 充电桩状态信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ConcurrentDictionary<byte, ChargerPile> ChargerPile = new();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 充电桩功率
|
|
|
|
|
/// </summary>
|
|
|
|
@ -631,7 +630,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BatteryNo = binInfo.BatteryNo;
|
|
|
|
|
if (string.IsNullOrWhiteSpace(BatteryNo))
|
|
|
|
|
if (string.IsNullOrWhiteSpace(BatteryNo) || "-1" == BatteryNo)
|
|
|
|
|
{
|
|
|
|
|
return Result<bool>.Fail($"charger-{BinNo} battery not exist");
|
|
|
|
|
}
|
|
|
|
@ -662,6 +661,9 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
return Result<bool>.Fail(chargeOrderNo.Msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SwapOrderBatteryRepository swapOrderBatteryRepository = AppInfo.Container.Resolve<SwapOrderBatteryRepository>();
|
|
|
|
|
SwapOrderBattery? swapOrder = swapOrderBatteryRepository.QueryLatestOrderNoByBatterySn(BatteryNo);
|
|
|
|
|
|
|
|
|
|
ChargeOrderNo = chargeOrderNo.Data;
|
|
|
|
|
_chargeOrderRepository.Insert(new ChargeOrder()
|
|
|
|
|
{
|
|
|
|
@ -670,6 +672,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
CmdStatus = 0,
|
|
|
|
|
ChargerNo = BinNo,
|
|
|
|
|
ChargeMode = 1,
|
|
|
|
|
SwapOrderSn = swapOrder?.SwapOrderSn,
|
|
|
|
|
StartMode = 1
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -724,7 +727,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
propertyTimePeriodPeakIden.SetValue(timeRng, timeRng.GetType().GetProperty("TimePeak" + (i + 1)).GetValue(timeRng));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return timeRng;
|
|
|
|
|