|
@@ -627,8 +627,8 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
|
|
|
SOCCollection.Sort();
|
|
|
logger.Debug(string.Format("SOCCollection:" + String.Join(",", SOCCollection.Select(x => x.ToString()).ToArray())));
|
|
|
- transaction.StartSOC = SOCCollection.First().ToString("0");
|
|
|
- transaction.StopSOC = SOCCollection.Last().ToString("0");
|
|
|
+ transaction.StartSOC = SOCCollection.Count() == 0 ? "" : SOCCollection.First().ToString("0");
|
|
|
+ transaction.StopSOC = SOCCollection.Count() == 0 ? "" : SOCCollection.Last().ToString("0");
|
|
|
}
|
|
|
#endregion
|
|
|
//遠傳太久以前的停止充電 直接拒絕 避免電樁持續重送~~~~~~~
|
|
@@ -1678,12 +1678,12 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
var result = await _meterDb.Database.Connection.QueryFirstOrDefaultAsync<TransactionSoCDto>(strSql, parameters);
|
|
|
// SOCCollection = results.Select(decimal.Parse).ToList();
|
|
|
|
|
|
- if(result != null)
|
|
|
+ if (result != null)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
SOCCollection.Add(result.MaxSoC);
|
|
|
SOCCollection.Add(result.MinSoC);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|