|
|
|
@ -20,9 +20,12 @@ public class OutChargerController
|
|
|
|
|
{
|
|
|
|
|
private ChargeOrderRepository _chargeOrderRepository;
|
|
|
|
|
|
|
|
|
|
public OutChargerController(ChargeOrderRepository chargeOrderRepository)
|
|
|
|
|
private BinInfoRepository _binInfoRepository;
|
|
|
|
|
|
|
|
|
|
public OutChargerController(ChargeOrderRepository chargeOrderRepository,BinInfoRepository binInfoRepository)
|
|
|
|
|
{
|
|
|
|
|
_chargeOrderRepository = chargeOrderRepository;
|
|
|
|
|
_binInfoRepository = binInfoRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -59,6 +62,9 @@ public class OutChargerController
|
|
|
|
|
byte chargeSoc = StaticStationInfo.ChargeSoc;
|
|
|
|
|
// 下发充电枪充电
|
|
|
|
|
chargerClient.SendRemoteStartCharging((byte)ChargerModeConst.OutsideTheStation, chargeSoc, 360, 1, chargeGunOrder);
|
|
|
|
|
|
|
|
|
|
_binInfoRepository.Update(i => i.ChargeStatus == 5, i => i.ChargerNo == chargerClient.Sn);
|
|
|
|
|
|
|
|
|
|
// 初始化订单
|
|
|
|
|
_chargeOrderRepository.SaveChargeGunOrder(chargeGunOrder, httpReq.con, chargerCode, httpReq.pn,
|
|
|
|
|
chargerCode);
|
|
|
|
@ -86,6 +92,8 @@ public class OutChargerController
|
|
|
|
|
// 下发充电枪停止充电
|
|
|
|
|
chargerClient.SendRemoteStopCharging();
|
|
|
|
|
|
|
|
|
|
_binInfoRepository.Update(i => i.ChargeStatus == 4, i => i.ChargerNo == chargerClient.Sn);
|
|
|
|
|
|
|
|
|
|
return Result<bool>.Success(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|