|
|
@ -1,4 +1,5 @@
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
using Entity.Dto.Resp;
|
|
|
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Repository.Station;
|
|
|
|
using Repository.Station;
|
|
|
|
using Service.Charger.Client;
|
|
|
|
using Service.Charger.Client;
|
|
|
@ -125,4 +126,32 @@ public class OutChargerController
|
|
|
|
|
|
|
|
|
|
|
|
return Result<bool>.Fail("充电机未连接");
|
|
|
|
return Result<bool>.Fail("充电机未连接");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 获取充电桩信息
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
|
|
[Route("GetChargerPile")]
|
|
|
|
|
|
|
|
public Result<List<ChargerPileResp>> GetChargerPile()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var chargerClients = ClientMgr.Dictionary;
|
|
|
|
|
|
|
|
if (chargerClients.IsEmpty)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Result<List<ChargerPileResp>>.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<List<ChargerPileResp>>.Success(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|