|
@@ -1,6 +1,5 @@
|
|
|
using Dapper;
|
|
|
using EVCB_OCPP.Domain;
|
|
|
-using EVCB_OCPP.Domain.Models.Database;
|
|
|
using EVCB_OCPP.Packet.Features;
|
|
|
using EVCB_OCPP.Packet.Messages;
|
|
|
using EVCB_OCPP.Packet.Messages.Core;
|
|
@@ -20,6 +19,7 @@ using System.Diagnostics;
|
|
|
using System.Globalization;
|
|
|
|
|
|
using EVCB_OCPP.WSServer.Service.WsService;
|
|
|
+using EVCB_OCPP.Domain.Models.MainDb;
|
|
|
|
|
|
namespace EVCB_OCPP.WSServer.Message;
|
|
|
|
|
@@ -190,7 +190,7 @@ internal partial class ProfileHandler
|
|
|
|
|
|
logger.LogDebug("{0}\r\n{1}\r\n{2}", jo["txId"].Value<int>(), jo["dataString"].Value<string>(), jo["publicKey"].Value<string>());
|
|
|
|
|
|
- await mainDbService.AddOCMF(new OCMF()
|
|
|
+ await mainDbService.AddOCMF(new Ocmf()
|
|
|
{
|
|
|
TransactionId = jo["txId"].Value<int>(),
|
|
|
DataString = jo["dataString"].Value<string>(),
|
|
@@ -232,7 +232,7 @@ internal partial class ProfileHandler
|
|
|
_machine.ChargePointSerialNumber = string.IsNullOrEmpty(_request.chargePointSerialNumber) ? string.Empty : _request.chargePointSerialNumber;
|
|
|
_machine.ChargePointModel = string.IsNullOrEmpty(_request.chargePointModel) ? string.Empty : _request.chargePointModel;
|
|
|
_machine.ChargePointVendor = string.IsNullOrEmpty(_request.chargePointVendor) ? string.Empty : _request.chargePointVendor;
|
|
|
- _machine.FW_CurrentVersion = string.IsNullOrEmpty(_request.firmwareVersion) ? string.Empty : _request.firmwareVersion;
|
|
|
+ _machine.FwCurrentVersion = string.IsNullOrEmpty(_request.firmwareVersion) ? string.Empty : _request.firmwareVersion;
|
|
|
_machine.Iccid = string.IsNullOrEmpty(_request.iccid) ? string.Empty : _request.iccid;
|
|
|
//_machine.Iccid = DateTime.UtcNow.ToString("yy-MM-dd HH:mm");
|
|
|
_machine.Imsi = string.IsNullOrEmpty(_request.imsi) ? string.Empty : _request.imsi;
|
|
@@ -938,8 +938,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = string.IsNullOrEmpty(_confirm.data) ? "" : _confirm.data;
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = string.IsNullOrEmpty(_confirm.data) ? "" : _confirm.data;
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1337,8 +1337,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1358,8 +1358,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1379,8 +1379,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1400,8 +1400,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1421,8 +1421,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1443,8 +1443,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1460,7 +1460,7 @@ internal partial class ProfileHandler
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await db.MachineConfigurations.AddAsync(new MachineConfiguration()
|
|
|
+ await db.MachineConfigurations.AddAsync(new MachineConfigurations()
|
|
|
{
|
|
|
ChargeBoxId = session.ChargeBoxId,
|
|
|
ConfigureName = _request.key,
|
|
@@ -1515,7 +1515,7 @@ internal partial class ProfileHandler
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await db.MachineConfigurations.AddAsync(new MachineConfiguration()
|
|
|
+ await db.MachineConfigurations.AddAsync(new MachineConfigurations()
|
|
|
{
|
|
|
ChargeBoxId = session.ChargeBoxId,
|
|
|
ConfigureName = item.key,
|
|
@@ -1542,7 +1542,7 @@ internal partial class ProfileHandler
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await db.MachineConfigurations.AddAsync(new MachineConfiguration()
|
|
|
+ await db.MachineConfigurations.AddAsync(new MachineConfigurations()
|
|
|
{
|
|
|
ChargeBoxId = session.ChargeBoxId,
|
|
|
ConfigureName = item
|
|
@@ -1558,8 +1558,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = 1;
|
|
|
- operation.EVSE_Value = JsonConvert.SerializeObject(_confirm.configurationKey, Formatting.None);
|
|
|
+ operation.EvseStatus = 1;
|
|
|
+ operation.EvseValue = JsonConvert.SerializeObject(_confirm.configurationKey, Formatting.None);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1587,8 +1587,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)_confirm.status;
|
|
|
- operation.EVSE_Value = _confirm.status.ToString();
|
|
|
+ operation.EvseStatus = (int)_confirm.status;
|
|
|
+ operation.EvseValue = _confirm.status.ToString();
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|
|
@@ -1642,8 +1642,8 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
operation.FinishedOn = DateTime.UtcNow;
|
|
|
operation.Status = 1;//電樁有回覆
|
|
|
- operation.EVSE_Status = (int)255;//錯誤
|
|
|
- operation.EVSE_Value = errorMsg;
|
|
|
+ operation.EvseStatus = (int)255;//錯誤
|
|
|
+ operation.EvseValue = errorMsg;
|
|
|
await db.SaveChangesAsync();
|
|
|
}
|
|
|
|