|
|
|
@ -64,7 +64,7 @@ public static class ClientMgr
|
|
|
|
|
List<EquipInfo> equipInfos = equipInfoRepository.QueryListByClause(it => it.TypeCode == (int)EquipmentType.Charger);
|
|
|
|
|
if (equipInfos.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string,EquipInfo> set = equipInfos.ToDictionary(it => it.Code, it => it);
|
|
|
|
|
Dictionary<string, EquipInfo> set = equipInfos.ToDictionary(it => it.Code, it => it);
|
|
|
|
|
List<EquipNetInfo> equipNetInfos = netInfoRepository.QueryListByClause(it => set.Keys.Contains(it.Code));
|
|
|
|
|
foreach (EquipNetInfo netInfo in equipNetInfos)
|
|
|
|
|
{
|
|
|
|
@ -130,7 +130,7 @@ public static class ClientMgr
|
|
|
|
|
//int batteryCount = elecPriceModelVersionDetail.BatteryCount;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (KeyValuePair<string,ChargerClient> pair in Dictionary)
|
|
|
|
|
foreach (KeyValuePair<string, ChargerClient> pair in Dictionary)
|
|
|
|
|
{
|
|
|
|
|
Result<bool> result = pair.Value.StartCharge();
|
|
|
|
|
Log.Info($"start {pair.Key} charge {result.IsSuccess}:{result.Msg}");
|
|
|
|
@ -149,7 +149,7 @@ public static class ClientMgr
|
|
|
|
|
ChargerClient client = AppInfo.Container.Resolve<ChargerClient>();
|
|
|
|
|
client.InitBootstrap(netInfo.NetAddr, int.Parse(netInfo.NetPort));
|
|
|
|
|
client.Connect();
|
|
|
|
|
client.SessionAttr(netInfo.Code, netInfo.NetAddr);
|
|
|
|
|
client.SessionAttr(netInfo.Code, netInfo.DestAddr);
|
|
|
|
|
AddBySn(netInfo.Code, client);
|
|
|
|
|
Log.Info($"connected {netInfo.Code} {netInfo.NetAddr}:{netInfo.NetPort}");
|
|
|
|
|
}
|
|
|
|
|