|
@@ -655,6 +655,12 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
|
|
|
if (_request.transactionData != null && _request.transactionData.Count > 0)
|
|
|
{
|
|
|
+
|
|
|
+ var startSOC= _request.transactionData[0].sampledValue.Where(x => x.context == ReadingContext.Transaction_Begin).Select(x => x.value).FirstOrDefault();
|
|
|
+ var stopSOC = _request.transactionData[0].sampledValue.Where(x => x.context == ReadingContext.Transaction_End).Select(x => x.value).FirstOrDefault();
|
|
|
+ transaction.StartSOC= string.IsNullOrEmpty(startSOC) ? string.Empty : startSOC;
|
|
|
+ transaction.StopSOC = string.IsNullOrEmpty(stopSOC) ? string.Empty : stopSOC;
|
|
|
+
|
|
|
_request.transactionData[0].sampledValue.Add(new SampledValue()
|
|
|
{
|
|
|
context = ReadingContext.Transaction_End,
|
|
@@ -667,10 +673,8 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
await db.SaveChangesAsync();
|
|
|
|
|
|
-
|
|
|
if (session.IsBilling)
|
|
|
{
|
|
|
db.ServerMessage.Add(new ServerMessage()
|