diff --git a/Entity/Dto/Resp/BinInfoResp.cs b/Entity/Dto/Resp/BinInfoResp.cs index 2f57a2d..8c8318e 100644 --- a/Entity/Dto/Resp/BinInfoResp.cs +++ b/Entity/Dto/Resp/BinInfoResp.cs @@ -182,4 +182,9 @@ public partial class BinInfoResp /// 充电禁用标志 0:不可充电 1:可以充电 /// public int CanChargeFlag { get; set; } + + /// + /// 充电机是否连接 + /// + public bool ChargeConnectFlag { get; set; } } \ No newline at end of file diff --git a/Service/Init/StaticStationInfo.cs b/Service/Init/StaticStationInfo.cs index f064a01..2f235dc 100644 --- a/Service/Init/StaticStationInfo.cs +++ b/Service/Init/StaticStationInfo.cs @@ -124,7 +124,7 @@ public class StaticStationInfo } public static int CloudServerPort - { + { get { string port = Resolve(StationParamConst.CloudServerPort); diff --git a/WebStarter/Controllers/ChargeController.cs b/WebStarter/Controllers/ChargeController.cs index ab42d13..79c3e5b 100644 --- a/WebStarter/Controllers/ChargeController.cs +++ b/WebStarter/Controllers/ChargeController.cs @@ -45,10 +45,12 @@ public class ChargeController : ControllerBase // 功率赋值 foreach (var binInfoResp in binInfoList) { - ChargerClient? chargerClient = ClientMgr.GetBySn(binInfoResp.Code); + + ChargerClient? chargerClient = ClientMgr.GetBySn(binInfoResp.ChargerNo); if (chargerClient != null) { binInfoResp.power = chargerClient.RealTimeChargePower; + binInfoResp.ChargeConnectFlag = chargerClient.Connected; } }