diff --git a/Entity/Dto/Resp/ChargerPileResp.cs b/Entity/Dto/Resp/ChargerPileResp.cs
new file mode 100644
index 0000000..d64a533
--- /dev/null
+++ b/Entity/Dto/Resp/ChargerPileResp.cs
@@ -0,0 +1,38 @@
+namespace Entity.Dto.Resp;
+
+///
+/// 充电桩信息
+///
+public class ChargerPileResp
+{
+ public ChargerPileResp()
+ {
+ }
+
+ public string Sn { get; set; }
+ ///
+ /// 站外1枪是否充电
+ ///
+ public bool GunChargedOne { get; set; }
+ ///
+ /// 站外2枪是否充电
+ ///
+ public bool GunChargedTwo { get; set; }
+ ///
+ /// 站外1枪是否连接
+ ///
+ public bool ChargedPileOne { get; set; }
+ ///
+ /// 站外2枪是否连接
+ ///
+ public bool ChargedPileTwo { get; set; }
+ ///
+ /// 站外1枪充电功率
+ ///
+ public float? ChargePilePowerOne { get; set; }
+ ///
+ /// 站外2枪充电功率
+ ///
+ public float? ChargePilePowerTwo { get; set; }
+
+}
\ No newline at end of file
diff --git a/Service/Charger/Client/ChargerClient.cs b/Service/Charger/Client/ChargerClient.cs
index ae49cee..1a1b12f 100644
--- a/Service/Charger/Client/ChargerClient.cs
+++ b/Service/Charger/Client/ChargerClient.cs
@@ -170,6 +170,11 @@ public class ChargerClient : TcpClient
/// 充电桩状态信息
///
public ConcurrentDictionary ChargerPile = new();
+
+ ///
+ /// 充电桩功率
+ ///
+ public ConcurrentDictionary ChargePilePower = new();
///
///充电机实时充电功率
diff --git a/Service/Charger/Handler/OutCharger/PileUploadTelemetryHandler.cs b/Service/Charger/Handler/OutCharger/PileUploadTelemetryHandler.cs
index 5a85c0c..970fe63 100644
--- a/Service/Charger/Handler/OutCharger/PileUploadTelemetryHandler.cs
+++ b/Service/Charger/Handler/OutCharger/PileUploadTelemetryHandler.cs
@@ -23,7 +23,7 @@ public class PileUploadTelemetryHandler : SimpleChannelInboundHandler.Fail("充电机未连接");
}
+
+ ///
+ /// 获取充电桩信息
+ ///
+ ///
+ [HttpGet]
+ [Route("GetChargerPile")]
+ public Result> GetChargerPile()
+ {
+ var chargerClients = ClientMgr.Dictionary;
+ if (chargerClients.IsEmpty)
+ {
+ return Result>.Fail("没有充电机连接");
+ }
+
+ var list = chargerClients.Values.Select(client => new ChargerPileResp
+ {
+ Sn = client.Sn,
+ GunChargedOne = client.GunCharged[1],
+ GunChargedTwo = client.GunCharged[2],
+ ChargedPileOne = client.ChargedPile[1],
+ ChargedPileTwo = client.ChargedPile[2],
+ ChargePilePowerOne = client.ChargePilePower[1],
+ ChargePilePowerTwo = client.ChargePilePower[2]
+ }).ToList();
+
+ return Result>.Success(list);
+ }
}
\ No newline at end of file